/* 30_minutes.css - Complete styles for 30 minute test with fixed popup design */

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-card: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-muted: #666666;
    --border-color: #c8e0ff;
    --border-strong: #7fb2ff;
    --accent-primary: #4169e1;
    --accent-hover: #5f9aff;
    --accent-light: #e6ecff;
    --shadow-color: rgba(0,0,0,0.1);
    --success: #22c55e;
    --error: #ef4444;
    --success-dim: #86efac;
    --error-dim: #fca5a5;
    --pending: #6b7280;
    --current-bg: rgba(65, 105, 225, 0.1);
    --char-correct: #16a34a;
    --char-incorrect: #dc2626;
    --char-remaining: #9ca3af;
    --placeholder-color: #888888;
    --cursor-color: #4169e1;
}

[data-theme="dark"] {
    --bg-primary: #0a1120;
    --bg-secondary: #1d2d4b;
    --bg-card: #14233c;
    --text-primary: #ffffff;
    --text-secondary: #e0e9ff;
    --text-muted: #a0b5e0;
    --border-color: #2a3f66;
    --border-strong: #3a5a8c;
    --accent-primary: #4080ff;
    --accent-hover: #5f9aff;
    --accent-light: #1e2f4a;
    --shadow-color: rgba(0, 40, 80, 0.3);
    --success: #4ade80;
    --error: #f87171;
    --success-dim: #166534;
    --error-dim: #7f1d1d;
    --pending: #9ca3af;
    --current-bg: rgba(64, 128, 255, 0.2);
    --char-correct: #86efac;
    --char-incorrect: #fca5a5;
    --char-remaining: #6b7280;
    --placeholder-color: #aaaaaa;
    --cursor-color: #4080ff;
}

/* ================= GLOBAL ================= */
html, body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
}

.test-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    overflow-x: hidden;
}

/* ================= HEADER ================= */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 30px;
    width: 100%;
}

.site-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    cursor: pointer;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    max-width: none;
    flex-shrink: 0;
    transition: color 0.3s ease;
}

