/* ==========================================
   COMPLETE INTEGRATED DASHBOARD STYLING
========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-app: #0f1115;
    --bg-side: #16191f;
    --bg-element: #1e222b;
    --bg-active: #282e3a;
    --text-main: #f8fafc;
    --text-muted: #64748b;
    --accent-blue: #38bdf8;
    --laser-green: #4ade80;
    --laser-red: #f43f5e;
    --border-line: #242b35;
}

body {
    background: var(--bg-app);
    color: var(--text-main);
    font-family: 'Segoe UI', system-ui, sans-serif;
    height: 100vh;
    overflow: hidden; /* पूरी स्क्रीन पर लॉक रखने के लिए */
}

/* APPLICATION GRID HOLDER */
.app-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    width: 100vw;
    height: 100vh;
}

/* ==========================================
   LEFT SIDEBAR LAYER
========================================== */
.sidebar {
    background: var(--bg-side);
    border-right: 1px solid var(--border-line);
    display: flex;
    flex-direction: column;
    padding: 20px;
    height: 100%;
    overflow-y: auto;
}

.sidebar-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--accent-blue);
    margin-bottom: 25px;
}

.sidebar-divider {
    height: 1px;
    background: var(--border-line);
    margin: 20px 0;
}

/* LESSON DROPDOWN MENU ACCORDION */
.lesson-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.menu-trigger {
    background: var(--bg-element);
    border: 1px solid var(--border-line);
    color: var(--text-main);
    padding: 12px 15px;
    border-radius: 10px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.menu-trigger:hover:not(:disabled) {
    background: var(--bg-active);
    border-color: var(--accent-blue);
}

.menu-trigger:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.menu-submenu {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding-left: 10px;
    margin-top: 4px;
}

.menu-submenu.open {
    display: flex;
}

.submenu-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    text-align: left;
    padding: 8px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.submenu-btn:hover {
    color: var(--text-main);
    background: rgba(56, 189, 248, 0.1);
}

.submenu-btn.adv-btn {
    color: #fbbf24;
    font-weight: 600;
}

.submenu-btn.adv-btn:hover {
    background: rgba(251, 191, 36, 0.1);
}

/* STATS GROUP AT BOTTOM OF SIDEBAR */
.stats-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-item {
    background: rgba(15, 17, 21, 0.5);
    border: 1px solid var(--border-line);
    padding: 12px 15px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.stat-value {
    font-size: 0.95rem;
    font-weight: 700;
}

#accuracy {
    color: var(--laser-green);
}

/* ==========================================
   MAIN WORKSPACE OVERVIEW
========================================== */
.main-content {
    display: flex;
    flex-direction: column;
    padding: 20px 25px;
    height: 100vh;
    justify-content: space-between; /* ताकि सब कुछ स्क्रीन पर बराबर सेट रहे */
}

/* SLICK COMPACT TYPING BOX (FIXED SPACE BUG) */
.typing-section {
    width: 100%;
}

.compact-practice-box {
    background: var(--bg-side);
    border: 1px solid var(--border-line);
    border-radius: 16px;
    padding: 12px 30px; /* एक्स्ट्रा स्पेस हटाने के लिए पैडिंग कम की */
    height: 85px;       /* हाइट को छोटा करके एकदम सटीक 1/4 किया */
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.minimal-text-display {
    font-size: 1.7rem;
    letter-spacing: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
    margin-bottom: 2px; /* लेटर्स के नीचे का फालतू गैप गायब */
}

.current-char {
    background: rgba(56, 189, 248, 0.25);
    border-bottom: 3px solid var(--accent-blue);
    border-radius: 2px;
    animation: cursorPulse 1s infinite alternate;
}

@keyframes cursorPulse {
    0% { opacity: 0.8; }
    100% { opacity: 1; }
}

.correct-char { color: var(--laser-green); }
.wrong-char { color: var(--laser-red); }

/* BRIGHT & HIGH-CONTRAST FINGER GUIDE TEXT */
.minimal-status {
    position: absolute;
    bottom: 6px;
    left: 30px;
    font-size: 0.85rem;
    color: #e2e8f0; /* डार्क बैकग्राउंड पर साफ़ दिखने के लिए लाइट व्हाइट रंग */
    letter-spacing: 0.5px;
}

.minimal-status strong {
    color: #38bdf8; /* उंगली का नाम चमकदार स्काई ब्लू रंग में दिखेगा */
    font-weight: 700;
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

/* ==========================================
   3/4 MECHANIZED COMPACT KEYBOARD
========================================== */
.keyboard-section {
    display: flex;
    justify-content: center;
}

.keyboard {
    background: var(--bg-side);
    border: 1px solid var(--border-line);
    padding: 14px;
    border-radius: 16px;
    display: inline-block;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.keyboard-row:last-child { margin-bottom: 0; }

.key {
    width: 42px;         /* 3/4 परफेक्ट साइज */
    height: 42px;        /* 3/4 परफेक्ट साइज */
    background: var(--bg-element);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.78rem;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-main);
}

.shift-key { width: 68px; background: rgba(36, 43, 53, 0.6); }
.space-key { width: 285px; }

/* BLINK ANIMATION FOR ACTIVE KEY */
.active-key {
    background: rgba(56, 189, 248, 0.25) !important;
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
    animation: keyBlink 0.6s infinite alternate;
}

@keyframes keyBlink {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}

.key-correct { background: rgba(74, 222, 128, 0.2); border-color: var(--laser-green); }
.key-wrong { background: rgba(244, 63, 94, 0.2); border-color: var(--laser-red); }

/* ==========================================
   REALISTIC VECTOR ANATOMICAL HANDS
========================================== */
.hands-section {
    display: flex;
    justify-content: center;
    margin-bottom: 5px; /* नीचे से भी गैप कम किया ताकि हाथ थोड़े ऊपर उठें */
}

.hands-container {
    display: flex;
    gap: 160px;
}

.realistic-hand {
    position: relative;
    width: 180px;
    height: 140px;
}

.palmbase {
    position: absolute;
    bottom: 0;
    width: 110px;
    height: 75px;
    background: #1f2530;
    border: 2px solid #2e3748;
    border-radius: 20px 20px 30px 30px;
}

.left-hand .palmbase { left: 40px; border-bottom-left-radius: 40px; }
.right-hand .palmbase { right: 40px; border-bottom-right-radius: 40px; }

.anatomical-finger {
    position: absolute;
    background: #1f2530;
    border: 2px solid #2e3748;
    border-radius: 12px 12px 0 0;
    width: 20px;
    transition: all 0.2s ease;
    transform-origin: bottom center;
}

/* लेफ्ट हैंड फिंगर पोजीशंस */
.left-hand .f-pinky   { height: 58px; left: 42px;  top: 15px; }
.left-hand .f-ring    { height: 74px; left: 66px;  top: 0px;  }
.left-hand .f-middle  { height: 80px; left: 90px;  top: -8px; }
.left-hand .f-index   { height: 72px; left: 114px; top: 2px;  }
.left-hand .f-thumb   { height: 45px; left: 142px; top: 45px; width: 22px; transform: rotate(32deg); border-radius: 12px; }

/* राइट हैंड फिंगर पोजीशंस */
.right-hand .f-thumb  { height: 45px; right: 142px; top: 45px; width: 22px; transform: rotate(-32deg); border-radius: 12px; }
.right-hand .f-index  { height: 72px; right: 114px; top: 2px;  }
.right-hand .f-middle { height: 80px; right: 90px;  top: -8px; }
.right-hand .f-ring   { height: 74px; right: 66px;  top: 0px;  }
.right-hand .f-pinky  { height: 58px; right: 42px;  top: 15px; }

/* FINGER BLINKING LIGHT SYSTEM */
.active-finger {
    background: var(--accent-blue) !important;
    border-color: #e0f2fe !important;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.9);
    transform: translateY(-4px) scaleY(1.03);
    animation: fingerBlink 0.4s infinite alternate;
}

@keyframes fingerBlink {
    0% { filter: brightness(1); }
    100% { filter: brightness(1.3); }
}

.shake { animation: panelShake 0.2s linear; }
@keyframes panelShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}jjjjj
/* ==========================================================================
   🎯 CENTER TEXT FIX & INVISIBLE AD SPACE CONTAINER
   ========================================================================== */

/* मुख्य पैनल का ढांचा: (बायां एड बॉक्स | मुख्य कंटेंट | दायां एड बॉक्स) */
.compact-main-panel {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    width: 82% !important;
    padding: 15px !important;
}

/* बीच का हिस्सा जहाँ टाइपिंग और कीबोर्ड है */
.center-typing-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center; /* सब कुछ हॉरिजॉन्टल सेंटर करेगा */
    gap: 20px;
    min-width: 0;
}

/* 🌟 अक्षरों को एकदम लेफ्ट से हटाकर बीच (Center) में लाने का जादू */
.compact-text-display {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important; /* अक्षरों को बिल्कुल बीच में लाएगा */
    align-content: center !important;
    text-align: center !important;
    font-size: 1.8rem !important;
    gap: 8px 12px !important;
}

/* बक्शों का आकार कीबोर्ड के तालमेल में रखना */
.compact-dashboard-strip, .compact-practice-box {
    width: 100% !important;
    max-width: 820px;
}

/* 🙈 अदृश्य (Colorless/Borderless) एड कंटेनर की सेटिंग */
.side-ad-container {
    width: 160px;
    min-width: 160px;
    height: 600px;
    background: transparent !important; /* कोई रंग नहीं */
    border: none !important;             /* कोई बॉर्डर नहीं */
    outline: none !important;
    box-shadow: none !important;
    display: block;
}

/* बड़ी स्क्रीन्स पर थोड़ा गैप सेट करना */
@media (min-width: 1600px) {
    .side-ad-container {
        margin: 0 20px; /* किनारों से थोड़ा स्पेस छोड़कर */
    }
}

/* स्क्रीन छोटी होने पर विज्ञापनों को छुपाना ताकि टाइपिंग में दिक्कत न हो */
@media (max-width: 1200px) {
    .side-ad-container {
        display: none !important;
    }
    .compact-main-panel {
        width: 100% !important;
        flex-direction: column !important;
    }
}
/* ==========================================================================
   📱 MOBILE & TABLET RESPONSIVE FIX (FOR NEW LAYOUT)
   ========================================================================== */

@media (max-width: 1200px) {
    /* मोबाइल और टैबलेट पर साइड वाले विज्ञापन बॉक्स छिप जाएंगे */
    #leftAdBox, #rightAdBox {
        display: none !important;
    }

    /* मुख्य पैनल को वर्टिकल (ऊपर से नीचे) कर देगा */
    .main-content {
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        padding: 10px !important;
    }

    .center-content-wrapper {
        margin-top: 20px !important; /* मोबाइल पर ऊपर का गैप थोड़ा कम */
        width: 100% !important;
    }

    /* मोबाइल स्क्रीन के हिसाब से टेक्स्ट का साइज */
    .minimal-text-display {
        font-size: 1.3rem !important;
    }
}

@media (max-width: 768px) {
    /* मोबाइल पर पूरा ऐप कंटेनर ऊपर से नीचे सेट होगा */
    .app-container {
        flex-direction: column !important;
    }

    /* साइडबार मेनू मोबाइल पर पूरी चौड़ाई ले लेगा */
    .sidebar {
        width: 100% !important;
        max-height: 200px;
        overflow-y: auto;
    }
}