/* ======================================= */
/* 1. CORE VARIABLES & BASE STYLES */
/* ======================================= */
:root { --light: #ede8d0; --dark: #28292c; --accent: #202020; --accent-dark: #2f2f2f; --bg: #f4afff; --card: #fff; --radius: 16px; --shadow: 0 10px 30px rgba(0, 0, 0, 0.08); --text: #111; --text-muted: #555; }
body { margin: 0; font-family: "Inter", system-ui, sans-serif; /* background: linear-gradient(135deg, #2f2f2f, #222222); */ /* background: #606060; */ background: #dfdfdf; color: var(--text); display: flex; flex-direction: column; min-height: 100vh; width: 100vw; overflow-x: hidden; }
/* ======================================= */
/* 2. HEADER / LOGO STYLES */
/* ======================================= */
.toggle-switch {
    /* Anchors the switch to the top-right of the viewport */
    position: fixed; 
    top: 20px;       
    right: 20px;     
    z-index: 1000;   
    padding: 0;      
    text-align: left; 
    width: 50px; /* Final container width (Half of 100px) */
}

label {
    position: absolute;
    width: 100%;
    height: 25px; /* Half of the previous 50px height */
    background-color: var(--dark);
    border-radius: 50px;
    cursor: pointer;
}

#darkModeToggle {
    position: absolute;
    display: none;
}

.slider {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50px;
    transition: 0.3s;
}

#darkModeToggle:checked ~ .slider {
    background-color: var(--light);
}

.slider::before {
    content: "";
    position: absolute;
    /* Calculated for 50px width and 25px height */
    top: 2.5px; /* Centers the 20px circle vertically: (25px - 20px) / 2 = 2.5px */
    left: 2.5px; /* Starting position: 2.5px from the left */
    width: 20px; /* Circle size (Half of the previous 40px) */
    height: 20px; /* Circle size (Half of the previous 40px) */
    border-radius: 50%;
    
    /* Creates the crescent moon effect */
    box-shadow: inset 5px -2px 0px 0px var(--light); /* Scaled down */
    background-color: var(--dark);
    transition: 0.3s;
}

