/* --- THEME VARIABLES --- */
:root {
    --primary-blue: #2854EE; 
    --bg-color: #E4EDFA;     /* NEW: A deeper, distinct light blue foundation */
    --card-bg: #FFFFFF;      
    --text-dark: #111827;    
    --text-muted: #6B7280;   
    --radius-heavy: 28px;    
    --radius-pill: 50px;     
}

/* --- GLOBAL & RESET --- */
body {
    font-family: 'Poppins', sans-serif;
    /* NEW: Premium soft gradient background */
    background: linear-gradient(135deg, #DFE9F9 0%, #F0F4FC 100%);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

.mobile-container {
    max-width: 480px;
    margin: 0 auto;
    /* NEW: Make container transparent so the body's blue gradient shows through */
    background-color: transparent; 
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    padding-top: 20px; /* Add a little breathing room at the top */
}

/* Ensure the header text pops against the new blue background */
header {
    text-align: center;
    margin-bottom: 10px;
}

header .logo {
    font-weight: 700;
    font-size: 28px;
    color: var(--primary-blue);
}
.subtitle {
    font-size: 14px;
    color: #1d56c0;
}

/* --- VIEW MANAGER (Single Page Magic) --- */
.view {
    transition: opacity 0.3s ease;
}

.hidden {
    display: none !important;
}

/* --- FLOATING CARDS --- */
.card, .result-card {
    background-color: var(--card-bg);
    border: none;
    border-radius: var(--radius-heavy); /* 28px rounded corners */
    padding: 30px 20px;
    margin: 20px;
    box-shadow: 0 10px 30px rgba(40, 84, 238, 0.08); /* Soft blueish shadow for depth */
    text-align: center;
}

.card h3, .result-card h2 {
    color: var(--text-dark);
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 24px;
    letter-spacing: -0.5px; /* Modern tight spacing */
}

.card p, .subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
    font-weight: 400;
}

/* --- PRIMARY INTERACTION ZONE (Upload Box) --- */
.upload-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-blue);
    color: white;
    padding: 35px 20px;
    border-radius: var(--radius-heavy);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 12px 24px rgba(40, 84, 238, 0.3); /* Glowing drop shadow */
    margin-bottom: 10px;
}

.upload-box:active {
    transform: scale(0.96); /* Satisfying click effect */
}

.upload-box .icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.upload-box span {
    font-weight: 600;
    font-size: 18px;
    letter-spacing: 0.5px;
}

.tiny-text {
    font-size: 12px;
    color: #bdc3c7;
}

/* --- LOADING SPINNER --- */
.loader-content {
    text-align: center;
    margin-top: 50%; /* Center vertically */
    transform: translateY(-50%);
}

.spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db; /* Blue Spinner */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- RESULTS SECTION --- */
.result-card {
    padding-bottom: 40px;
}

.section-title {
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 10px;
    color: #34495e;
    font-size: 16px;
    border-left: 4px solid #3498db;
    padding-left: 10px;
}

.info-badge {
    background: #ecf0f1;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
}

/* Critical Item Styling */

.critical-item {
    background: #fff5f5; /* Light Red Background */
    border: 1px solid #ffcccc;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.critical-header {
    display: flex;
    justify-content: space-between;
    font-weight: 500; /* Removed the heavy bolding */
    color: #c0392b; /* Dark Red Text */
}

.explanation {
    font-size: 13px;
    color: #555;
    margin-top: 5px;
}

/* Hindi Summary Box */
.highlight-box {
    background: #e8f8f5; /* Light Green */
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #d1f2eb;
    color: #16a085;
    font-size: 15px;
    line-height: 1.5;
}

/* --- PRIMARY BUTTONS --- */
.btn-primary {
    background-color: var(--primary-blue);
    color: white;
    border: none;
    border-radius: var(--radius-pill); /* 50px pill shape */
    padding: 18px 24px;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(40, 84, 238, 0.25);
    margin-top: 25px;
    font-family: 'Poppins', sans-serif;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-primary:active {
    transform: scale(0.98);
    background-color: #1f42c2; /* Slightly darker on press */
}
/* --- ACTION BUTTON GROUP --- */
.button-group {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Space between buttons */
    margin-top: 30px;
}

/* --- WHATSAPP SHARE BUTTON --- */
.btn-secondary.share-btn {
    background-color: #25D366; /* Official WhatsApp Green */
    color: #ffffff;
    border: none;
    border-radius: var(--radius-pill);
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.25);
    font-family: 'Poppins', sans-serif;
    transition: transform 0.2s ease, background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-secondary.share-btn:active {
    transform: scale(0.98);
    background-color: #1ebe5b;
}

/* Remove the old margin from primary button since the group handles spacing now */
.button-group .btn-primary {
    margin-top: 0; 
}

/* --- LANGUAGE DROPDOWN (New V2 Styles) --- */
.language-select {
    margin-bottom: 20px;
    text-align: left;
    background: #f8fbfe;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #e1e8ed;
}

.language-select label {
    display: block;
    font-size: 13px;
    color: #7f8c8d;
    margin-bottom: 8px;
    font-weight: 600;
}

.lang-dropdown {
    width: 100%;
    padding: 12px;
    border: 1px solid #bdc3c7;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    appearance: none; /* Modern cleaner look */
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
}

/* --- VOICE FEATURE (V3) --- */
.title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    margin-top: 20px;
}

.icon-btn {
    background: #e1f5fe;
    border: 1px solid #03a9f4;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.icon-btn:active {
    transform: scale(0.9);
}