.site-title:hover {
    color: var(--accent-primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.mobile-menu-btn {
    display: none;
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    order: 1;
}

.login-btn {
    background: transparent;
    border: 2px solid var(--border-strong);
    color: var(--text-primary);
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-size: 14px;
    order: 2;
}

.login-btn:hover {
    background: var(--accent-primary);
    color: white;
    transform: scale(1.05);
}

/* ================= MAIN LAYOUT ================= */
.test-layout {
    display: grid;
    grid-template-columns: 220px 1fr 280px;
    gap: 30px;
    margin-bottom: 40px;
}

/* ================= LEFT SIDEBAR ================= */
.test-sidebar {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 25px 15px;
    transition: all 0.3s ease;
}

.test-sidebar:hover {
    border-color: var(--border-strong);
    transform: scale(1.02);
}

.nav-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.test-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.test-nav li {
    margin-bottom: 5px;
}

.test-nav a {
    display: block;
    padding: 12px 15px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.test-nav a:hover,
.test-nav .active a {
    background: var(--accent-light);
    color: var(--accent-primary);
    transform: translateX(5px);
}

/* ================= CENTER CONTENT ================= */
.test-center {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    transition: all 0.3s ease;
    overflow: hidden;
    width: 100%;
}

.test-center:hover {
    border-color: var(--border-strong);
    transform: scale(1.01);
}

.test-center h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 25px;
    font-family: 'Inter', sans-serif;
}

/* ================= MODE SELECTOR ================= */
.mode-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.mode-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    transition: all 0.3s ease;
}

.mode-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.mode-btn:hover {
    transform: scale(1.05);
    border-color: var(--accent-primary);
}

.mode-btn.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ================= TYPING BOX ================= */
.typing-box {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 20px;
    border: 2px solid var(--border-color);
    min-height: 300px;
    font-family: 'Fira Code', monospace;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.lines-container {
    position: relative;
    min-height: 280px;
    transition: all 0.3s ease;
}

/* ================= WORD TYPING STYLES ================= */
.word {
    display: inline-block;
    margin-right: 6px;
    font-size: 1.2rem;
    line-height: 1.8;
    transition: all 0.2s ease;
}

.upcoming-word {
    color: var(--text-muted);
    opacity: 0.7;
}

.current-word {
    color: var(--text-primary);
    font-weight: 600;
    background-color: var(--current-bg);
    border-radius: 4px;
    padding: 0 2px;
}

.completed-correct {
    color: var(--success);
    opacity: 0.7;
}

.completed-incorrect {
    color: var(--error);
    opacity: 0.7;
    text-decoration: line-through;
}

/* Character level styles - NO GAP between letters */
.char-correct {
    color: var(--char-correct);
    font-weight: 600;
    display: inline;
    margin: 0;
    padding: 0;
}

.char-incorrect {
    color: var(--char-incorrect);
    font-weight: 600;
    text-decoration: line-through;
    display: inline;
    margin: 0;
    padding: 0;
}

.char-remaining {
    color: var(--char-remaining);
    opacity: 0.5;
    display: inline;
    margin: 0;
    padding: 0;
}

/* ================= NORMAL MODE LINE-BY-LINE ================= */
.lines-wrapper {
    display: flex;
    flex-direction: column;
    gap: 5px;
    position: relative;
}

.original-line-container {
    padding: 5px 0 2px 0;
    font-size: 1.4rem;
    line-height: 1.6;
    transition: all 0.5s ease-in-out;
    opacity: 1;
    transform: translateY(0);
    word-spacing: 4px;
    margin-bottom: 2px;
}

.original-line-container.hide-up {
    opacity: 0;
    transform: translateY(-100px);
    pointer-events: none;
    position: absolute;
    width: 100%;
}

.pending-word {
    color: var(--text-primary);
    opacity: 1;
    font-size: 1.4rem;
}

.completed-word {
    color: var(--text-muted);
    opacity: 0.5;
    font-size: 1.4rem;
}

.line-input-container {
    margin-bottom: 5px;
    transition: all 0.5s ease-in-out;
    opacity: 1;
    transform: translateY(0);
}

.line-input-container.hide-up {
    opacity: 0;
    transform: translateY(-100px);
    pointer-events: none;
    position: absolute;
    width: 100%;
}

.line-input-container.active-line .input-field {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.line-input-container:not(.active-line) .input-field {
    pointer-events: none;
    opacity: 0.8;
}

/* ================= INPUT FIELD STYLES ================= */
.input-field {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 18px;
    min-height: 55px;
    font-size: 1.6rem;
    font-family: 'Fira Code', monospace;
    transition: all 0.3s ease;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
    white-space: nowrap;
    cursor: text;
    color: var(--text-primary);
    position: relative;
}

/* ================= PRO MODE - WORD BY WORD PLACEHOLDER ================= */
.pro-input-box {
    background: var(--bg-card);
    border: 2px solid var(--accent-primary);
    border-radius: 12px;
    padding: 15px 20px;
    min-height: 280px;
    font-size: 1.6rem;
    font-family: 'Fira Code', monospace;
    display: flex;
    flex-direction: column;
    gap: 8px;
    line-height: 1.6;
    overflow-y: auto;
    margin-top: 15px;
}

/* Pro mode line wrapper */
.pro-line-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.5s ease-in-out;
    opacity: 1;
    transform: translateY(0);
    min-height: 40px;
}

.pro-line-wrapper.hide-up {
    opacity: 0;
    transform: translateY(-100px);
    pointer-events: none;
    position: absolute;
    width: calc(100% - 40px);
}

/* Word placeholder - sirf ek word dikhega, normal text */
.word-placeholder {
    color: var(--placeholder-color);
    opacity: 0.7;
    font-style: normal;
    font-size: 1.6rem;
    display: inline-block;
    margin-right: 8px;
}

/* Current word being typed - background rahega */
.pro-current-word {
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Pro mode characters */
.pro-input-box .char,
.pro-input-box .word-correct,
.pro-input-box .word-incorrect {
    margin: 0;
    padding: 0;
    font-size: 1.6rem;
    display: inline;
}

/* Word level spacing */
.pro-input-box .word-correct,
.pro-input-box .word-incorrect {
    margin-right: 8px;
    display: inline-block;
}

/* ================= PHONE MODE STYLES ================= */
.phone-current-word {
    font-size: 3.5rem;
    text-align: center;
    margin: 50px 0;
    font-family: 'Fira Code', monospace;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    word-break: break-word;
    line-height: 1.4;
}

.phone-current-word .correct {
    color: var(--char-correct);
    font-weight: 600;
    display: inline;
    margin: 0;
    padding: 0;
}

.phone-current-word .incorrect {
    color: var(--char-incorrect);
    font-weight: 600;
    text-decoration: line-through;
    display: inline;
    margin: 0;
    padding: 0;
}

.phone-current-word .char-remaining-hint {
    color: var(--char-remaining);
    opacity: 0.4;
    font-size: 3.5rem;
    display: inline;
    margin: 0;
    padding: 0;
}

.phone-current-word .cursor-blink {
    height: 3.5rem;
    width: 4px;
    margin-left: 2px;
    margin-right: 0;
}

.phone-progress {
    text-align: center;
    font-size: 1.4rem;
    color: var(--text-muted);
    margin-top: 20px;
}

.phone-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* ================= PRO MODE ADDITIONAL STYLES ================= */
.pro-mode-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.full-text {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--text-muted);
    opacity: 0.8;
    max-height: 180px;
    overflow-y: auto;
    padding: 10px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

/* Full text lines - with hide animation */
.full-text .pro-line-wrapper {
    display: block;
    margin-bottom: 4px;
    padding: 4px 0;
    border-bottom: 1px dashed var(--border-color);
    transition: all 0.5s ease-in-out;
    min-height: 32px;
}

.full-text .pro-line-wrapper.hide-up {
    opacity: 0;
    transform: translateY(-100px);
    pointer-events: none;
    position: absolute;
}

/* ================= CURSOR BLINK ANIMATION ================= */
.cursor-blink {
    display: inline-block;
    width: 3px;
    height: 1.8rem;
    background-color: var(--cursor-color);
    margin-left: -6px;
    margin-right: 0px;
    vertical-align: middle;
    animation: blink 1s infinite;
    box-shadow: 0 0 1px var(--cursor-color);
    border-radius: 2px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Current word container */
.current-word-container {
    display: inline-block;
    margin-right: 2px;
}

/* Char remaining hint */
.char-remaining-hint {
    color: var(--char-remaining);
    opacity: 0.4;
    font-size: 1.6rem;
    margin: 0;
    padding: 0;
    display: inline;
}

/* Word correct/incorrect styles */
.word-correct {
    color: var(--char-correct);
    opacity: 0.8;
    margin-right: 8px;
    display: inline-block;
}

.word-incorrect {
    color: var(--char-incorrect);
    opacity: 0.8;
    text-decoration: line-through;
    margin-right: 8px;
    display: inline-block;
}

/* ================= TIMER ================= */
.timer-container {
    display: flex;
    align-items: center;
    background: var(--accent-light);
    padding: 8px 20px;
    border-radius: 40px;
    border: 2px solid var(--accent-primary);
    box-shadow: 0 4px 10px var(--shadow-color);
    font-weight: 600;
    transition: all 0.3s ease;
}

.timer-container:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px var(--shadow-color);
}

.timer-icon {
    font-size: 1.2rem;
    margin-right: 8px;
    color: var(--accent-primary);
}

.timer-display {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
    min-width: 100px;
    text-align: center;
    font-family: 'Fira Code', monospace;
    letter-spacing: 2px;
}

.timer-critical .timer-display {
    color: var(--error);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ================= TYPING STATS ================= */
.typing-stats {
    margin-top: 20px;
    padding: 15px 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    align-items: center;
    border: 2px solid var(--border-color);
}

.typing-stats .stat-item {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-card);
    padding: 8px 16px;
    border-radius: 30px;
    border: 2px solid var(--accent-light);
}

.progress-bar {
    flex: 1;
    min-width: 200px;
    height: 10px;
    background: var(--border-color);
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-primary);
    transition: width 0.3s ease;
}

/* ================= RIGHT SIDEBAR - HOVER EFFECTS (FIXED) ================= */

/* Right sidebar hover effect - same as left sidebar */
.test-right {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 25px;
    transition: all 0.3s ease;
}

.test-right:hover {
    border-color: var(--border-strong);
    transform: scale(1.02);
}

/* Daily game section - no background change on section hover */
.daily-game {
    text-align: center;
    margin-bottom: 30px;
    border-radius: 16px;
    padding: 5px;
}

/* Game preview hover - button area ka hover */
.game-preview {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.game-preview:hover {
    border-color: var(--accent-primary);
    transform: scale(1.02);
    box-shadow: 0 8px 20px var(--shadow-color);
}

.game-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.game-preview:hover .game-icon {
    transform: scale(1.1) rotate(5deg);
}

.play-btn {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 40px;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-size: 14px;
}

.play-btn:hover {
    transform: scale(1.05);
    background: var(--accent-hover);
    box-shadow: 0 0 20px var(--shadow-color);
}

/* Quick stats sections - sirf buttons ka hover */
.quick-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 30px;
    /* Section ka background change nahi hoga */
}

.quick-stats h4 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 10px;
    /* Heading ka koi hover effect nahi */
}

/* Social links section - sirf buttons ka hover */
.social-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 30px;
    /* Section ka background change nahi hoga */
}