#darkModeToggle:checked ~ .slider::before {
    /* 50px container width - 2.5px left margin - 20px circle width - 2.5px right margin = 25px translation */
    transform: translateX(25px); 
    background-color: var(--dark);
    box-shadow: none;
}
.logo-header { position: relative; z-index: 20; padding: 1rem; text-align: left; } 
.logo { display: inline-block; cursor: pointer; transition: transform 0.2s ease;}
.logo:hover { transform: scale(1.05); } /* Add CSS for accessibility text (optional but recommended) */ 
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; }
.logo-svg { width: auto; height: 100px; fill: var(--accent-dark); transition: fill 0.4s ease-in-out; }
/* ======================================= */
/* 3. MAIN WRAPPER / LAYOUT */
/* ======================================= */
.main-wrapper { flex: 1 0 auto; display: flex; justify-content: center; width: 100%; padding: 1rem; }
.quiz-container { width: 100%; max-width: 1000px; display: flex; flex-direction: column; align-items: center; gap: 2rem; }
.hidden { display: none; }
/* ======================================= */
/* 4. CARD STYLES (Common) */
/* ======================================= */
.card { /* background: rgba(255, 255, 255, 0.85); */ background: #EDE8D0; border: 1px solid #d8cd99; backdrop-filter: blur(10px); border-radius: var(--radius); width: 90%; max-width: 1000px; padding: 2rem; text-align: center; transition: opacity 0.3s ease, transform 0.3s ease; }
/* Individual Card Positioning (Desktop Centering) */
#startCard { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -55%); max-width: 1000px; width: 90%;  }
#quizCard, #resultCard { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -55%); max-width: 600px; width: 100%; }
/* ======================================= */
/* 5. START CARD ELEMENTS */
/* ======================================= */
.test-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; justify-items: center; width: 100%; }
.button-wrapper { position: relative; width: 100%; max-width: 280px; }
/* Test Button Icon */
.btn-icon { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); width: 40px; height: 40px; background: none; display: flex; align-items: center; justify-content: center; font-size: 18px; z-index: 20; pointer-events: none; transition: all 0.2s ease; }
.button-wrapper:hover .btn-icon { transform: translateX(-50%) scale(1.05); }
/* Test Button */
.test-btn { position: relative; width: 100%; padding: 20px 20px; border-radius: 14px; font-size: 15px; background: #f7f7f7; border: 1px solid #ddd; cursor: pointer; overflow: hidden; text-align: center; }
.test-btn:hover { background: #f0f0f0; transform: scale(1.03); }
.test-btn:active { background: #e5e5e5; }
/* Diagonal ribbon */
.free-test::after { content: "Үнэгүй"; position: absolute; top: 8px; right: -30px; width: 100px; height: 24px; background: #ff4b4b; color: white; font-weight: bold; font-size: 10px; text-align: center; line-height: 24px; transform: rotate(45deg); transform-origin: center center; z-index: 10; border-radius: 2px; }
.start-buttons { display: flex; justify-content: center; gap: 1rem; margin-top: 1rem; }
/* ======================================= */
/* 6. QUIZ CARD ELEMENTS */
/* ======================================= */
h2 { margin: 0 0 1rem; }
.text-left { text-align: left; }
/* Question Content */
.question-context { font-style: italic; color: #666; margin-bottom: 1rem; }
.question-image, .question-images { text-align: center; margin: 1rem 0; }
.question-image img, .question-images img { max-width: 100%; height: auto; border-radius: 8px; box-shadow: 0 2px 6px rgba(0,0,0,0.1); margin: 0.5rem; }
/* Progress Bar */
.progress { margin-bottom: 1rem; text-align: left; }
#progressText { font-size: 0.9rem; margin-bottom: 0.4rem; color: var(--text-muted); }
.progress-bar { width: 100%; height: 8px; background: #eee; border-radius: 5px; overflow: hidden; }
#progressFill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), var(--accent-dark)); transition: width 0.3s ease; }
/* Question and Reminder */
#questionText { text-align: left; margin-bottom: 0.3rem; }
.reminder { font-size: 0.85rem; color: rgba(0,0,0,0.4); margin:0.3rem 0 0.8rem 0; text-align:left; }
/* Choices */
.choices { display: block; margin-bottom: 1.5rem; padding-left: 1.2rem; }
.choice-btn { display: flex; align-items: center; gap: 0.8rem; background: none; border: none; padding:0.6rem 0; border-radius:12px; cursor:pointer; transition: all 0.2s ease; text-align:left; color: var(--text); }
.choice-btn:hover { background: rgba(75,123,236,0.05); }
.choice-btn::before { content:""; display:inline-block; width:13px; height:13px; border:2px solid #bbb; border-radius:50%; flex-shrink:0; transition: all 0.2s ease; }
.choice-btn.selected::before { background: var(--accent); border-color: var(--accent-dark); }
/* Other Input (if used inside choices) */
.other-input { width:100%; padding:0.5rem 0.8rem; margin-top:0.3rem; border-radius:10px; border:1px solid rgba(82,82,82,0.1); background: rgba(255,255,255,0.2); font-size:1rem; color:#111; outline:none; transition:all 0.2s ease; }
.other-input:focus { border-color: var(--accent); background: rgba(255,255,255,0.3); }
/* ======================================= */
/* 7. ACTIONS / BUTTONS (General) */
/* ======================================= */
.actions { display:flex; justify-content:space-between; margin-top:1rem; }
/* Basic Button (e.g., Examples button) */
.button { background:none; color:black; border:none; padding:0.6rem 0.6rem; border-radius:6px; cursor:pointer; transition: background 0.2s ease; }
/* Primary Button (.btn) */
.btn { background: var(--accent); color:white; border:none; padding:0.6rem 1.2rem; border-radius:6px; cursor:pointer; transition: background 0.2s ease; }
.btn:hover:not(:disabled) { background: var(--accent-dark); }
.btn:disabled { opacity:0.5; cursor:not-allowed; }
/* Ghost Button (.btn-ghost) */
.btn-ghost { background:none; border:1px solid transparent; color: var(--text-muted); font-size:0.95rem; cursor:pointer; padding:0.6rem 1rem; border-radius:6px; transition:all 0.2s ease; }
.btn-ghost:hover:not(:disabled) { border-color: rgba(0,0,0,0.2); color:#000; }
.btn-ghost:disabled { color: rgba(0,0,0,0.3); cursor: default; border-color:transparent; }
/* ======================================= */
/* 8. RESULT / PAYMENT STATUS */
/* ======================================= */
/* Containers for Payment/Result Status (Dynamically populated) */
#payComplete { text-align: center; background: #f8fff8; border: 1px solid #c6f6d5; border-radius: 10px; padding: 20px; margin: 30px auto; width: 90%; max-width: 500px; box-shadow: 0 4px 8px rgba(0,0,0,0.05); }
#showRslt { text-align: center; background: #EDE8D0; border: 1px solid #d8cd99; border-radius: 10px; padding: 20px; margin: 30px auto; width: 90%; max-width: 500px; box-shadow: 0 4px 8px rgba(0,0,0,0.05); }
/* Button to see results after payment */
.see-results-btn { background-color: #38a169; color: white; padding: 10px 16px; border: none; border-radius: 8px; margin-top: 12px; cursor: pointer; transition: background-color 0.2s; }
.see-results-btn:hover { background-color: #2f855a; }
.input-group-appended {
            display: flex;
            width: 100%;
            max-width: 400px; 
            margin: 1.5rem auto 0 auto; 
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 4px 15px rgba(0,0,0,0.1);
            border: 1px solid #ddd; 
    justify-content: flex-start;
        }
        .input-group-appended input {
            flex-grow: 1;
            flex-shrink: 1;
            flex-basis: 70%; 
            min-width: 150px;
            border: none;
            padding: 1rem 1.25rem;
            font-size: 1rem;
            outline: none;
            background: #f7f7f7;
        }
        .btn-appended {
            /* max-width: 30%; */
            flex-basis: 30%;
            flex-shrink: 0;
            text-align: center;
            background: var(--accent); /* Using the primary blue color */
            color: white;
            padding: 1rem 1.5rem;
            border: none;
            font-weight: 600;
            transition: background 0.2s;
            cursor: pointer;
        }
        .btn-appended:hover {
            background: var(--accent-dark);
        }
/* ======================================= */
/* 9. QPAY POPUP (Dynamic) */
/* ======================================= */
.qr-popup { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); display: flex; justify-content: center; align-items: center; z-index: 9999; animation: fadeIn 0.3s ease; }
.qr-box { background: #fff; border-radius: 16px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15); padding: 2rem; max-width: 340px; width: 90%; text-align: center; animation: slideUp 0.4s ease; }
.qr-box h3 { font-size: 1.4rem; margin-bottom: 0.5rem; color: #333; }
.qr-box p { color: #555; margin-bottom: 1rem; }
.qr-box img { width: 100%; max-width:220px; height: auto; border-radius: 8px; object-fit: contain; margin-bottom: 1rem; border: 1px solid #ddd; }
.qr-box button { margin-top: 0.5rem; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
#qrcode canvas, #qrcode { text-align: center; margin: 1rem 0; }
#qrcode img { border-radius: 0 !important; display: inline-block; text-align: center; }
/* ======================================= */
/* 10. EXAMPLE POPUP (Dynamic) */
/* ======================================= */
.example-popup { position: fixed; inset: 0; background: rgba(0,0,0,0.6); /* background: #EDE8D0; */ display: flex; align-items: center; justify-content: center; z-index: 9999; overflow: auto; padding: 40px 0; }
.example-box { /* background: white*/ background: #EDE8D0; padding: 20px 30px; border-radius: 12px; max-width: 600px; width: 90%; text-align: left; box-shadow: 0 4px 20px rgba(0,0,0,0.3); display: flex; flex-direction: column; gap: 15px; }
.example-content { max-height: 60vh; overflow-y: auto; padding-right: 10px; }
/* Custom Scrollbars */
.example-content::-webkit-scrollbar { width: 6px; }
.example-content::-webkit-scrollbar-thumb { background-color: rgba(0,0,0,0.2); border-radius: 3px; }
.example-content::-webkit-scrollbar-thumb:hover { background-color: rgba(0,0,0,0.4); }
/* ======================================= */
/* 11. FOOTER STYLES */
/* ======================================= */
.card-footer { flex-shrink: 0; text-align: center; padding: 2rem 1rem 1rem 1rem; margin-top: 2rem; }
.footer-text { font-size:0.85rem; color: #272727; margin-bottom:0.8rem; /* text-shadow: -0.5px -0.5px 1px rgba(0, 0, 0, 0.8), 0.5px -0.5px 1px rgba(0, 0, 0, 0.8), -0.5px 0.5px 1px rgba(0, 0, 0, 0.8), 0.5px 0.5px 1px rgba(0, 0, 0, 0.8); */ }
.social-icons { display:flex; justify-content:center; gap:1rem; margin-bottom:1rem; }
.social-svg { width:32px; height:32px; cursor:pointer; transition: transform 0.2s ease; fill: var(--accent-dark);}
.social-svg:hover { transform: scale(1.1); }
/* ======================================= */
/* 12. RESPONSIVE / MOBILE OVERRIDES */
/* ======================================= */
@media (max-width: 768px) { html, body { width: 100% !important; min-width: 100% !important; margin: 0 !important; padding: 0 !important; overflow-x: hidden !important; }
.main-wrapper { width: 100% !important; max-width: 100% !important; display: flex !important; flex-direction: column !important; align-items: center !important; justify-content: flex-start !important; box-sizing: border-box !important; padding-top: 11vh !important; padding-bottom: 0rem !important; }
.quiz-container { width: 95% !important; max-width: 750px !important; margin: 0rem !important; padding: 0rem !important; display: flex !important; flex-direction: column !important; align-items: center !important; gap: 1.5rem !important; box-sizing: border-box !important; }
#startCard, #quizCard, #resultCard, #payComplete, #showRslt  { position: relative !important; top: auto !important; left: auto !important; transform: none !important; width: 100% !important; max-width: 700px !important; margin: 0.5rem auto !important; box-sizing: border-box !important; }
.test-grid { grid-template-columns: 1fr !important; gap: 12px !important; width: 100% !important; justify-items: center !important; }
.button-wrapper { max-width: 95% !important; margin: 0 auto !important; }
.btn-icon { top: -12px !important; width: 28px !important; height: 28px !important; }
.free-test::after { width: 60px !important; height: 20px !important; line-height: 20px !important; font-size: 9px !important; top: 4px !important; right: -18px !important; }
.card { padding: 1.5rem !important; width: 100% !important; }
.logo-header { position: absolute !important; top: 0 !important; left: 0 !important; height: 10vh !important; width: auto !important; padding: 0 !important; display: flex !important; align-items: flex-start !important; z-index: 100 !important; }
.logo { height: 10vh !important; width: 200px !important; max-height: none !important; display: block !important; }
.logo-svg { height: 10vh !important; width: auto; }
.start-buttons { margin-top: 1rem !important; display: flex !important; justify-content: center !important; gap: 1rem !important; }
.example-popup { padding: 40px 0 !important; }
.example-box { width: 90% !important; max-width: 400px !important; padding: 15px 20px !important; }
.card-footer { width: 100% !important; max-width: 100% !important; margin: 0.5rem auto 0 auto !important; padding: 0.5rem 1rem!important; text-align: center !important; box-sizing: border-box !important; } }













