/* Layout & Typography */
body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
    background: #eceff1; 
    padding: 20px; 
    color: #333; 
    line-height: 1.5;
    margin: 0;
}

.container { 
    max-width: 800px; 
    margin: auto; 
    background: white; 
    padding: 25px; 
    border-radius: 12px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
}

/* Info Box & Sub-header */
.info-box {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.9em;
}

.sub-header {
    font-size: 0.85em;
    color: #666;
    margin-top: -10px;
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}
.sub-header a { color: #007bff; text-decoration: none; font-weight: 500; }

/* Forms & Inputs */
label { display: block; margin-top: 20px; font-weight: 600; margin-bottom: 8px; }

textarea, select, input { 
    width: 100%; 
    padding: 12px; 
    border: 1px solid #ccc; 
    border-radius: 6px; 
    box-sizing: border-box; 
    font-size: 14px; /* Standard desktop size */
}

.preview-box { 
    margin-top: 10px; 
    padding: 15px; 
    background: #f8f9fa; 
    border-left: 4px solid #007bff; 
    font-size: 0.9em; 
    min-height: 40px; 
}

/* Buttons & Controls */
.controls { 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
    margin-top: 25px; 
}

button { 
    width: 100%; 
    padding: 14px; 
    border: none; 
    border-radius: 6px; 
    font-weight: bold; 
    cursor: pointer; 
    transition: opacity 0.2s;
}
button:hover { opacity: 0.9; }

.btn-primary { background: #28a745; color: white; }
.btn-secondary { background: #17a2b8; color: white; }
.btn-reset { background: #6c757d; color: white; font-size: 0.85em; margin-top: 15px; }

/* Responsive Table */
.table-wrapper { width: 100%; overflow-x: auto; margin: 15px 0; }
table { width: 100%; border-collapse: collapse; font-size: 0.85em; min-width: 400px; }
th, td { border: 1px solid #eee; padding: 10px; text-align: left; }
th { background-color: #f1f1f1; }

/* Process Log Area */
.log-container {
    height: 150px;
    overflow-y: auto;
    background: #1e1e1e;
    color: #00ff00;
    padding: 10px;
    font-family: 'Courier New', monospace;
    font-size: 0.8em;
    border-radius: 4px;
    margin-top: 5px;
}
.log-error { color: #ff5f5f; }
.log-success { color: #75ff75; }
.log-info { color: #00d4ff; }

/* Footer */
footer {
    margin-top: 30px;
    text-align: center;
    font-size: 0.8em;
    color: #888;
    border-top: 1px solid #eee;
    padding-top: 15px;
}
footer a { color: #007bff; text-decoration: none; }

/* --- MOBILE OPTIMIZATION --- */
/* --- Add this to your existing CSS or replace the @media block --- */

@media (max-width: 600px) {
    body { 
        padding: 0; /* Remove body padding to use full screen width */
        background: #fff; /* Match container for a seamless app look */
    }

    .container { 
        width: 100%;
        max-width: 100%;
        padding: 15px; 
        border-radius: 0; /* Square edges look better on full-width mobile */
        box-shadow: none;
    }

    /* Make text readable without squinting */
    h2 { font-size: 1.5rem; margin-top: 10px; }
    .sub-header, .info-box { font-size: 0.95rem; line-height: 1.4; }

    /* Jumbo Inputs for Mobile */
    textarea, select, input { 
        font-size: 16px !important; /* Forces browser to not zoom in */
        padding: 15px;
        margin-bottom: 10px;
        border: 2px solid #ddd; /* Thicker borders are easier to see */
    }

    /* Massive Thumb-Friendly Buttons */
    button { 
        padding: 18px; 
        font-size: 1.1rem; 
        letter-spacing: 1px;
        margin-bottom: 5px;
    }

    /* Expand the Log for visibility */
    .log-container {
        height: 200px; /* Taller log for mobile scrolling */
        font-size: 0.9rem;
    }

    /* Ensure labels stand out */
    label {
        font-size: 1.1rem;
        margin-top: 25px;
        color: #000;
    }

    footer {
        padding: 20px 10px 40px 10px; /* Extra bottom padding for mobile home bars */
    }
}