.social-links h4 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 10px;
    /* Heading ka koi hover effect nahi */
}

/* Individual link/button hover effect - YAHI HAI MAIN CHANGE */
.social-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    padding: 8px 12px;
    border-radius: 8px;
    white-space: normal;
    word-wrap: break-word;
    display: block; /* Ensure full width clickable */
}

.social-link:hover {
    color: var(--accent-primary);
    background: var(--accent-light);
    transform: translateX(5px);
    border-left: 3px solid var(--accent-primary);
}

/* Dark mode support - sirf buttons ke liye */
[data-theme="dark"] .social-link:hover {
    background: var(--accent-light);
    color: var(--accent-primary);
}

[data-theme="dark"] .game-preview:hover {
    border-color: var(--accent-primary);
    background: var(--bg-secondary);
}

/* ================= FOOTER ================= */
.test-footer {
    margin-top: 60px;
    padding: 0;
    border-top: 2px solid var(--border-color);
    width: 100%;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 30px;
    padding: 40px 0;
    width: 100%;
}

.footer-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    flex: 1;
    min-width: 200px;
}

.footer-logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--accent-primary);
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 14px;
}

.footer-center {
    flex: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    min-width: 300px;
}

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(4, auto);
    gap: 15px 25px;
    justify-content: center;
}

