/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f5f5f7;
    color: #1d1d1f;
    min-height: 100vh;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    overflow-x: hidden;
}

/* ===== THEMES ===== */
[data-theme="dark"] {
    background: #1d1d1f;
    color: #f5f5f7;
}

[data-theme="dark"] .header {
    background: linear-gradient(135deg, #2c3e50, #34495e);
}

[data-theme="dark"] .question-card {
    background: #2c2c2e;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .option {
    background: #3a3a3c;
}

[data-theme="dark"] .batch-controls {
    background: #2c2c2e;
}

[data-theme="dark"] .action-btn.secondary {
    background: #3a3a3c;
    color: #f5f5f7;
}

[data-theme="dark"] .nav-btn {
    background: #3a3a3c;
    color: #f5f5f7;
}

[data-theme="dark"] .mobile-nav {
    border-top-color: #3a3a3c;
}

[data-theme="dark"] .modal-content {
    background: #2c2c2e;
}

[data-theme="dark"] .modal-header {
    border-bottom-color: #3a3a3c;
}

[data-theme="dark"] .share-url {
    background: #3a3a3c;
    border-color: #3a3a3c;
}

[data-theme="dark"] .stat-card {
    background: #3a3a3c;
}

[data-theme="dark"] .batch-item {
    background: #3a3a3c;
}

[data-theme="dark"] .settings-option {
    border-bottom-color: #3a3a3c;
}

/* ===== LOADING ===== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-text {
    color: white;
    font-size: 18px;
    font-weight: 500;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== ERROR ===== */
.error-message {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #ff3b30;
    color: white;
    padding: 12px 16px;
    text-align: center;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    z-index: 10000;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* ===== SYNC ===== */
.sync-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #4cd964;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    display: none;
    align-items: center;
    gap: 8px;
    z-index: 1000;
    animation: fadeInOut 2s ease;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* ===== CONTAINER ===== */
.container {
    max-width: 800px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== HEADER ===== */
.header {
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    color: white;
    padding: 20px 16px 16px;
    border-radius: 0 0 24px 24px;
    margin-bottom: 20px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.title {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 16px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ===== QUICK STATS ===== */
.quick-stats {
    display: flex;
    justify-content: space-around;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 12px;
    backdrop-filter: blur(10px);
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-number.correct {
    color: #4cd964;
}

.stat-number.wrong {
    color: #ff3b30;
}

.stat-label {
    font-size: 12px;
    opacity: 0.8;
}

/* ===== PROGRESS BAR ===== */
.progress-container {
    height: 8px;
    background: #e5e5ea;
    margin: 0 16px 20px;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 100%;
    position: relative;
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #4361ee, #7209b7);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    padding: 0 16px;
    padding-bottom: 80px; /* Space for bottom nav */
}

/* ===== MODE SELECTOR ===== */
.mode-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.mode-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid #e5e5ea;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 500;
    color: #1d1d1f;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mode-btn.active {
    background: #4361ee;
    border-color: #4361ee;
    color: white;
}

/* ===== QUESTION AREA ===== */
.question-area {
    margin-bottom: 20px;
}

.question-card {
    background: white;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.question-label {
    font-size: 14px;
    color: #8e8e93;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.question {
    font-size: min(48px, 10vw);
    font-weight: 700;
    text-align: center;
    margin: 0;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "PingFang SC", "Hiragino Sans GB", sans-serif;
    word-break: break-all;
    hyphens: auto;
}

/* ===== FEEDBACK ===== */
.feedback {
    padding: 12px;
    border-radius: 12px;
    margin: 16px 0;
    text-align: center;
    font-weight: 500;
    display: none;
    min-height: 60px;
    align-items: center;
    justify-content: center;
}

.feedback.correct {
    background: rgba(76, 217, 100, 0.1);
    color: #4cd964;
    border: 1px solid #4cd964;
}

.feedback.incorrect {
    background: rgba(255, 59, 48, 0.1);
    color: #ff3b30;
    border: 1px solid #ff3b30;
}

/* ===== OPTIONS ===== */
.options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 24px 0;
}

.option {
    background: #f2f2f7;
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.option:active {
    transform: scale(0.98);
}

.option.selected {
    background: #4361ee;
    color: white;
    border-color: #4361ee;
}

.option.correct {
    background: #4cd964;
    color: white;
    border-color: #4cd964;
    animation: pulse 0.6s ease;
}

.option.incorrect {
    background: #ff3b30;
    color: white;
    border-color: #ff3b30;
    animation: shake 0.5s ease;
}

.option-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.option-text {
    font-size: 18px;
    font-weight: 500;
    line-height: 1.4;
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
}

.option-pinyin {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
    text-align: center;
}

.option-english {
    font-size: 14px;
    color: #666;
    text-align: center;
    line-height: 1.3;
}

[data-theme="dark"] .option-english {
    color: #aaa;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ===== MOBILE NAV ===== */
.mobile-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e5e5ea;
}

.nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f2f2f7;
    border: none;
    color: #1d1d1f;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.nav-btn:not(:disabled):hover {
    background: #e5e5ea;
}

.progress-info {
    font-size: 16px;
    font-weight: 500;
    color: #8e8e93;
}

/* ===== BATCH CONTROLS ===== */
.batch-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.batch-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 500;
}

.batch-size {
    display: flex;
    align-items: center;
    gap: 8px;
}

.batch-size select {
    padding: 8px 12px;
    border: 1px solid #e5e5ea;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    color: #1d1d1f;
    cursor: pointer;
}

/* ===== ACTION BUTTONS ===== */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.action-btn {
    padding: 16px;
    border-radius: 16px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 52px;
}

.action-btn.primary {
    background: #4361ee;
    color: white;
}

.action-btn.primary:hover:not(:disabled) {
    background: #3a56d4;
}

.action-btn.secondary {
    background: #f2f2f7;
    color: #1d1d1f;
}

.action-btn.secondary:hover:not(:disabled) {
    background: #e5e5ea;
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-text {
    display: none;
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e5e5ea;
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    display: flex;
    justify-content: space-around;
    z-index: 100;
}

.nav-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: #8e8e93;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    flex: 1;
    transition: color 0.2s ease;
}

.nav-icon span {
    font-size: 11px;
    font-weight: 500;
}

.nav-icon.active {
    color: #4361ee;
}

.nav-icon:hover:not(:disabled) {
    color: #4361ee;
}

/* ===== MODALS ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e5ea;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #8e8e93;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: #1d1d1f;
}

.modal-body {
    padding: 24px;
    max-height: calc(80vh - 73px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Share Modal Specific */
.share-url-container {
    display: flex;
    gap: 8px;
    margin: 20px 0;
}

.share-url {
    flex: 1;
    padding: 12px;
    background: #f2f2f7;
    border: 1px solid #e5e5ea;
    border-radius: 12px;
    font-size: 14px;
    word-break: break-all;
    max-height: 80px;
    overflow-y: auto;
}

.qr-container {
    text-align: center;
    margin: 20px 0;
    padding: 16px;
    background: white;
    border-radius: 12px;
    display: inline-block;
}

.share-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

/* Analysis Modal Specific */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: #f2f2f7;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: #8e8e93;
}

.batch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 8px;
    margin: 20px 0;
}

.batch-item {
    padding: 12px;
    background: #f2f2f7;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.batch-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.batch-item.current {
    background: #4361ee;
    color: white;
}

.batch-item.completed {
    background: #4cd964;
    color: white;
}

/* Settings Modal Specific */
.settings-section {
    margin-bottom: 24px;
}

.settings-section h4 {
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 600;
}

.settings-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e5e5ea;
}

.settings-option:last-child {
    border-bottom: none;
}

.settings-label {
    font-weight: 500;
    font-size: 15px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #4361ee;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (min-width: 768px) {
    .question {
        font-size: 56px;
    }

    .options {
        grid-template-columns: repeat(2, 1fr);
    }

    .btn-text {
        display: inline;
    }

    .bottom-nav {
        position: static;
        background: none;
        border-top: none;
        padding: 20px 0;
        padding-bottom: 0;
    }

    .nav-icon {
        font-size: 20px;
        flex-direction: row;
        gap: 8px;
        justify-content: center;
        padding: 12px;
        border-radius: 12px;
        background: #f2f2f7;
    }

    .nav-icon span {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .question {
        font-size: 36px;
        min-height: 50px;
        margin: 16px 0;
    }

    .option {
        padding: 14px;
        min-height: 80px;
    }

    .option-pinyin {
        font-size: 16px;
    }

    .option-english {
        font-size: 13px;
    }

    .action-buttons {
        grid-template-columns: repeat(3, 1fr);
    }

    .btn-text {
        display: none;
    }

    .action-btn {
        padding: 16px 8px;
        font-size: 14px;
    }

    .modal-content {
        max-height: 85vh;
        margin: 10px;
    }

    .stat-number {
        font-size: 20px;
    }

    .batch-controls {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .batch-size {
        width: 100%;
        justify-content: space-between;
    }

    .batch-size select {
        flex: 1;
        max-width: 150px;
    }
}

/* Landscape Mode */
@media (max-height: 600px) and (orientation: landscape) {
    .question {
        font-size: 32px;
        min-height: 40px;
        margin: 12px 0;
    }

    .options {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin: 16px 0;
    }

    .option {
        padding: 12px;
        min-height: 70px;
    }

    .main-content {
        padding-bottom: 60px;
    }

    .bottom-nav {
        padding: 8px 16px;
        padding-bottom: calc(8px + env(safe-area-inset-bottom));
    }
}

/* iPhone Notch/Pill Support */
@supports (padding: max(0px)) {
    .header {
        padding-top: max(20px, env(safe-area-inset-top));
    }

    .bottom-nav {
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }
}

/* Prevent zoom on mobile input */
@media (max-width: 768px) {
    .option {
        font-size: 16px;
    }

    select, button, .mode-btn {
        font-size: 16px;
    }
}

/* Enhanced touch targets for mobile */
@media (max-width: 768px) {
    .option {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    .action-btn, .mode-btn, .nav-icon {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    .option-content {
        pointer-events: none;
    }
}
/* ===== SPEAKER BUTTON ===== */
.question-with-speaker {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 20px 0;
    position: relative;
    z-index: 1;
}

.speaker-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #4361ee;
    background: transparent;
    color: #4361ee;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    position: relative;
    z-index: 2;
}

.speaker-btn * {
    pointer-events: none;
}

.speaker-btn:hover {
    background: #4361ee;
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.35);
}

.speaker-btn:active {
    transform: scale(0.95);
}

.speaker-btn.speaking {
    background: #4361ee;
    color: #fff;
    animation: pulse-speaker 0.8s ease-in-out infinite;
}

.speaker-btn.not-supported {
    opacity: 0.35;
    cursor: not-allowed;
    border-color: #8e8e93;
    color: #8e8e93;
}

@keyframes pulse-speaker {
    0%   { box-shadow: 0 0 0 0 rgba(67, 97, 238, 0.5); }
    70%  { box-shadow: 0 0 0 10px rgba(67, 97, 238, 0); }
    100% { box-shadow: 0 0 0 0 rgba(67, 97, 238, 0); }
}

/* Dark theme adjustments */
[data-theme="dark"] .speaker-btn {
    border-color: #6c8aff;
    color: #6c8aff;
}

[data-theme="dark"] .speaker-btn:hover,
[data-theme="dark"] .speaker-btn.speaking {
    background: #6c8aff;
    color: #fff;
    box-shadow: 0 4px 12px rgba(108, 138, 255, 0.35);
}


/* ===== LEVEL PICKER SCREEN ===== */
.level-picker-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    overflow-y: auto;
    padding: env(safe-area-inset-top) env(safe-area-inset-right)
             env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.level-picker-inner {
    width: 100%;
    max-width: 700px;
    padding: 32px 20px 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.level-picker-header {
    text-align: center;
    color: white;
}

.level-picker-header i {
    font-size: 52px;
    margin-bottom: 14px;
    display: block;
    opacity: 0.9;
}

.level-picker-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.level-picker-header p {
    font-size: 16px;
    opacity: 0.75;
    font-weight: 400;
}

/* Grid of level cards */
.level-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    width: 100%;
}

/* Individual level card */
.level-card {
    background: rgba(255, 255, 255, 0.07);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 22px 16px 18px;
    text-align: center;
    cursor: pointer;
    transition: all 0.22s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    color: white;
    backdrop-filter: blur(8px);
}

.level-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(67,97,238,0.3), rgba(114,9,183,0.3));
    opacity: 0;
    transition: opacity 0.22s ease;
    border-radius: inherit;
}

.level-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.level-card:hover::before {
    opacity: 1;
}

.level-card:active {
    transform: scale(0.97);
}

.level-card-badge {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

.level-card-words {
    font-size: 13px;
    opacity: 0.7;
    position: relative;
    z-index: 1;
}

.level-card-new {
    font-size: 11px;
    font-weight: 600;
    background: rgba(67, 97, 238, 0.6);
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

.level-card-progress {
    font-size: 11px;
    opacity: 0.75;
    background: rgba(76, 217, 100, 0.2);
    border: 1px solid rgba(76, 217, 100, 0.4);
    padding: 4px 10px;
    border-radius: 20px;
    line-height: 1.4;
    position: relative;
    z-index: 1;
    color: #a8f0b8;
}

/* Responsive tweaks for small screens */
@media (max-width: 480px) {
    .level-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .level-picker-header h1 {
        font-size: 22px;
    }

    .level-card {
        padding: 18px 12px 14px;
    }

    .level-card-badge {
        font-size: 17px;
    }
}