.footer-links-grid a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.footer-links-grid a:hover {
    color: var(--accent-primary);
}

.footer-right {
    flex: 1;
    text-align: right;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
    min-width: 220px;
}

.footer-right p {
    margin-bottom: 5px;
}

.footer-right a {
    color: var(--accent-primary);
    text-decoration: none;
}

.footer-right a:hover {
    text-decoration: underline;
}

/* ================= DARK MODE TOGGLE ================= */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.theme-btn {
    background: var(--bg-card);
    border: 2px solid var(--border-strong);
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.theme-btn:hover {
    transform: scale(1.05);
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px var(--shadow-color);
}

/* ================= HIDDEN INPUT ================= */
.hidden-input {
    opacity: 0;
    position: fixed;
    pointer-events: none;
    width: 0;
    height: 0;
    top: 0;
    left: 0;
}

/* ================= FIXED POPUP STYLES ================= */

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 15px;
    box-sizing: border-box;
    backdrop-filter: blur(5px);
}

.timeup-popup {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 30px 25px;
    max-width: 550px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    text-align: center;
    border: 3px solid var(--accent-primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: popupFadeIn 0.3s ease;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    border: none;
    outline: none;
}

.popup-close:hover {
    background: var(--accent-primary);
    color: white;
    transform: rotate(90deg);
}

.popup-icon {
    font-size: 60px;
    margin-bottom: 15px;
    line-height: 1;
    display: flex;
    justify-content: center;
    gap: 15px;
    align-items: center;
}

.popup-icon .clock-icon {
    display: inline-block;
    animation: pop 0.5s ease;
}

.popup-icon .sparkles {
    display: inline-block;
    animation: sparkle 1s ease infinite;
}

.popup-icon .trophy-icon {
    display: inline-block;
    animation: trophy 1.5s ease infinite;
}

@keyframes pop {
    0% { transform: scale(0); }
    70% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes sparkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

@keyframes trophy {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(10deg); }
    75% { transform: rotate(-10deg); }
}

.popup-title {
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.title-emoji {
    font-size: 2rem;
}

.popup-message {
    color: var(--text-muted);
    margin-bottom: 25px;
    line-height: 1.6;
    font-size: 1rem;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 10px;
}

.popup-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
    background: var(--bg-secondary);
    padding: 20px 15px;
    border-radius: 20px;
    border: 2px solid var(--border-color);
}

.stat-item {
    text-align: center;
    min-width: 0;
}

.stat-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--accent-primary);
    line-height: 1.2;
    word-break: break-word;
}

.stat-divider {
    display: none;
}

.popup-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.popup-btn-primary,
.popup-btn-home {
    padding: 14px 20px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 150px;
    flex: 0 1 auto;
    border: 2px solid transparent;
}

.popup-btn-primary {
    background: var(--accent-primary);
    color: white;
}

.popup-btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(65, 105, 225, 0.3);
}

.popup-btn-home {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.popup-btn-home:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    border-color: var(--accent-primary);
}

.popup-footer {
    margin-top: 5px;
}

.popup-close-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 8px 16px;
    display: inline-block;
    transition: color 0.3s ease;
}

.popup-close-link:hover {
    color: var(--accent-primary);
    text-decoration: underline;
}

/* ================= PROGRESS ================= */
.typing-progress {
    margin-top: 15px;
    font-size: 1.1rem;
    color: var(--text-muted);
    text-align: right;
}

/* ================= RESPONSIVE FIXES ================= */
@media screen and (max-width: 1200px) {
    .test-layout {
        grid-template-columns: 200px 1fr 250px;
        gap: 20px;
    }
    
    .timer-display {
        font-size: 1.8rem;
        min-width: 90px;
    }
}

@media screen and (max-width: 992px) {
    .test-layout {
        grid-template-columns: 1fr;
    }
    
    .test-sidebar, 
    .test-right {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .main-header {
        flex-wrap: nowrap;
        gap: 5px;
    }
    
    .site-title {
        font-size: 1.5rem;
    }
    
    .login-btn {
        padding: 6px 15px;
        font-size: 13px;
    }
    
    .mobile-menu-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-left, .footer-right {
        align-items: center;
        text-align: center;
    }
    
    .footer-links-grid {
        grid-template-columns: repeat(2, auto);
    }
}

@media screen and (max-width: 768px) {
    .test-page {
        padding: 10px;
    }
    
    .main-header {
        padding: 10px 0;
    }
    
    .site-title {
        font-size: 1.3rem;
    }
    
    .login-btn {
        padding: 5px 12px;
        font-size: 12px;
    }
    
    .mobile-menu-btn {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .test-center {
        padding: 15px;
    }
    
    .timer-container {
        width: 100%;
        justify-content: center;
        padding: 5px 15px;
    }
    
    .timer-display {
        font-size: 1.5rem;
        min-width: 90px;
    }
    
    .mode-selector {
        gap: 5px;
    }
    
    .mode-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .pro-input-box {
        min-height: 240px;
        padding: 12px 15px;
    }
    
    .full-text {
        max-height: 150px;
    }
    
    .phone-current-word {
        font-size: 2.8rem;
    }
    
    .typing-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .progress-bar {
        width: 100%;
    }
}

@media screen and (max-width: 600px) {
    .timeup-popup {
        padding: 25px 20px;
    }
    
    .popup-title {
        font-size: 1.8rem;
    }
    
    .title-emoji {
        font-size: 1.8rem;
    }
    
    .popup-message {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }
    
    .popup-stats {
        padding: 15px 10px;
        gap: 10px;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .stat-value {
        font-size: 1.8rem;
    }
    
    .popup-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .popup-btn-primary,
    .popup-btn-home {
        width: 100%;
        min-width: auto;
        padding: 14px 20px;
    }
}

@media screen and (max-width: 480px) {
    .site-title {
        font-size: 1.1rem;
    }
    
    .login-btn {
        padding: 4px 10px;
        font-size: 11px;
        border-width: 1.5px;
    }
    
    .mobile-menu-btn {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .test-center h1 {
        font-size: 1.2rem;
    }
    
    .timer-display {
        font-size: 1.2rem;
        min-width: 80px;
    }
    
    .mode-btn {
        width: 100%;
        padding: 8px 5px;
        font-size: 12px;
    }
    
    .footer-links-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .footer-links-grid a {
        font-size: 12px;
    }
    
    .footer-left, .footer-right {
        width: 100%;
    }
    
    .footer-copyright {
        font-size: 12px;
    }
    
    .footer-right p {
        font-size: 12px;
    }
    
    .pro-input-box {
        min-height: 200px;
        padding: 10px 12px;
    }
    
    .phone-current-word {
        font-size: 2.2rem;
    }
    
    .timeup-popup {
        padding: 20px 15px;
        margin: 10px;
    }
    
    .popup-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 12px;
        background: var(--bg-card);
        border-radius: 12px;
    }
    
    .stat-label {
        margin-bottom: 0;
        font-size: 0.9rem;
    }
    
    .stat-value {
        font-size: 1.6rem;
    }
}

@media screen and (max-width: 360px) {
    .site-title {
        font-size: 1rem;
    }
    
    .login-btn {
        padding: 3px 8px;
        font-size: 10px;
    }
    
    .mobile-menu-btn {
        padding: 3px 6px;
        font-size: 10px;
    }
    
    .timer-display {
        font-size: 1rem;
        min-width: 70px;
    }
    
    .phone-current-word {
        font-size: 1.8rem;
    }
    
    .pro-input-box {
        min-height: 180px;
    }
    
    .timeup-popup {
        padding: 15px 12px;
    }
    
    .popup-title {
        font-size: 1.5rem;
    }
    
    .popup-message {
        font-size: 0.85rem;
    }
    
    .popup-btn-primary,
    .popup-btn-home {
        padding: 12px 16px;
        font-size: 0.85rem;
    }
}

/* ================= FOOTER - PHONE FIXES for 30_minutes.css ================= */

/* Add/Replace these styles at the end of your existing media queries */

@media screen and (max-width: 992px) {
    .test-page {
        padding: 10px !important;
        overflow-x: hidden !important;
    }
    
    .test-center {
        padding: 15px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .footer-container {
        padding: 30px 15px !important;
    }
}

@media screen and (max-width: 768px) {
    /* Previous styles remain same until footer */
    
    .footer-container {
        padding: 30px 15px !important;
        gap: 25px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .footer-left {
        width: 100%;
        text-align: center;
        align-items: center;
    }
    
    .footer-center {
        width: 100%;
        min-width: auto;
        padding: 0 10px;
        box-sizing: border-box;
    }
    
    /* FIX: Footer links grid for tablets */
    .footer-links-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 12px 10px !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }
    
    .footer-links-grid a {
        font-size: 13px !important;
        padding: 8px 5px !important;
        text-align: center !important;
        background: var(--bg-card);
        border-radius: 8px;
        border: 1px solid var(--border-color);
        white-space: normal !important;
        word-break: break-word !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: 40px;
        width: 100% !important;
        box-sizing: border-box !important;
        transition: all 0.2s ease;
        box-shadow: 0 2px 4px var(--shadow-color);
    }
    
    .footer-links-grid a:hover {
        background: var(--accent-light);
        color: var(--accent-primary);
        transform: translateY(-2px);
        border-color: var(--accent-primary);
    }
    
    .footer-right {
        width: 100%;
        text-align: center;
        padding: 0 15px;
        box-sizing: border-box;
    }
    
    .footer-right p {
        font-size: 12px;
        word-break: break-word;
    }
}

@media screen and (max-width: 600px) {
    /* Adjust popup for better mobile view */
    .timeup-popup {
        padding: 20px 15px !important;
        margin: 10px !important;
        max-width: 95% !important;
    }
    
    .popup-icon {
        gap: 8px !important;
    }
    
    .popup-icon .clock-icon,
    .popup-icon .sparkles,
    .popup-icon .trophy-icon {
        font-size: 2.5rem !important;
    }
    
    .popup-buttons {
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    .popup-btn-primary,
    .popup-btn-home {
        width: 100% !important;
        min-width: auto !important;
        padding: 12px 16px !important;
        font-size: 0.9rem !important;
    }
    
    .popup-stats {
        padding: 12px 10px !important;
    }
}

@media screen and (max-width: 480px) {
    /* Previous styles remain same until footer */
    
    .footer-container {
        padding: 25px 12px !important;
    }
    
    .footer-center {
        padding: 0 5px;
    }
    
    /* FIX: Footer links grid for small phones */
    .footer-links-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px 8px !important;
    }
    
    .footer-links-grid a {
        font-size: 12px !important;
        padding: 8px 4px !important;
        min-height: 38px;
        background: var(--bg-card);
        border-radius: 6px;
    }
    
    .footer-left .footer-logo {
        font-size: 20px !important;
    }
    
    .footer-copyright {
        font-size: 11px !important;
    }
    
    .footer-right p {
        font-size: 11px !important;
        margin: 5px 0;
    }
    
    /* Fix for timer display on small phones */
    .timer-display {
        min-width: 70px !important;
        font-size: 1.1rem !important;
    }
    
    /* Ensure typing stats don't overflow */
    .typing-stats {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
        padding: 12px !important;
    }
    
    .typing-stats .stat-item {
        font-size: 1rem !important;
        padding: 6px 12px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        text-align: center !important;
    }
    
    .progress-bar {
        width: 100% !important;
        min-width: auto !important;
    }
}

@media screen and (max-width: 400px) {
    /* Popup stats fix - already there but ensure it works */
    .popup-stats {
        grid-template-columns: 1fr !important;
        padding: 12px 10px !important;
    }
    
    .stat-item {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 8px 12px !important;
        background: var(--bg-card);
        border-radius: 8px;
    }
    
    .stat-label {
        margin-bottom: 0 !important;
        font-size: 0.9rem !important;
    }
    
    .stat-value {
        font-size: 1.5rem !important;
    }
    
    /* Footer adjustments for very small phones */
    .footer-links-grid {
        gap: 8px 5px !important;
    }
    
    .footer-links-grid a {
        font-size: 11px !important;
        padding: 6px 3px !important;
        min-height: 36px;
    }
}

@media screen and (max-width: 360px) {
    /* Previous styles remain same until footer */
    
    .footer-container {
        padding: 20px 8px !important;
    }
    
    .footer-links-grid a {
        font-size: 11px !important;
        padding: 6px 3px !important;
        min-height: 36px;
    }
    
    .footer-left .footer-logo {
        font-size: 18px !important;
    }
    
    .footer-copyright {
        font-size: 10px !important;
    }
    
    .footer-right p {
        font-size: 10px !important;
    }
    
    /* Further reduce timer size */
    .timer-display {
        min-width: 60px !important;
        font-size: 1rem !important;
    }
    
    /* Adjust mode buttons */
    .mode-btn {
        padding: 6px 4px !important;
        font-size: 11px !important;
    }
    
    /* Popup adjustments */
    .popup-title {
        font-size: 1.3rem !important;
    }
    
    .popup-message {
        font-size: 0.8rem !important;
    }
    
    .stat-value {
        font-size: 1.3rem !important;
    }
}

@media screen and (max-width: 320px) {
    /* FIX: Stack vertically on very small screens */
    .footer-links-grid {
        grid-template-columns: 1fr !important;
        gap: 6px !important;
    }
    
    .footer-links-grid a {
        font-size: 12px !important;
        padding: 8px 5px !important;
        min-height: 40px;
    }
    
    /* Ensure phone mode word is readable */
    .phone-current-word {
        font-size: 1.5rem !important;
    }
    
    .phone-current-word .cursor-blink {
        height: 2.5rem !important;
    }
    
    /* Timer on smallest screens */
    .timer-display {
        min-width: 50px !important;
        font-size: 0.9rem !important;
    }
    
    .timer-icon {
        font-size: 1rem !important;
        margin-right: 4px !important;
    }
}

/* Fix for main container padding on all mobile screens */
@media screen and (max-width: 768px) {
    .test-page {
        padding: 8px !important;
    }
    
    .test-center {
        padding: 12px !important;
    }
    
    .typing-box {
        padding: 12px !important;
        min-height: 250px !important;
    }
    
    .pro-input-box {
        padding: 10px !important;
        min-height: 220px !important;
    }
    
    .lines-container {
        min-height: 220px !important;
    }
}

/* Ensure footer doesn't overflow on any screen */
@media screen and (max-width: 480px) {
    .footer-links-grid a {
        word-break: break-word !important;
        hyphens: auto !important;
    }
}


/* Mobile Keyboard Alert - Compact Version */
.mobile-keyboard-alert {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 15px;
    box-sizing: border-box;
}

.mobile-keyboard-alert.show {
    display: flex;
}

.alert-content {
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 20px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    animation: fadeInUp 0.3s ease;
}

.alert-icon {
    text-align: center;
    font-size: 36px;
    margin-bottom: 10px;
}

.alert-title {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 12px;
}

.alert-message {
    text-align: center;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 18px;
    opacity: 0.9;
}

.steps-container {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 18px;
}

.step-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.step-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.step-number {
    width: 24px;
    height: 24px;
    background: var(--accent-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.step-text {
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.4;
    text-align: left;
    flex: 1;
}

.step-text strong {
    color: var(--accent-primary);
    font-size: 14px;
    display: block;
    margin-bottom: 2px;
}

.alert-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 12px;
}

.alert-btn-primary {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 120px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.alert-btn-primary:active {
    transform: scale(0.98);
}

.alert-btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 12px 20px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 120px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.alert-btn-secondary:active {
    background: var(--bg-tertiary);
}

.dont-show-again {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-color);
}

.dont-show-again input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--accent-primary);
}

.dont-show-again label {
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Small phones ke liye */
@media (max-width: 380px) {
    .alert-content {
        padding: 15px;
    }
    
    .alert-title {
        font-size: 18px;
    }
    
    .step-text {
        font-size: 12px;
    }
    
    .alert-buttons {
        flex-direction: column;
    }
    
    .alert-btn-primary,
    .alert-btn-secondary {
        width: 100%;
    }
}

/* Desktop par show, mobile par hide */
.desktop-only {
    display: flex !important;
}

/* Mobile devices (max-width: 768px) */
@media screen and (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
}
/* Responsive heading */
.responsive-heading {
    font-size: 2rem; /* Desktop size */
    margin: 0;
}

/* Mobile devices (max-width: 768px) */
@media screen and (max-width: 768px) {
    .responsive-heading {
        font-size: 1.5rem; /* Mobile size - chota */
    }
}

/* Desktop par show, mobile par hide */
.mobile-hide {
    display: block;
}

/* Mobile devices (max-width: 768px) */
@media screen and (max-width: 768px) {
    .mobile-hide {
        display: none !important;
    }
}