/* Save Deck Success/Error Messages */
.save-deck-success-message,
.save-deck-error-message {
    position: relative;
    margin-bottom: 24px;
    padding: 20px 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.save-deck-success-message {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8f4 100%);
    border: 2px solid #4caf50;
}

.save-deck-error-message {
    background: linear-gradient(135deg, #ffebee 0%, #fce4ec 100%);
    border: 2px solid #f44336;
}

.success-icon-large,
.error-icon-large {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    font-weight: 700;
    flex-shrink: 0;
}

.success-icon-large {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
}

.error-icon-large {
    background: linear-gradient(135deg, #f44336 0%, #e53935 100%);
    color: white;
}

.success-message-text,
.error-message-text {
    flex: 1;
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.4;
}

.success-message-text {
    color: #2e7d32;
}

.error-message-text {
    color: #c62828;
}

/* Loading Modal for Generate Cards */
.loading-modal-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: 10001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loading-modal-content {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.loading-spinner-large {
    border: 4px solid rgba(127, 168, 154, 0.2);
    border-top: 4px solid var(--accent-primary);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 0 auto 24px;
}

.loading-modal-title {
    font-size: 1.5em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.loading-modal-message {
    font-size: 1em;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* CRITICAL: Hide flashcard page and modal immediately to prevent flash - must be first */
#createFlashcardDeckPage {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
}

#createFlashcardDeckPage:not(.hidden) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
    position: relative !important;
    left: auto !important;
}

#createFlashcardDeckPage .create-flashcard-deck-container {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

#createFlashcardDeckPage:not(.hidden) .create-flashcard-deck-container {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* CRITICAL: Hide card editor modal - must override all other rules */
#cardEditorModal.card-editor-modal,
#cardEditorModal.card-editor-modal.hidden,
body #cardEditorModal,
html body #cardEditorModal {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: -1 !important;
}

#cardEditorModal.card-editor-modal:not(.hidden) {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 10000 !important;
}

#cardEditorModal .card-editor-modal-overlay,
#cardEditorModal .card-editor-modal-content {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

#cardEditorModal:not(.hidden) .card-editor-modal-overlay,
#cardEditorModal:not(.hidden) .card-editor-modal-content {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Variables for Light/Dark Mode */
:root {
    /* Light mode colors - chill minimalist platypus vibe */
    --bg-primary: #FAF7F2;
    --bg-secondary: #FAF7F2;
    --bg-tertiary: #FAF7F2;
    --bg-card: white;
    --text-primary: #2F2F2F;
    --text-secondary: #6B6B6B;
    --text-tertiary: #6B6B6B;
    --text-muted: #6B6B6B;
    --border-color: #E6E2DA;
    --shadow: rgba(47, 47, 47, 0.08);
    --shadow-soft: rgba(47, 47, 47, 0.04);
    --accent-primary: #7FA89A;
    --accent-secondary: #5E8578;
    --accent-gradient: linear-gradient(135deg, #7FA89A 0%, #5E8578 100%);
    --success-color: #8FBFB0;
    --error-color: #D89A9A;
    --warning-color: #E6C79C;
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
}

/* Dark mode colors - keeping calm vibe */
[data-theme="dark"] {
    --bg-primary: #2F2F2F;
    --bg-secondary: #2F2F2F;
    --bg-tertiary: #3A3A3A;
    --bg-card: #3A3A3A;
    --text-primary: #FAF7F2;
    --text-secondary: #B8B8B8;
    --text-tertiary: #8F8F8F;
    --text-muted: #6B6B6B;
    --border-color: #4A4A4A;
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-soft: rgba(0, 0, 0, 0.15);
    --accent-primary: #8FBFB0;
    --accent-secondary: #7FA89A;
    --accent-gradient: linear-gradient(135deg, #8FBFB0 0%, #7FA89A 100%);
    --success-color: #8FBFB0;
    --error-color: #D89A9A;
    --warning-color: #E6C79C;
}

/* Smooth transitions for theme switching */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Exclude interactive elements from full transition */
input, textarea, button, a, img, svg {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-primary);
    min-height: 100vh;
    padding: 0;
    margin: 0;
    padding-top: 56px;
    padding-left: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    overflow-x: hidden;
    color: var(--text-primary);
    transition: background 0.3s ease, color 0.3s ease;
}

/* Top nav (replaces sidebar) */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    padding-top: env(safe-area-inset-top);
    min-height: calc(56px + env(safe-area-inset-top));
    background: var(--bg-secondary);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px var(--shadow);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.top-nav.hidden {
    display: none;
    visibility: hidden;
    opacity: 0;
}

.top-nav-left {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 1;
    min-width: 0;
    overflow: visible;
}

.top-nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-primary);
    flex-shrink: 0;
}

.top-nav-logo:hover {
    opacity: 0.9;
}

.sidebar-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.top-nav-brand {
    color: var(--accent-primary);
    font-size: 1.25rem;
    font-weight: 600;
    text-transform: lowercase;
    white-space: nowrap;
}

.top-nav-brand-short {
    display: none;
}

.top-nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
}

.top-nav-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
}

.top-nav-link:hover {
    background: var(--bg-tertiary);
    color: var(--accent-primary);
}

.top-nav-link.active {
    background: var(--accent-primary);
    color: white;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 10px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    font-family: inherit;
}

.nav-dropdown-trigger:hover {
    background: var(--bg-tertiary);
    color: var(--accent-primary);
}

.nav-dropdown-trigger[aria-expanded="true"] {
    background: var(--bg-tertiary);
    color: var(--accent-primary);
}

.nav-dropdown-chevron {
    font-size: 0.7em;
    opacity: 0.8;
}

.nav-dropdown-panel {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    margin-top: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 24px var(--shadow);
    padding: 6px;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
}

.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown.open .nav-dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-panel .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    cursor: pointer;
    font-size: 0.9rem;
    width: 100%;
    text-align: left;
    border: none;
    background: none;
    font-family: inherit;
}

.nav-dropdown-panel .nav-item:hover {
    background: var(--bg-tertiary);
    color: var(--accent-primary);
}

.top-nav-links .nav-icon {
    font-size: 1.1em;
}

.top-nav-auth {
    display: flex;
    align-items: center;
    gap: 4px;
}

.top-nav-right {
    position: static;
    left: auto;
    right: auto;
    height: auto;
    padding: 0;
    box-shadow: none;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-nav-right .points-display {
    flex: 0 1 auto;
}

.top-nav-right .xp-progress-bar {
    min-width: 120px;
    max-width: 180px;
}

.nav-icon {
    font-size: 1.1em;
}

.nav-text {
    font-weight: 500;
    font-size: inherit;
}

.mobile-menu-header {
    display: none;
}

.main-content {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: calc(100vh - 80px);
}

.page {
    width: 100%;
    max-width: 100%;
    padding: 0;
    position: relative;
}

/* Full-screen pages (with top nav) */
#uploadFlashcardDeckPage,
#manualFlashcardDeckPage,
#aiGuidedFlashcardDeckPage,
#createFlashcardDeckPage,
#createHubPage,
#createStandaloneDeckPage,
#createStandaloneTestPage,
#createStandaloneTranslationPage,
#takePracticeTestPage,
#deckEditorPage {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
    min-height: 100vh;
    position: relative;
    left: 0 !important;
}

#homePage {
    padding: 0;
    max-width: 100%;
}

.points-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    transition: background 0.3s ease;
}

/* Ensure all buttons are clickable */
button {
    position: relative;
    z-index: 10;
    pointer-events: auto !important;
    cursor: pointer !important;
}

.points-display {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

/* XP System - Compact, non-blocking design */
.xp-container {
    display: flex;
    flex-direction: row; /* Horizontal layout for compactness */
    align-items: center;
    gap: 16px; /* Spacing between elements */
    width: auto; /* Don't take full width */
    flex-wrap: wrap; /* Wrap on smaller screens */
}

.xp-info {
    display: flex;
    align-items: baseline;
    gap: 8px; /* Tighter spacing */
}

.xp-label {
    font-size: 0.75em;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.xp-value {
    font-size: 1.4em; /* Smaller for compactness */
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.3px;
    white-space: nowrap;
}

.level-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px; /* More compact */
    background: var(--accent-gradient);
    color: white;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 700;
    box-shadow: 0 2px 6px var(--shadow-soft);
}

.xp-progress-bar {
    flex: 1;
    min-width: 200px; /* Minimum width for progress bar */
    max-width: 300px; /* Don't let it get too wide */
    height: 6px; /* Thinner bar */
    background: rgba(224, 224, 224, 0.4);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.xp-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #7FA89A 0%, #5E8578 100%);
    border-radius: 10px;
    transition: width 0.5s ease;
    width: 0%;
    box-shadow: 0 0 8px rgba(127, 168, 154, 0.3);
    position: relative;
}

.xp-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.xp-to-next {
    font-size: 0.65em;
    color: var(--text-muted);
    white-space: nowrap; /* Keep on one line */
    font-weight: 500;
    transition: color 0.3s ease;
}

.user-display {
    display: flex;
    align-items: center;
    gap: 15px;
}

.dark-mode-toggle {
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 36px;
}

.dark-mode-toggle:hover {
    background: var(--bg-card);
    transform: scale(1.1);
}

.dark-mode-icon {
    transition: transform 0.3s ease;
}

[data-theme="dark"] .dark-mode-icon {
    transform: rotate(180deg);
}

.user-name {
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 1em;
    transition: color 0.3s ease;
}

.signout-btn {
    padding: 8px 16px;
    background: var(--error-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.2s, transform 0.2s;
}

.signout-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
}

[data-theme="dark"] .signout-btn:hover {
    background: #f05565;
}

/* Removed old points-icon, points-label, points-value - replaced with XP system */

.container {
    background: var(--bg-card);
    border-radius: 1.5rem;
    padding: 40px;
    width: 100%;
    box-shadow: 0 2px 8px var(--shadow-soft);
    border: 1px solid var(--border-color);
    margin: 0 auto;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* Homepage Container */
.homepage-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Welcome Section */
.homepage-welcome {
    text-align: center;
    margin-bottom: 60px;
}

.welcome-content {
    max-width: 600px;
    margin: 0 auto;
}

.homepage-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin: 0 auto 30px;
    display: block;
}

/* Feature Preview (Public Homepage) */
.homepage-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
}

.feature-preview {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.feature-preview.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.feature-preview.clickable {
    cursor: pointer;
    opacity: 1;
    transition: all 0.2s;
}

.feature-preview.clickable:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.feature-icon {
    font-size: 2.5em;
    margin-bottom: 8px;
}

.feature-text {
    font-size: 1em;
    font-weight: 500;
    color: var(--text-primary);
    text-transform: lowercase;
}

.feature-status {
    font-size: 0.85em;
    color: var(--text-muted);
    text-transform: lowercase;
    font-style: italic;
}

/* Sign In CTA */
.homepage-cta {
    text-align: center;
    margin-top: 60px;
}

.cta-signin-btn {
    padding: 16px 32px;
    background: #7FA89A;
    color: white;
    border: none;
    border-radius: 1rem;
    font-size: 1.1em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    text-transform: lowercase;
    margin-bottom: 16px;
}

.cta-signin-btn:hover {
    background: #5E8578;
}

.cta-subtext {
    color: var(--text-secondary);
    font-size: 0.95em;
    text-transform: lowercase;
}

.cta-subtext a {
    color: #7FA89A;
    text-decoration: none;
}

.cta-subtext a:hover {
    text-decoration: underline;
}

/* Public Homepage Controls */
.public-homepage-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 12px;
    align-items: center;
}

.home-screen-toggle {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
    font-size: 1.2em;
}

.home-screen-toggle:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: scale(1.05);
}

.home-screen-toggle.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.toggle-icon {
    display: block;
}

/* Public Dark Mode Toggle (now inside controls) */
.public-homepage-controls .dark-mode-toggle {
    margin: 0;
}

.auth-dark-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

.welcome-title {
    font-size: 2.5em;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 12px;
    text-transform: lowercase;
    letter-spacing: -0.5px;
}

.welcome-subtitle {
    font-size: 1.1em;
    color: var(--text-secondary);
    font-weight: 400;
    text-transform: lowercase;
}

/* Stats Overview */
.homepage-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 30px 20px;
    text-align: center;
    transition: border-color 0.2s;
}

.stat-card:hover {
    border-color: #7FA89A;
}

.stat-value {
    font-size: 2.5em;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.9em;
    color: var(--text-secondary);
    text-transform: lowercase;
}

/* Actions Section */
.homepage-actions {
    margin-bottom: 60px;
}

.actions-title {
    font-size: 1.5em;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 30px;
    text-align: center;
    text-transform: lowercase;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.action-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.action-card:hover {
    background: #7FA89A;
    border-color: #7FA89A;
    color: white;
}

.action-card:hover .action-icon,
.action-card:hover .action-text {
    color: white;
}

.action-icon {
    font-size: 2.5em;
    margin-bottom: 8px;
}

.action-text {
    font-size: 1em;
    font-weight: 500;
    color: var(--text-primary);
    text-transform: lowercase;
}

.action-subtext {
    font-size: 0.85em;
    color: var(--text-secondary);
    text-transform: lowercase;
    font-style: italic;
    margin-top: 4px;
}

.action-card-primary {
    background: var(--accent-gradient);
    border: 2px solid var(--accent-primary);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(127, 168, 154, 0.3);
}

.action-card-primary .action-icon,
.action-card-primary .action-text,
.action-card-primary .action-subtext {
    color: white;
}

.action-card-primary:hover {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
    transform: scale(1.08);
    box-shadow: 0 6px 25px rgba(127, 168, 154, 0.4);
}

/* Homepage wireframe sections */
.home-hero {
    text-align: center;
    padding: var(--space-3xl) var(--space-lg) var(--space-2xl);
    margin-bottom: var(--space-2xl);
}
.home-hero-line1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--space-sm);
    letter-spacing: -0.02em;
}
.home-hero-line2 {
    font-size: clamp(1.15rem, 2.5vw, 1.5rem);
    color: var(--text-secondary);
    margin: 0 0 var(--space-xl);
    font-weight: 500;
}
.home-hero-cta {
    display: inline-block;
    padding: 16px 32px;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: var(--space-md);
    box-shadow: 0 4px 16px rgba(127, 168, 154, 0.35);
}
.home-hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(127, 168, 154, 0.4);
}
.home-hero-tagline {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    margin: 0;
}
.home-quick-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
}
.home-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: var(--space-lg) var(--space-md);
    text-align: center;
    transition: border-color 0.2s;
}
.home-stat-card:hover {
    border-color: var(--accent-primary);
}
.home-stat-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
    text-transform: lowercase;
}
.home-stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}
/* Lock-in Hub featured */
.home-lockin-featured {
    margin-bottom: var(--space-2xl);
}
.home-lockin-card {
    display: block;
    background: linear-gradient(135deg, rgba(127, 168, 154, 0.12) 0%, rgba(94, 133, 120, 0.08) 100%);
    border: 2px solid var(--accent-primary);
    border-radius: 16px;
    padding: var(--space-xl);
    text-decoration: none;
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.home-lockin-card:hover {
    border-color: var(--accent-secondary);
    box-shadow: 0 8px 24px rgba(127, 168, 154, 0.2);
    transform: translateY(-2px);
}
.home-lockin-badge {
    display: inline-block;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-primary);
    margin-bottom: var(--space-xs);
}
.home-lockin-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 var(--space-sm);
    color: var(--text-primary);
}
.home-lockin-desc {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0 0 var(--space-md);
    line-height: 1.5;
}
.home-lockin-cta {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--accent-primary);
}
.home-tool-card-featured {
    border-color: var(--accent-primary);
    background: linear-gradient(135deg, rgba(127, 168, 154, 0.08) 0%, transparent 100%);
}
.home-tool-card-featured:hover {
    border-color: var(--accent-secondary);
    background: linear-gradient(135deg, rgba(127, 168, 154, 0.15) 0%, rgba(127, 168, 154, 0.05) 100%);
}

.home-platypus {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: var(--space-xl);
    margin-bottom: var(--space-2xl);
}
.home-platypus-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}
.home-platypus-emoji { font-size: 1.75rem; }
.home-platypus-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}
.home-platypus-quote {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0 0 var(--space-lg);
    font-style: italic;
}
.home-platypus-level {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    margin-bottom: var(--space-xs);
}
.home-platypus-bar-wrap {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: var(--space-sm);
}
.home-platypus-bar {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 4px;
    transition: width 0.3s ease;
}
.home-platypus-xp {
    font-size: var(--text-xs);
    color: var(--text-muted);
}
.home-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--space-md);
}
.home-continue {
    margin-bottom: var(--space-2xl);
}
.home-continue-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: var(--space-xl);
}
.home-continue-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}
.home-continue-meta {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}
.home-continue-btn {
    padding: 10px 20px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}
.home-continue-btn:hover { background: var(--accent-secondary); }
.home-tools { margin-bottom: var(--space-2xl); }
.home-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-md);
}
.home-tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: var(--space-lg);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}
.home-tool-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}
.home-tool-icon { font-size: 1.5rem; }
.home-tool-name {
    font-weight: 600;
    color: var(--text-primary);
}
.home-tool-desc {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}
.home-recent { margin-bottom: var(--space-2xl); }
.home-recent-list { display: flex; flex-direction: column; gap: var(--space-sm); }
.home-recent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: var(--text-sm);
}
.home-recent-name { color: var(--text-primary); font-weight: 500; }
.home-recent-focus { color: var(--accent-primary); }
.home-recent-duration { color: var(--text-secondary); }
.home-xp-progress { margin-bottom: var(--space-2xl); }
.home-xp-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: var(--space-xl);
}
.home-xp-level {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}
.home-xp-next {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-top: var(--space-md);
    margin-bottom: var(--space-xs);
}
.home-xp-unlock { font-size: 1rem; color: var(--text-primary); }
.home-floating-cta {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 900;
    padding: 14px 24px;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(127, 168, 154, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}
.home-floating-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(127, 168, 154, 0.5);
}
@media (max-width: 768px) {
    .home-quick-stats { grid-template-columns: repeat(2, 1fr); gap: var(--space-sm); }
    .home-tools-grid { grid-template-columns: 1fr; }
    .home-hero { padding: var(--space-2xl) var(--space-md) var(--space-xl); }
    .home-hero-line1 { font-size: clamp(1.6rem, 6vw, 2.25rem); }
    .home-hero-line2 { font-size: clamp(1rem, 2.2vw, 1.2rem); margin-bottom: var(--space-lg); }
    .home-hero-cta { padding: 14px 24px; font-size: 1rem; }
    .home-stat-card { padding: var(--space-md) var(--space-sm); }
    .home-stat-value { font-size: 1.25rem; }
    .home-lockin-card { padding: var(--space-lg); }
    .home-lockin-title { font-size: 1.25rem; }
    #homePage .container { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
}

@media (max-width: 480px) {
    .top-nav-brand-full { display: none !important; }
    .top-nav-brand-short { display: inline !important; }
    .home-hero { padding: var(--space-xl) var(--space-sm) var(--space-lg); }
    .home-hero-line1 { font-size: clamp(1.4rem, 8vw, 1.85rem); }
    .home-hero-line2 { font-size: 0.95rem; }
    .home-hero-cta { padding: 12px 20px; font-size: 0.95rem; width: 100%; max-width: 280px; }
    .home-quick-stats { grid-template-columns: 1fr; gap: var(--space-sm); margin-bottom: var(--space-lg); }
    .home-stat-card { padding: var(--space-md) var(--space-lg); display: flex; align-items: center; justify-content: space-between; flex-direction: row; text-align: left; }
    .home-stat-label { margin-bottom: 0; }
    .home-stat-value { font-size: 1.1rem; }
    .home-lockin-card { padding: var(--space-md); }
    .home-lockin-title { font-size: 1.15rem; }
    .home-lockin-desc { font-size: 0.875rem; }
    .home-platypus { padding: var(--space-md); }
    .home-floating-cta { bottom: max(16px, env(safe-area-inset-bottom)); right: max(16px, env(safe-area-inset-right)); padding: 12px 20px; font-size: 0.9rem; }
    #homePage .container { padding: 16px 12px; padding-bottom: max(100px, calc(env(safe-area-inset-bottom) + 80px)); }
}

/* Comic Strip */
.comic-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 60px 0;
    padding: 30px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 1.5rem;
    box-shadow: 0 4px 12px var(--shadow-soft);
}

.comic-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 25px 15px;
    background: var(--bg-tertiary);
    border-radius: 1rem;
    position: relative;
    min-height: 220px;
}

.comic-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
    height: 100%;
}

.step-icon {
    font-size: 2.5em;
    margin-bottom: 5px;
}

.step-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.comic-avatar.single img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border-radius: 50%;
    border: 3px solid #7FA89A;
    background: var(--bg-card);
    padding: 6px;
    box-shadow: 0 4px 12px rgba(127, 168, 154, 0.3);
}

.step-text {
    font-size: 1em;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    text-transform: lowercase;
}

.step-detail {
    font-size: 0.8em;
    color: var(--text-secondary);
    text-align: center;
    text-transform: lowercase;
    font-style: italic;
}

.analysis-bubbles {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.analysis-item {
    background: var(--bg-card);
    border: 2px solid #7FA89A;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.75em;
    color: var(--text-primary);
    text-align: center;
    text-transform: lowercase;
    font-weight: 500;
}

.points-breakdown {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.points-item {
    background: var(--bg-card);
    border-radius: 6px;
    padding: 5px 8px;
    font-size: 0.7em;
    text-align: center;
    text-transform: lowercase;
    font-weight: 600;
}

.points-item.good {
    background: rgba(127, 168, 154, 0.15);
    border: 1px solid #7FA89A;
    color: #5E8578;
}

.points-item.bad {
    background: rgba(216, 154, 154, 0.15);
    border: 1px solid #D89A9A;
    color: #c77a7a;
}

.final-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.stat-bubble {
    background: var(--bg-card);
    border: 2px solid #7FA89A;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.75em;
    color: var(--text-primary);
    text-align: center;
    text-transform: lowercase;
    font-weight: 500;
}

.panel-label {
    font-size: 0.85em;
    color: var(--text-secondary);
    text-transform: lowercase;
    font-weight: 500;
    margin-top: 10px;
    text-align: center;
}

/* Responsive comic strip */
@media (max-width: 1024px) {
    .comic-strip {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .comic-strip {
        grid-template-columns: 1fr;
        padding: 20px;
    }
    
    .comic-avatars {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .comic-avatar img {
        width: 50px;
        height: 50px;
    }
    
    .speech-bubble,
    .xp-popup,
    .warning-popup,
    .glitch-popup {
        font-size: 0.65em;
        padding: 3px 6px;
    }
}

/* Upload Flow Container */
.upload-flow-container {
    margin-top: 40px;
}

/* Home page container - transparent background for game-like feel with floating cards */
#homePage .container {
    max-width: 100%;
    min-height: calc(100vh - 100px);
    padding: 40px 60px;
    background: transparent;
    box-shadow: none;
}

#storePage .container {
    max-width: 1000px;
}

/* Home Page Header - Game-like styling with better contrast */
.home-header {
    text-align: center;
    margin-bottom: 60px; /* Increased spacing */
}

.home-title {
    color: var(--text-primary);
    font-size: 2.5em;
    font-weight: 800;
    margin-bottom: 12px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    transition: color 0.3s ease;
}

.home-subtitle {
    color: var(--text-secondary);
    font-size: 1.05em;
    font-weight: 500;
    transition: color 0.3s ease;
}

/* 3-Step Flow Visual Guide - Clearer states for completed/current/upcoming */
.steps-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 70px; /* Increased spacing */
    gap: 24px; /* Better spacing between steps */
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
    position: relative;
}

.step-number {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3em;
    font-weight: 700;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

/* Completed steps - subtle checkmark style */
.step-indicator.completed .step-number {
    background: rgba(76, 175, 80, 0.2);
    color: var(--success-color);
    border-color: var(--success-color);
}

.step-indicator.completed .step-number::after {
    content: '✓';
    font-size: 0.9em;
}

/* Active/current step - emphasized */
.step-indicator.active .step-number {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 6px 20px var(--shadow-soft), 0 0 0 4px rgba(127, 168, 154, 0.1);
    transform: scale(1.08);
    border-color: transparent;
}

.step-label {
    font-size: 0.85em;
    color: var(--text-muted);
    font-weight: 600;
    text-align: center;
    transition: color 0.3s ease;
}

/* Completed step label */
.step-indicator.completed .step-label {
    color: var(--text-secondary);
}

/* Active step label - emphasized */
.step-indicator.active .step-label {
    color: var(--text-primary);
    font-weight: 700;
}

.step-connector {
    flex: 1;
    height: 3px;
    background: var(--border-color);
    max-width: 120px;
    border-radius: 3px;
    transition: background 0.3s ease;
}

/* Completed connector - show progress */
.step-indicator.completed ~ .step-connector,
.step-indicator.active ~ .step-connector {
    background: linear-gradient(90deg, #4caf50 0%, #7FA89A 100%);
}

/* Step Sections - Floating cards on gradient background */
.step-section {
    margin-bottom: 60px; /* Increased spacing between sections */
    animation: fadeInUp 0.4s ease;
    background: var(--bg-card); /* Floating card effect */
    border-radius: 20px; /* Standardized radius */
    padding: 40px; /* Generous padding */
    box-shadow: 0 4px 20px var(--shadow-soft); /* Soft shadow for depth */
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-header {
    text-align: center;
    margin-bottom: 35px; /* Increased spacing */
}

.step-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--accent-gradient);
    color: white;
    border-radius: 16px; /* Standardized radius */
    font-size: 0.8em;
    font-weight: 700;
    margin-bottom: 18px; /* Better spacing */
    box-shadow: 0 2px 8px var(--shadow-soft);
    letter-spacing: 0.5px;
}

.step-title {
    color: var(--text-primary);
    font-size: 1.9em;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.3px;
    transition: color 0.3s ease;
}

h1 {
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 10px;
    font-size: 2em;
    transition: color 0.3s ease;
}

.subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 0.95em;
    transition: color 0.3s ease;
}

.mode-toggle {
    display: flex;
    gap: 12px; /* Tighter gap for grouped buttons */
    margin-bottom: 35px; /* Increased spacing */
    justify-content: center;
}

/* Upload Mode Toggle */
.upload-mode-toggle {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
}

.mode-toggle-btn {
    padding: 12px 24px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.mode-toggle-btn:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.mode-toggle-btn.active {
    background: var(--accent-gradient);
    color: white;
    border-color: var(--accent-primary);
    box-shadow: 0 4px 12px rgba(127, 168, 154, 0.3);
}

.upload-mode-container,
.monitor-mode-container {
    width: 100%;
}

.monitor-section-inline {
    width: 100%;
}

.monitor-container-inline {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

/* Monitor Activity Selection */
.monitor-activity-selector {
    width: 100%;
    padding: 20px;
    background: var(--bg-card);
    border-radius: 15px;
    margin-bottom: 20px;
}

.monitor-activity-title {
    text-align: center;
    color: var(--text-primary);
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 20px;
}

.monitor-activity-confirmed {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 15px;
    background: rgba(127, 168, 154, 0.1);
    border-radius: 10px;
    border: 2px solid var(--accent-primary);
    margin-top: 15px;
}

.monitor-activity-confirmed .activity-check {
    font-size: 1.5em;
    color: var(--accent-primary);
}

.monitor-activity-confirmed span:not(.activity-check) {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-primary);
}

/* Save Session Container */
.save-session-container {
    width: 100%;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

.monitor-btn.save-btn {
    background: linear-gradient(135deg, #7FA89A 0%, #5E8578 100%);
    color: white;
    width: 100%;
    padding: 18px 30px;
    font-size: 1.2em;
    font-weight: 600;
}

.monitor-btn.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(127, 168, 154, 0.4);
}

.monitor-btn.save-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.monitor-session-complete {
    width: 100%;
    padding: 24px;
    background: var(--bg-card);
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.monitor-session-complete.hidden {
    display: none !important;
}

.session-complete-title {
    margin: 0 0 16px;
    font-size: 1.4em;
    color: var(--text-primary);
}

.session-complete-score-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.session-complete-score-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.session-complete-score-value {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--accent-primary);
}

.session-complete-points {
    font-weight: 600;
    color: var(--success-color, #51cf66);
}

.session-complete-why-title {
    margin: 0 0 8px;
    font-size: 1.1em;
    color: var(--text-primary);
}

.session-complete-why-text {
    margin: 0 0 20px;
    color: var(--text-secondary);
    line-height: 1.5;
    white-space: pre-wrap;
    transform: none;
}

.video-form {
    transition: opacity 0.3s;
}

.upload-area {
    border: 2px dashed var(--border-color); /* Softer border color */
    border-radius: 18px; /* Standardized radius */
    padding: 50px 40px;
    text-align: center;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    background: #fafbff; /* Very light background for contrast */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); /* Softer shadow */
    position: relative;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #7FA89A; /* More vibrant on hover */
    background: white; /* Full white on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(127, 168, 154, 0.12); /* Softer hover shadow */
}

#videoInput {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.upload-label {
    display: block;
    cursor: pointer;
    width: 100%;
    height: 100%;
    pointer-events: auto;
    position: relative;
    z-index: 1;
}

.upload-icon {
    font-size: 3em;
    display: block;
    margin-bottom: 10px;
}

.upload-text {
    color: var(--accent-primary);
    font-weight: 500;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

/* Dominant CTA Button - Game-like reward trigger */
.analyze-cta-btn {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 24px 40px;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: 18px;
    font-size: 1.4em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 8px 25px var(--shadow);
    position: relative;
    overflow: hidden;
}

.analyze-cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.analyze-cta-btn:hover::before {
    left: 100%;
}

.analyze-cta-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 35px rgba(127, 168, 154, 0.5);
}

.analyze-cta-btn:active {
    transform: translateY(-2px) scale(1.01);
}

.analyze-cta-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.cta-icon {
    font-size: 1.3em;
}

.cta-text {
    font-weight: 700;
    letter-spacing: 0.5px;
}

.cta-arrow {
    font-size: 1.2em;
    transition: transform 0.3s ease;
}

.analyze-cta-btn:hover .cta-arrow {
    transform: translateX(4px);
}

/* Monitor Page Styles */
.monitor-section {
    padding: 40px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.monitor-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
}

.monitor-preview-container {
    width: 100%;
    max-width: 640px;
    border-radius: 15px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 9;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.monitor-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.monitor-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.monitor-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.monitor-btn.start-btn {
    background: linear-gradient(135deg, #7FA89A 0%, #5E8578 100%);
    color: white;
}

.monitor-btn.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(127, 168, 154, 0.4);
}

.monitor-btn.stop-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.monitor-btn.stop-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.monitor-stats-container {
    width: 100%;
    max-width: 640px;
    background: var(--bg-card);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.monitor-score-display {
    text-align: center;
    margin-bottom: 20px;
}

.score-label {
    font-size: 1.1em;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.score-value-large {
    font-size: 4em;
    font-weight: 700;
    color: var(--accent-primary);
    line-height: 1;
}

.monitor-status {
    text-align: center;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 500;
    font-size: 1.1em;
}

.monitor-status.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 2px solid rgba(16, 185, 129, 0.3);
}

.monitor-status.warning {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 2px solid rgba(239, 68, 68, 0.3);
}

.monitor-score-reason {
    font-size: 0.9em;
    color: var(--text-secondary, #6b7280);
    margin-top: 8px;
    margin-bottom: 12px;
    font-style: italic;
    padding: 0 8px;
}

.monitor-score-reason.session-description {
    font-style: normal;
    margin-top: 12px;
    padding: 10px 12px;
    background: rgba(16, 185, 129, 0.08);
    border-radius: 8px;
    border-left: 3px solid var(--accent-primary, #10b981);
}

.monitor-frame-descriptions {
    margin-top: 16px;
    width: 100%;
}

.monitor-frame-descriptions .frame-descriptions-title {
    font-size: 0.95em;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.frame-descriptions-list {
    max-height: 180px;
    overflow-y: auto;
    background: var(--surface-secondary, rgba(0,0,0,0.05));
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.85em;
}

.frame-description-item {
    padding: 6px 0;
    border-bottom: 1px solid var(--border-color, rgba(0,0,0,0.08));
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.frame-description-item:last-child {
    border-bottom: none;
}

.frame-description-item .frame-num {
    flex-shrink: 0;
    font-weight: 600;
    color: var(--accent-primary);
}

.frame-description-item .frame-desc {
    color: var(--text-secondary, #4b5563);
}

.frame-descriptions-empty {
    margin: 0;
    color: var(--text-secondary, #6b7280);
    font-style: italic;
    font-size: 0.9em;
}

.monitor-stats {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    font-size: 1em;
    color: var(--text-primary);
}

.monitor-stats .metric-card {
    flex: 1;
    min-width: 120px;
    max-width: 150px;
    padding: 15px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
}

.monitor-stats .metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(127, 168, 154, 0.2);
    border-color: var(--accent-primary);
}

.monitor-stats .metric-label {
    font-size: 0.85em;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-weight: 500;
}

.monitor-stats .metric-value {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--accent-primary);
}

/* Legacy submit-btn for other pages */
.submit-btn {
    width: 100%;
    padding: 12px 24px;
    background: #7FA89A;
    color: white;
    border: none;
    border-radius: 1rem;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.submit-btn:hover {
    background: #5E8578;
}

.submit-btn:active {
    background: #5E8578;
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.uploading {
    text-align: center;
    padding: 40px;
    background: #FAF7F2;
    border-radius: 12px;
    margin-top: 30px;
}

.upload-icon-large {
    font-size: 4em;
    margin-bottom: 20px;
    animation: uploadPulse 1.5s ease-in-out infinite;
}

@keyframes uploadPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.uploading p {
    color: #7FA89A;
    font-size: 1.2em;
    font-weight: 600;
}

.video-selected {
    text-align: center;
    padding: 30px;
    background: var(--bg-card);
    border-radius: 16px;
    margin-top: 30px;
    box-shadow: 0 4px 15px var(--shadow-soft);
    animation: successFadeIn 0.5s ease;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.video-selected .success-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    font-weight: 700;
    margin: 0 auto 15px;
}

.video-selected .success-message {
    color: #2e7d32;
    font-size: 1.2em;
    font-weight: 700;
    margin-bottom: 8px;
}

.video-selected .success-subtext {
    color: #666;
    font-size: 0.95em;
    font-weight: 500;
    margin-top: 5px;
}

.upload-success {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8f4 100%);
    border-radius: 12px;
    margin-top: 30px;
    border: 2px solid #4caf50;
    animation: successFadeIn 0.5s ease;
}

@keyframes successFadeIn {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Success icon styles are now inline with video-selected and upload-success */

.upload-success .success-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    font-weight: 700;
    margin: 0 auto 15px;
}

.upload-success .success-message {
    color: #2e7d32;
    font-size: 1.3em;
    font-weight: 700;
    margin-bottom: 8px;
}

.upload-success .success-subtext {
    color: #666;
    font-size: 1em;
    font-weight: 500;
    margin-top: 5px;
}

.loading {
    text-align: center;
    padding: 30px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #7FA89A;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.results {
    margin-top: 30px;
    padding: 25px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    transition: background 0.3s ease;
}

.results h2 {
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: center;
    transition: color 0.3s ease;
}

.score-display {
    text-align: center;
    margin-bottom: 25px;
}

.score-value {
    font-size: 4em;
    font-weight: bold;
    color: var(--accent-primary);
    transition: color 0.3s ease;
}

.score-label {
    font-size: 2em;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.points-earned {
    text-align: center;
    padding: 20px 30px;
    background: var(--accent-primary);
    color: white;
    border-radius: 1rem;
    margin: 25px auto;
    font-size: 1.5em;
    font-weight: 500;
    letter-spacing: 0;
    box-shadow: 0 2px 8px var(--shadow-soft);
    animation: pointsPulse 0.5s ease;
    max-width: 400px;
}

@keyframes pointsPulse {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.frame-descriptions-section {
    margin-top: 30px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.frame-descriptions-dropdowns {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.frame-dropdown-wrapper {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.frame-dropdown-wrapper:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 2px 8px var(--shadow-soft);
}

.frame-dropdown-button {
    width: 100%;
    padding: 15px 20px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
    text-align: left;
}

.frame-dropdown-button:hover {
    background: var(--bg-secondary);
}

.frame-dropdown-button.active {
    background: var(--bg-secondary);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.frame-dropdown-title {
    font-weight: 600;
    color: var(--accent-primary);
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.frame-dropdown-icon {
    color: var(--accent-primary);
    font-size: 0.8em;
    transition: transform 0.3s ease;
    user-select: none;
}

.frame-dropdown-content {
    padding: 15px 20px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

.frame-description-text {
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 0.95em;
    margin: 0;
}

.analysis-text {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 8px;
    color: var(--text-primary);
    transition: background 0.3s ease, color 0.3s ease;
    line-height: 1.8;
    font-size: 1.05em;
    white-space: pre-wrap;
    word-wrap: break-word;
    text-align: left;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

/* Better fit for Signals section with 5 cards - desktop optimized */
#signalsGrid {
    grid-template-columns: repeat(5, 1fr);
    max-width: 100%;
}

/* Better fit for Scores section with 3 cards - desktop optimized */
#scoresGrid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 100%;
}

/* Responsive adjustments for smaller desktop screens */
@media (min-width: 769px) and (max-width: 1200px) {
    #signalsGrid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    #scoresGrid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.metric-card {
    background: var(--bg-card);
    border-radius: 10px;
    padding: 15px 18px;
    text-align: center;
    box-shadow: 0 2px 8px var(--shadow-soft);
    transition: background 0.3s ease, box-shadow 0.3s ease;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 100%;
}

.metric-label {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
    transition: color 0.3s ease;
    line-height: 1.3;
}

.metric-value {
    font-size: 1.3em;
    font-weight: bold;
    color: var(--accent-primary);
    margin-bottom: 8px;
    transition: color 0.3s ease;
    line-height: 1.2;
    word-break: break-word;
}

.metric-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
    transition: background 0.3s ease;
}

.metric-bar-fill {
    height: 100%;
    width: 0%;
    transition: width 0.5s ease, background-color 0.3s ease;
    border-radius: 4px;
}

.penalties-bonuses-section {
    margin-top: 30px;
}

.section-subtitle {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
    text-align: center;
}

.results-section {
    margin-top: 30px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.results-section:first-of-type {
    margin-top: 20px;
}

.metric-description {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-top: 8px;
    font-style: italic;
}

.error {
    margin-top: 20px;
    padding: 15px;
    background: rgba(220, 53, 69, 0.1);
    color: var(--error-color);
    border-radius: 8px;
    border-left: 4px solid var(--error-color);
    transition: background 0.3s ease, color 0.3s ease;
}

.hidden {
    display: none;
}

/* Avatar Styles - Game Character Profile Design */
.avatar-container,
.videos-container {
    max-width: 800px;
    animation: fadeInUp 0.2s ease-out;
    margin-top: 0;
    padding-top: 8px;
}

/* Avatar: own full-page entity, hero at top, no extra scroll */
#avatarPage {
    display: block;
    padding: 0;
    margin: 0;
    min-height: calc(100vh - 56px);
    width: 100%;
    max-width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    will-change: scroll-position;
    transform: translateZ(0);
    -webkit-overflow-scrolling: touch;
}

#avatarPage .container.avatar-container {
    margin: 0 auto;
    padding: 16px 24px 24px;
    max-width: 900px;
    contain: layout style paint;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Section: Character Identity - compact so it's visible without scroll */
.avatar-hero {
    background: linear-gradient(135deg, rgba(127, 168, 154, 0.05) 0%, rgba(94, 133, 120, 0.05) 100%);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(127, 168, 154, 0.1);
}

/* Subtle background pattern for depth */
.avatar-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(127, 168, 154, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: heroGlow 8s ease-in-out infinite;
}

@keyframes heroGlow {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
    50% { transform: translate(-20px, 20px) scale(1.1); opacity: 0.8; }
}

.avatar-hero-content {
    position: relative;
    z-index: 1;
}

.avatar-hero-main {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Enhanced avatar circle for hero section */
.avatar-hero .avatar-circle {
    margin: 0;
    flex-shrink: 0;
}

.avatar-hero-info {
    flex: 1;
    min-width: 250px;
    text-align: center;
}

.avatar-hero-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

/* Level display - prominent and game-like */
.avatar-hero-level {
    font-size: 2.5em;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(135deg, #7FA89A 0%, #5E8578 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    filter: drop-shadow(0 4px 8px rgba(127, 168, 154, 0.3));
    animation: levelPulse 3s ease-in-out infinite;
}

@keyframes levelPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 4px 8px rgba(127, 168, 154, 0.3)); }
    50% { transform: scale(1.02); filter: drop-shadow(0 6px 12px rgba(127, 168, 154, 0.4)); }
}

/* Rarity badge - makes status feel special */
.avatar-rarity-badge {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, #7FA89A 0%, #5E8578 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(127, 168, 154, 0.4);
    position: relative;
    overflow: hidden;
}

.avatar-rarity-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: badgeShine 3s infinite;
}

@keyframes badgeShine {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Special styling for high-tier rarities */
.rarity-epic {
    background: linear-gradient(135deg, #9c27b0 0%, #673ab7 100%);
    box-shadow: 0 4px 20px rgba(156, 39, 176, 0.5);
    animation: epicGlow 2s ease-in-out infinite;
}

.rarity-legendary {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 50%, #ffd700 100%);
    box-shadow: 0 4px 25px rgba(255, 107, 53, 0.6), 0 0 30px rgba(255, 215, 0, 0.4);
    animation: legendaryGlow 2s ease-in-out infinite;
    position: relative;
}

.rarity-legendary::after {
    content: '✨';
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 0.8em;
    animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes epicGlow {
    0%, 100% { box-shadow: 0 4px 20px rgba(156, 39, 176, 0.5); }
    50% { box-shadow: 0 4px 25px rgba(156, 39, 176, 0.7), 0 0 20px rgba(156, 39, 176, 0.3); }
}

@keyframes legendaryGlow {
    0%, 100% { 
        box-shadow: 0 4px 25px rgba(255, 107, 53, 0.6), 0 0 30px rgba(255, 215, 0, 0.4);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 4px 30px rgba(255, 107, 53, 0.8), 0 0 40px rgba(255, 215, 0, 0.6);
        transform: scale(1.05);
    }
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.2) rotate(180deg); opacity: 0.7; }
}

/* Subtitle - adds personality */
.avatar-hero-subtitle {
    color: #666;
    font-size: 1.1em;
    font-weight: 500;
    font-style: italic;
    margin: 0;
    opacity: 0.9;
}

/* Stats Cluster: Grouped metrics for quick scanning */
.avatar-stats-cluster {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.avatar-stats-cluster .stat-card {
    padding: 14px 16px;
    gap: 12px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    text-align: left;
    border-radius: 16px;
    /* Inherits info-card styles but with left-aligned layout */
}

.stat-icon {
    font-size: 2em;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-label {
    color: #666;
    font-size: 0.85em;
    font-weight: 600;
    margin: 0 0 6px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.6em;
    margin: 0;
    line-height: 1.2;
}

.videos-list {
    margin-top: 30px;
}

.video-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.video-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.video-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.video-info h3 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 1.2em;
}

.video-date {
    color: #666;
    font-size: 0.9em;
}

.video-score {
    text-align: right;
}

.score-label {
    display: block;
    color: #666;
    font-size: 0.85em;
    margin-bottom: 5px;
}

.score-value {
    display: block;
    color: #7FA89A;
    font-size: 1.8em;
    font-weight: 700;
}

.video-card-body {
    margin-top: 15px;
}

.video-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.metric {
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 10px;
}

.metric-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85em;
    margin-bottom: 5px;
}

.metric-value {
    display: block;
    color: var(--text-primary);
    font-size: 1.2em;
    font-weight: 600;
}

.video-analysis {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.video-analysis h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1em;
}

.video-analysis p {
    margin: 0;
    color: #666;
    line-height: 1.6;
}

.loading-videos {
    text-align: center;
    padding: 40px;
    color: #666;
}

.videos-list .error {
    text-align: center;
    padding: 30px;
    background: #fee;
    color: #c33;
    border-radius: 10px;
    margin: 20px 0;
    font-weight: 500;
}

.no-videos {
    margin-top: 40px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 4em;
    display: block;
    margin-bottom: 20px;
}

.empty-state h2 {
    color: #333;
    margin-bottom: 10px;
}

.empty-state p {
    color: #666;
}

.avatar-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin-top: 30px;
}

.avatar-wrapper {
    text-align: center;
}

/* Avatar Circle - Enhanced for hero section */
.avatar-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7FA89A 0%, #5E8578 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 10px 30px rgba(127, 168, 154, 0.4), 0 0 40px rgba(127, 168, 154, 0.3);
    transition: all 0.5s ease;
    position: relative;
    overflow: visible;
    animation: avatarPulse 3s ease-in-out infinite;
}

/* Larger avatar in hero section */
.avatar-hero .avatar-circle {
    width: 120px;
    height: 120px;
    margin: 0;
    box-shadow: 0 15px 40px rgba(127, 168, 154, 0.5), 0 0 60px rgba(127, 168, 154, 0.4);
}

.avatar-circle::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    animation: shimmer 3s infinite;
}

.avatar-circle::after {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(127, 168, 154, 0.3), rgba(94, 133, 120, 0.3));
    animation: glowPulse 2s ease-in-out infinite;
    z-index: -1;
}

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

@keyframes avatarPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(127, 168, 154, 0.4), 0 0 40px rgba(127, 168, 154, 0.3);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 15px 40px rgba(127, 168, 154, 0.5), 0 0 60px rgba(127, 168, 154, 0.4);
    }
}

@keyframes glowPulse {
    0%, 100% { 
        opacity: 0.5;
        transform: scale(1);
    }
    50% { 
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.avatar-circle.level-up-animation {
    animation: levelUpCelebration 1s ease-out;
}

@keyframes levelUpCelebration {
    0% { 
        transform: scale(1) rotate(0deg);
    }
    25% { 
        transform: scale(1.2) rotate(90deg);
    }
    50% { 
        transform: scale(1.1) rotate(180deg);
    }
    75% { 
        transform: scale(1.15) rotate(270deg);
    }
    100% { 
        transform: scale(1) rotate(360deg);
    }
}


/* Legacy avatar-level styling removed - now using avatar-hero-level */

/* Legacy avatar-info removed - now using avatar-stats-cluster */

.info-card {
    background: linear-gradient(135deg, #ffffff 0%, #FAF7F2 100%);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(127, 168, 154, 0.1);
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #7FA89A 0%, #5E8578 100%);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.info-card:hover::before {
    transform: scaleX(1);
}

.info-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 8px 30px rgba(127, 168, 154, 0.2), 0 2px 8px rgba(0, 0, 0, 0.08);
    border-color: rgba(127, 168, 154, 0.3);
}

.info-card h3 {
    color: #666;
    font-size: 0.9em;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.info-card:hover h3 {
    color: #7FA89A;
}

.info-value {
    background: linear-gradient(135deg, #7FA89A 0%, #5E8578 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.8em;
    font-weight: 700;
    filter: drop-shadow(0 2px 4px rgba(127, 168, 154, 0.2));
    transition: transform 0.3s;
}

.info-card:hover .info-value {
    transform: scale(1.1);
}

/* Enhanced dropdown sections with better depth and polish */
.avatar-dropdown-section {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-top: 20px;
    width: 100%;
    max-width: 600px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(127, 168, 154, 0.1);
}

.avatar-dropdown-section:hover {
    box-shadow: 0 8px 30px rgba(127, 168, 154, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border-color: rgba(127, 168, 154, 0.2);
}

/* Enhanced dropdown headers - game-like ability panels */
.dropdown-header {
    padding: 20px 25px;
    min-height: 48px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #FAF7F2 0%, #ffffff 100%);
    border-bottom: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    position: relative;
    /* Mobile: reliable tap, no 300ms delay, 44pt+ tap target */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.dropdown-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #7FA89A 0%, #5E8578 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
    pointer-events: none;
}

.dropdown-header:hover::before,
.dropdown-header.active::before {
    transform: scaleY(1);
}

/* Hover transform only on devices with hover (avoids tap-miss on touch) */
@media (hover: hover) {
.dropdown-header:hover {
    background: linear-gradient(135deg, #FAF7F2 0%, #FAF7F2 100%);
    border-bottom-color: #7FA89A;
    transform: translateX(4px);
    }
}

.dropdown-header.active {
    background: linear-gradient(135deg, #e8ebff 0%, #FAF7F2 100%);
    border-bottom-color: #7FA89A;
}

/* Touch feedback when tapping on mobile */
.dropdown-header:active {
    background: linear-gradient(135deg, #e8ebff 0%, #FAF7F2 100%);
}

.dropdown-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dropdown-icon {
    font-size: 1.3em;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.dropdown-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.3em;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.dropdown-arrow {
    font-size: 0.9em;
    color: #7FA89A;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: bold;
    display: inline-block;
    transform-origin: center;
}

.dropdown-header.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-header:hover .dropdown-arrow {
    transform: scale(1.2);
}

.dropdown-header.active:hover .dropdown-arrow {
    transform: rotate(180deg) scale(1.2);
}

.dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease;
    padding: 0 25px;
}

.dropdown-content.open {
    max-height: 5000px;
    padding: 25px;
}

.growth-progress {
    padding: 0;
    box-shadow: none;
    margin: 0;
    max-width: 100%;
}

.growth-progress h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3em;
}

.progress-bar-container {
    background: #FAF7F2;
    border-radius: 20px;
    height: 30px;
    overflow: hidden;
    margin-bottom: 15px;
    position: relative;
}

.progress-bar {
    background: linear-gradient(90deg, #7FA89A 0%, #5E8578 100%);
    height: 100%;
    border-radius: 20px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), 0 0 15px rgba(127, 168, 154, 0.4);
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0.4) 50%, 
        rgba(255,255,255,0) 100%);
    animation: progressShine 2s infinite;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, 
        rgba(255,255,255,0.2) 0%, 
        transparent 50%, 
        rgba(0,0,0,0.1) 100%);
    border-radius: 20px;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    text-align: center;
    color: #666;
    font-size: 0.95em;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.avatar-attributes-section {
    padding: 0;
    box-shadow: none;
    margin: 0;
    max-width: 100%;
}

.avatar-attributes-section h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3em;
}

.current-attributes {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    min-height: 60px;
}

.no-attributes {
    color: #999;
    font-style: italic;
    text-align: center;
    width: 100%;
    padding: 20px;
}

.attribute-badge {
    background: linear-gradient(135deg, #7FA89A 0%, #5E8578 100%);
    color: white;
    border-radius: 12px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(127, 168, 154, 0.3), 0 0 20px rgba(127, 168, 154, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.attribute-badge::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    animation: badgeShimmer 3s infinite;
}

.attribute-badge:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(127, 168, 154, 0.5), 0 0 30px rgba(127, 168, 154, 0.3);
}

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

.badge-icon {
    font-size: 1.8em;
}

.badge-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.badge-name {
    font-weight: 600;
    font-size: 0.95em;
}

.badge-level {
    font-size: 0.8em;
    opacity: 0.9;
}

.attributes-shop {
    padding: 0;
    box-shadow: none;
    margin: 0;
    max-width: 100%;
}

.attributes-shop h3 {
    color: #333;
    margin-bottom: 25px;
    font-size: 1.3em;
}

.attributes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.attribute-card {
    background: linear-gradient(135deg, #FAF7F2 0%, #ffffff 100%);
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.attribute-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(127, 168, 154, 0.1), transparent);
    transition: left 0.5s;
}

.attribute-card:hover::before {
    left: 100%;
}

.attribute-card:hover {
    border-color: #7FA89A;
    box-shadow: 0 8px 25px rgba(127, 168, 154, 0.3), 0 0 20px rgba(127, 168, 154, 0.1);
    transform: translateY(-5px) scale(1.02);
}

.attribute-card.insufficient {
    opacity: 0.6;
    filter: grayscale(0.3);
}

.attribute-card.max-level {
    border-color: #4caf50;
    background: linear-gradient(135deg, #f1f8f4 0%, #e8f5e9 100%);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    position: relative;
}

.attribute-card.max-level::after {
    content: '⭐';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5em;
    animation: starTwinkle 2s ease-in-out infinite;
}

.attribute-card.upgraded {
    animation: attributeUpgrade 0.8s ease;
    border-color: #4caf50;
    box-shadow: 0 0 30px rgba(76, 175, 80, 0.5);
}

@keyframes attributeUpgrade {
    0% { 
        transform: scale(1);
        box-shadow: 0 0 0 rgba(76, 175, 80, 0);
    }
    50% { 
        transform: scale(1.1) rotate(2deg);
        background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
        box-shadow: 0 0 40px rgba(76, 175, 80, 0.6);
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    }
}

@keyframes starTwinkle {
    0%, 100% { 
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    50% { 
        transform: scale(1.2) rotate(180deg);
        opacity: 0.7;
    }
}

.attribute-card-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.attribute-icon {
    font-size: 2.5em;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s;
}

.attribute-card:hover .attribute-icon {
    transform: scale(1.1) rotate(5deg);
    animation: iconBounce 0.6s ease;
}

@keyframes iconBounce {
    0%, 100% { transform: scale(1.1) rotate(5deg); }
    50% { transform: scale(1.2) rotate(-5deg); }
}

.attribute-info {
    flex: 1;
}

.attribute-name {
    color: #333;
    font-size: 1.2em;
    margin-bottom: 5px;
    font-weight: 600;
}

.attribute-description {
    color: #666;
    font-size: 0.9em;
    line-height: 1.4;
}

.attribute-level-display {
    background: white;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    color: #666;
    font-size: 0.95em;
}

.attribute-level-display strong {
    color: #7FA89A;
    font-size: 1.1em;
}

.attribute-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.attribute-cost {
    color: #7FA89A;
    font-weight: 700;
    font-size: 1.1em;
}

.attribute-upgrade-btn {
    padding: 10px 20px;
    position: relative;
    overflow: hidden;
}

.attribute-upgrade-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.attribute-upgrade-btn:active::before {
    width: 300px;
    height: 300px;
}

.attribute-upgrade-btn:not(.disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(127, 168, 154, 0.4);
}

.attribute-upgrade-btn:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(127, 168, 154, 0.4);
}

.attribute-upgrade-btn.disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Auth Styles */
.auth-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin: 0 auto 30px;
    display: block;
}

#signinPage {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
    padding: 20px;
    box-sizing: border-box;
}

#signinPage.hidden {
    display: none !important;
}

#signupPage.hidden {
    display: none !important;
}

#signupPage {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
    padding: 20px;
    box-sizing: border-box;
}

.signup-minimal,
.signin-minimal {
    max-width: 380px;
    text-align: center;
}

.signup-minimal .signup-logo {
    width: 56px;
    height: 56px;
    margin-bottom: 24px;
}

.signup-headline {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.signup-subline {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0 0 28px 0;
}

.signup-minimal .signup-google-btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
    margin-bottom: 16px;
}

.signup-use-email {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 8px 0;
    text-decoration: underline;
}

.signup-use-email:hover {
    color: var(--accent-primary);
}

.signup-email-form {
    margin-top: 8px;
    text-align: left;
}

.signup-email-form.hidden {
    display: none !important;
}

.signup-use-email.hidden {
    display: none !important;
}

.signup-signin-link {
    margin-top: 24px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.signup-signin-link a {
    color: var(--accent-primary);
    text-decoration: none;
}

.signup-signin-link a:hover {
    text-decoration: underline;
}

.signup-back-link {
    display: inline-block;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-decoration: none;
}

.signup-back-link:hover {
    color: var(--accent-primary);
}

.auth-container {
    max-width: 500px;
    position: relative;
    margin: 0 auto;
}

.auth-container h1 {
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.auth-container .subtitle {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.auth-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95em;
    transition: color 0.3s ease;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1em;
    transition: border-color 0.2s, background 0.3s ease, color 0.3s ease;
    box-sizing: border-box;
    background: var(--bg-card);
    color: var(--text-primary);
}

.form-group input:focus {
    outline: none;
    border-color: #7FA89A;
}

.form-group small {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85em;
    margin-top: 5px;
    transition: color 0.3s ease;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
    transition: color 0.3s ease;
    font-size: 0.95em;
}

.auth-switch a {
    color: #7FA89A;
    text-decoration: none;
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.google-signin-btn {
    width: 100%;
    padding: 12px 20px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1em;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-bottom: 20px;
}

.google-signin-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    box-shadow: 0 2px 8px var(--shadow-soft);
}

.google-signin-btn:active {
    transform: translateY(1px);
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 0.9em;
    transition: color 0.3s ease;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e0e0e0;
}

.auth-divider span {
    padding: 0 15px;
}

/* Game Styles */
.game-container {
    max-width: 800px;
}

.game-area {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
    min-height: 500px;
    position: relative;
}

.game-start-screen,
.game-play-screen,
.game-end-screen {
    text-align: center;
}

.game-icon {
    font-size: 5em;
    margin-bottom: 20px;
}

.game-start-screen h2,
.game-end-screen h2 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 2em;
}

.game-cost {
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 1.1em;
    margin: 20px 0;
}

.game-start-btn,
.game-play-again-btn {
    padding: 15px 40px;
    background: linear-gradient(135deg, #7FA89A 0%, #5E8578 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 20px;
}

.game-start-btn:hover:not(:disabled),
.game-play-again-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(127, 168, 154, 0.4);
}

.game-start-btn:disabled,
.game-play-again-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--text-muted);
}

.game-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
    padding: 20px;
    background: #FAF7F2;
    border-radius: 12px;
}

.game-stats .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.game-stats .stat-label {
    color: #666;
    font-size: 0.9em;
    font-weight: 600;
}

.game-stats .stat-value {
    color: #7FA89A;
    font-size: 2em;
    font-weight: 700;
}

.game-target-area {
    position: relative;
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, #FAF7F2 0%, #e8eaff 100%);
    border-radius: 15px;
    border: 3px dashed #7FA89A;
    margin: 20px 0;
    overflow: hidden;
}

.game-target {
    position: absolute;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    transition: transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    animation: targetPulse 0.5s ease;
}

.game-target:hover {
    transform: scale(1.1);
}

.game-target.hit {
    animation: targetHit 0.2s ease;
    transform: scale(0);
}

@keyframes targetPulse {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes targetHit {
    0% { transform: scale(1); }
    100% { transform: scale(1.5); opacity: 0; }
}

.game-end-screen .final-score {
    margin: 30px 0;
}

.game-end-screen .final-score p {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 10px;
}

.game-end-screen .final-score .score-value {
    color: #7FA89A;
    font-size: 4em;
    font-weight: 700;
    display: block;
}

.game-end-screen .points-earned {
    background: linear-gradient(135deg, #7FA89A 0%, #5E8578 100%);
    color: white;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1.2em;
    font-weight: 600;
    margin: 20px 0;
    display: inline-block;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background: white;
    border: none;
    border-radius: 8px;
    width: 44px;
    height: 44px;
    padding: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background: #7FA89A;
    border-radius: 2px;
    transition: all 0.3s;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

@media (max-width: 768px) {
    body {
        padding: 0;
        padding-top: calc(56px + env(safe-area-inset-top));
        padding-left: 0;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .top-nav-left {
        flex-wrap: wrap;
    }
    
    .top-nav-links {
        position: fixed;
        top: calc(56px + env(safe-area-inset-top));
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        box-shadow: 0 4px 12px var(--shadow);
        flex-direction: column;
        padding: 0;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.3s ease, opacity 0.2s ease;
        z-index: 10000;
        border-radius: 0 0 16px 16px;
        max-width: 100%;
    }
    
    .top-nav.open .mobile-menu-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 16px;
        border-bottom: 1px solid var(--border-color);
        background: var(--bg-secondary);
    }
    
    .mobile-menu-title {
        font-size: 1rem;
        font-weight: 600;
        color: var(--text-primary);
    }
    
    .mobile-menu-close {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: none;
        background: var(--bg-tertiary);
        color: var(--text-secondary);
        font-size: 1.5rem;
        line-height: 1;
        cursor: pointer;
        border-radius: 10px;
        padding: 0;
    }
    
    .mobile-menu-close:hover {
        background: var(--border-color);
        color: var(--text-primary);
    }
    
    .top-nav.open .top-nav-links {
        max-height: min(85vh, 420px);
        overflow-y: auto;
        opacity: 1;
        padding: 0 0 12px;
    }
    
    .top-nav.open .top-nav-links > .nav-item,
    .top-nav.open .top-nav-links > .nav-dropdown {
        padding: 0 12px;
        margin-top: 4px;
    }
    
    .top-nav.open .top-nav-links .nav-dropdown-trigger {
        width: 100%;
        justify-content: space-between;
        padding: 14px 16px;
        font-size: 1rem;
        border-radius: 10px;
        text-align: left;
    }
    
    .top-nav.open .nav-dropdown .nav-dropdown-chevron {
        font-size: 0.75em;
        opacity: 1;
        transition: transform 0.2s ease;
    }
    
    .top-nav.open .nav-dropdown.open .nav-dropdown-chevron {
        transform: rotate(180deg);
    }
    
    .top-nav.open .top-nav-links .nav-item,
    .top-nav.open .nav-dropdown-panel .nav-item {
        padding: 12px 16px;
        font-size: 1rem;
        min-height: 48px;
        display: flex;
        align-items: center;
    }
    
    .nav-dropdown-panel {
        position: static;
        margin-top: 0;
        margin-bottom: 0;
        box-shadow: none;
        border: none;
        border-radius: 0;
        border-left: 3px solid var(--accent-primary);
        padding-left: 12px;
        margin-left: 16px;
        max-height: 0;
        overflow: hidden;
        opacity: 1;
        transform: none;
        transition: max-height 0.2s ease;
    }
    
    .nav-dropdown.open .nav-dropdown-panel {
        max-height: 280px;
        visibility: visible;
    }
    
    .top-nav.open .nav-dropdown-panel {
        visibility: hidden;
    }
    
    .top-nav.open .nav-dropdown.open .nav-dropdown-panel {
        visibility: visible;
    }
    
    .top-nav.open::after {
        content: '';
        position: fixed;
        top: calc(56px + env(safe-area-inset-top));
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 9999;
    }
    
    .points-header {
        padding: 0;
    }
    
    .top-nav-right {
        min-width: 0;
        overflow: hidden;
    }
    
    .points-display {
        font-size: 0.95rem;
        min-width: 0;
        width: 100%;
    }
    
    .xp-container {
        flex-wrap: nowrap;
        gap: 8px;
        min-width: 0;
        align-items: center;
    }
    
    .xp-info {
        flex-shrink: 0;
    }
    
    .top-nav-right .xp-progress-bar {
        min-width: 0;
        width: 50px;
        max-width: 60px;
        flex-shrink: 0;
    }
    
    .level-badge {
        font-size: 0.7rem;
        padding: 4px 8px;
        flex-shrink: 0;
    }
    
    .xp-to-next {
        font-size: 0.6rem;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 90px;
    }
    
    .top-nav-brand-full {
        display: inline;
    }
    
    .top-nav-brand {
        font-size: 1rem;
    }
    
    .top-nav {
        padding-left: 56px;
        padding-left: max(56px, calc(44px + env(safe-area-inset-left)));
    }
    
    .top-nav-left {
        padding-left: 0;
    }
    
    .mobile-menu-toggle {
        top: max(12px, env(safe-area-inset-top));
        left: max(12px, env(safe-area-inset-left));
    }
    
    .xp-to-next {
        line-height: 1.2;
    }
    
    .page {
        padding: 0;
    }
    
    .container {
        padding: 20px;
        border-radius: 0;
    }
    
    #homePage .container {
        min-height: calc(100vh - 70px);
        padding: 20px 15px;
    }
    
    /* Mobile: Steps flow */
    .steps-flow {
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 40px;
    }
    
    .step-indicator {
        flex: 1 1 calc(33.333% - 10px);
        min-width: 80px;
    }
    
    .step-connector {
        display: none;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1.1em;
    }
    
    .step-label {
        font-size: 0.75em;
    }
    
    /* Mobile: Home header */
    .home-title {
        font-size: 1.8em;
    }
    
    .home-subtitle {
        font-size: 0.95em;
    }
    
    /* Mobile: Step sections */
    .step-title {
        font-size: 1.4em;
    }
    
    .step-badge {
        font-size: 0.75em;
        padding: 5px 12px;
    }
    
    /* Mobile: XP system */
    .xp-value {
        font-size: 1.4em;
    }
    
    .level-badge {
        font-size: 0.75em;
        padding: 5px 12px;
    }
    
    .xp-to-next {
        font-size: 0.7em;
    }
    
    /* Mobile: CTA button */
    .analyze-cta-btn {
        font-size: 1.1em;
        padding: 20px 30px;
    }
    
    /* Mobile: Activity grid */
    .activity-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .activity-btn {
        padding: 18px 12px;
    }
    
    .activity-icon {
        font-size: 2em;
    }
    
    /* Mobile: Activity confirmed */
    .activity-confirmed {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        gap: 15px;
    }
    
    .activity-info {
        text-align: center;
    }
    
    .avatar-info {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .attributes-grid {
        grid-template-columns: 1fr;
    }
    
    .game-target-area {
        height: 300px;
    }
    
    /* Larger touch targets */
    button, .nav-item, .play-btn, .submit-btn {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 20px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    input, textarea, select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px;
        min-height: 44px;
    }
    
    .nav-item {
        padding: 15px 20px;
    }
    
    .activity-btn {
        min-height: 50px;
        padding: 12px 16px;
        font-size: 16px;
    }
    
    .color-btn {
        width: 50px;
        height: 50px;
    }
    
    .expression-btn, .accessory-btn {
        min-height: 44px;
        padding: 12px 16px;
        font-size: 16px;
    }
    
    /* Better spacing for mobile */
    h1 {
        font-size: 1.8em;
        margin-bottom: 15px;
    }
    
    .subtitle {
        font-size: 0.95em;
        margin-bottom: 20px;
    }
    
    .upload-area {
        padding: 30px 15px;
    }
    
    .upload-label {
        font-size: 0.95em;
    }
    
    .mode-toggle {
        flex-direction: column;
        gap: 10px;
    }
    
    .mode-btn {
        width: 100%;
        padding: 15px;
        font-size: 16px;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .game-card {
        padding: 20px;
    }
    
    .avatar-selection-options {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .avatar-option-card {
        padding: 15px;
    }
    
    .modal-content {
        margin: 10px;
        max-width: calc(100% - 20px);
        max-height: calc(100vh - 20px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .game-modal {
        padding: 10px;
    }
    
    .wordle-cell {
        width: 50px;
        height: 50px;
        font-size: 1.3em;
    }
    
    .memory-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .memory-card {
        min-height: 80px;
    }
    
    .typing-game {
        padding: 15px;
    }
    
    .word-display {
        font-size: 1.8em;
        padding: 20px;
    }
    
    .typing-input {
        font-size: 16px;
        padding: 15px;
    }
    
    /* Prevent text size adjustment on iOS */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="url"],
    textarea {
        -webkit-appearance: none;
        -webkit-border-radius: 0;
    }
    
    /* Better form styling */
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group label {
        display: block;
        margin-bottom: 8px;
        font-weight: 600;
    }
    
    /* Activity buttons grid */
    .activity-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* Drawing Game Styles */
.draw-container {
    max-width: 1200px;
}

.draw-game-area {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.draw-lobby {
    text-align: center;
}

.lobby-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 30px 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.room-join-section {
    display: flex;
    gap: 10px;
}

.room-input {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
}

.room-info {
    margin-top: 30px;
    padding: 20px;
    background: #FAF7F2;
    border-radius: 10px;
}

.room-info h3 {
    color: #7FA89A;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.players-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.player-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.player-name {
    font-weight: 600;
    color: #333;
}

.player-score {
    color: #7FA89A;
    font-weight: 600;
}

.ready-badge {
    background: #4caf50;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

.draw-game {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--bg-card);
    border-radius: 10px;
    color: var(--text-primary);
}

.game-header h3,
.game-header p {
    color: var(--text-primary);
    margin: 0;
}

.game-info {
    display: flex;
    gap: 20px;
    font-weight: 600;
    color: var(--accent-primary);
}

.players-scores {
    display: flex;
    gap: 15px;
}

.player-score-item {
    padding: 5px 15px;
    background: white;
    border-radius: 15px;
    font-size: 0.9em;
    color: #666;
}

.draw-main-area {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
}

.draw-canvas-container {
    position: relative;
    background: white;
    border: 3px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#drawCanvas {
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: crosshair;
    background: white;
    max-width: 100%;
    height: auto;
}

.canvas-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 15px;
    padding: 10px;
    background: #FAF7F2;
    border-radius: 8px;
}

.color-picker {
    display: flex;
    align-items: center;
    gap: 15px;
}

#colorPicker {
    width: 50px;
    height: 40px;
    border: 2px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
}

#brushSize {
    width: 100px;
}

#brushSizeDisplay {
    font-weight: 600;
    color: #7FA89A;
    min-width: 40px;
}

.drawer-prompt {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #7FA89A 0%, #5E8578 100%);
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    box-shadow: 0 5px 15px rgba(127, 168, 154, 0.3);
    z-index: 10;
}

.drawer-prompt h3 {
    margin: 0;
    font-size: 1.2em;
}

.guess-area {
    background: #FAF7F2;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.guess-area h3 {
    color: #7FA89A;
    margin-bottom: 10px;
}

.guess-input {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    width: 100%;
}

.guesses-list {
    margin-top: 15px;
}

.game-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.draw-results {
    text-align: center;
    padding: 30px;
}

.result-prompt {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #7FA89A 0%, #5E8578 100%);
    color: white;
    border-radius: 10px;
}

.result-prompt h3 {
    font-size: 1.5em;
    margin: 0;
}

.result-guesses {
    margin: 30px 0;
    text-align: left;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.result-guesses h4 {
    color: #7FA89A;
    margin-bottom: 15px;
}

.result-guesses ul {
    list-style: none;
    padding: 0;
}

.result-guesses li {
    padding: 10px;
    margin: 5px 0;
    background: #FAF7F2;
    border-radius: 5px;
    border-left: 4px solid #ddd;
}

.result-guesses li.correct {
    border-left-color: #4caf50;
    background: #e8f5e9;
}

.result-guesses li.incorrect {
    border-left-color: #f44336;
    background: #ffebee;
}

.result-scores {
    margin: 30px 0;
    text-align: left;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.result-scores h4 {
    color: #7FA89A;
    margin-bottom: 15px;
}

.result-scores ul {
    list-style: none;
    padding: 0;
}

.result-scores li {
    padding: 10px;
    margin: 5px 0;
    background: #FAF7F2;
    border-radius: 5px;
}

.game-over {
    padding: 30px;
}

.final-scores {
    margin: 30px 0;
}

.final-scores h3 {
    color: #7FA89A;
    margin-bottom: 20px;
}

.final-scores ol {
    list-style: none;
    padding: 0;
    max-width: 400px;
    margin: 0 auto;
}

.final-scores li {
    padding: 15px;
    margin: 10px 0;
    background: #FAF7F2;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
}

.final-scores li.rank-1 {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
    font-size: 1.3em;
}

.final-scores li.rank-2 {
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
    color: #333;
}

.final-scores li.rank-3 {
    background: linear-gradient(135deg, #cd7f32 0%, #e8a87c 100%);
    color: #333;
}

.community-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.community-btn {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    width: 100%;
    font-size: 1.1em;
    padding: 18px;
}

.community-btn:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.community-waiting {
    text-align: center;
    padding: 40px;
    background: #FAF7F2;
    border-radius: 10px;
    margin-top: 30px;
}

.waiting-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.waiting-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #4caf50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.waiting-content h3 {
    color: #7FA89A;
    font-size: 1.5em;
    margin: 0;
}

.queue-status {
    background: white;
    padding: 20px;
    border-radius: 10px;
    min-width: 250px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.queue-status p {
    margin: 10px 0;
    font-size: 1.1em;
    color: #333;
}

.queue-status span {
    font-weight: 700;
    color: #4caf50;
    font-size: 1.2em;
}

@media (max-width: 968px) {
    .draw-main-area {
        grid-template-columns: 1fr;
    }
    
    .game-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .players-scores {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Games Hub Styles */
.games-container {
    max-width: 1200px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.game-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.game-icon {
    font-size: 4em;
    margin-bottom: 10px;
}

.game-card h3 {
    color: #7FA89A;
    font-size: 1.4em;
    margin: 0;
}

.game-description {
    color: #666;
    font-size: 0.95em;
    flex-grow: 1;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.game-type, .game-cost {
    font-size: 0.9em;
    font-weight: 600;
    color: #7FA89A;
}

.play-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #7FA89A 0%, #5E8578 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.play-btn:hover {
    transform: scale(1.05);
}

/* Study Methods (Study Sessions page) */
.study-sessions-container {
    max-width: 1200px;
}

.study-sessions-container h1 {
    margin-bottom: 0.35rem;
}

.study-sessions-container .subtitle {
    color: #555;
    margin-bottom: 1.75rem;
    font-size: 1.05rem;
    max-width: 42ch;
}
.study-methods-quiz-entry {
    text-align: center;
    margin-bottom: 1.75rem;
    padding: 1rem 1.25rem;
    background: rgba(127, 168, 154, 0.08);
    border-radius: 14px;
    border: 1px solid rgba(127, 168, 154, 0.2);
}
.study-methods-quiz-prompt { margin: 0 0 0.75rem 0; color: #5a6b64; font-size: 1rem; }
.study-methods-quiz-start-btn { max-width: 200px; }
.study-methods-quiz-wrap { margin-bottom: 2rem; }
.study-methods-quiz-header { margin-bottom: 1.25rem; }
.study-methods-quiz-title { font-size: 1.25rem; color: #5E8578; margin: 0 0 0.25rem 0; }
.study-methods-quiz-progress { font-size: 0.9rem; color: #666; margin: 0; }
.study-methods-quiz-q-text { font-size: 1.1rem; font-weight: 600; color: #333; margin: 0 0 1rem 0; }
.study-methods-quiz-options { border: none; padding: 0; margin: 0 0 1.25rem 0; }
.study-methods-quiz-option {
    display: block;
    padding: 10px 14px;
    margin-bottom: 8px;
    background: #fff;
    border: 2px solid rgba(127, 168, 154, 0.25);
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: border-color 0.2s, background 0.2s;
}
.study-methods-quiz-option:hover { border-color: rgba(127, 168, 154, 0.5); }
.study-methods-quiz-option:has(input:checked) { border-color: #5E8578; background: rgba(127, 168, 154, 0.08); }
.study-methods-quiz-option input { margin-right: 8px; }
.study-methods-quiz-nav { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.study-methods-quiz-back { background: #eee; color: #333; }
.study-methods-quiz-result { text-align: center; }
.study-methods-quiz-result-label { font-size: 0.9rem; color: #666; margin: 0 0 0.75rem 0; }
.study-methods-quiz-result-card {
    max-width: 320px;
    margin: 0 auto 1.25rem;
    padding: 1.5rem;
    background: #fff;
    border-radius: 16px;
    border: 2px solid rgba(127, 168, 154, 0.3);
    box-shadow: 0 4px 20px rgba(127, 168, 154, 0.12);
}
.study-methods-quiz-result-emoji { font-size: 2.5rem; display: block; margin-bottom: 0.5rem; }
.study-methods-quiz-result-title { font-size: 1.25rem; color: #5E8578; margin: 0 0 0.5rem 0; }
.study-methods-quiz-result-desc { font-size: 0.95rem; color: #555; margin: 0; line-height: 1.4; }
.study-methods-quiz-result .study-session-btn { margin: 0 6px 8px 0; }
.study-methods-quiz-browse { background: transparent; color: #5E8578; border: 2px solid rgba(94, 133, 120, 0.4); }
.study-methods-quiz-browse:hover { background: rgba(94, 133, 120, 0.1); }

.study-sessions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
    margin-top: 24px;
}

.study-session-card {
    background: white;
    border-radius: 16px;
    padding: 28px;
    text-align: left;
    box-shadow: 0 4px 20px rgba(127, 168, 154, 0.12);
    border: 1px solid rgba(127, 168, 154, 0.2);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.study-session-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 32px rgba(127, 168, 154, 0.18);
    border-color: rgba(127, 168, 154, 0.35);
}

.study-method-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.study-method-emoji {
    font-size: 1.75rem;
    line-height: 1;
}

.study-method-title {
    color: #5E8578;
    font-size: 1.25rem;
    margin: 0;
    font-weight: 600;
}

.study-session-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #7FA89A 0%, #5E8578 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.05em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.study-session-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 14px rgba(127, 168, 154, 0.4);
}

.study-method-dropdown {
    margin-top: 16px;
    border-radius: 10px;
    background: rgba(127, 168, 154, 0.08);
    border: 1px solid rgba(127, 168, 154, 0.15);
}

.study-method-dropdown-summary {
    list-style: none;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: #5E8578;
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}

.study-method-dropdown-summary::-webkit-details-marker,
.study-method-dropdown-summary::marker {
    display: none;
}

.study-method-dropdown-summary::before {
    content: "▸";
    font-size: 0.85em;
    transition: transform 0.2s ease;
}

.study-method-dropdown[open] .study-method-dropdown-summary::before {
    transform: rotate(90deg);
}

.study-method-dropdown-text {
    margin: 0;
    padding: 0 14px 14px 14px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #555;
}

/* Blurting method */
.blurting-container {
    max-width: 720px;
    padding-top: 1rem;
}
.blurting-back-btn {
    background: none;
    border: none;
    color: #5E8578;
    cursor: pointer;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    padding: 0.25rem 0;
}
.blurting-back-btn:hover { text-decoration: underline; }
.blurting-container h1 { margin-bottom: 0.35rem; }
.blurting-intro {
    color: #555;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}
.blurting-setup .blurting-label,
.blurting-timer-opt .blurting-label {
    display: block;
    font-weight: 600;
    color: #5E8578;
    margin-bottom: 0.35rem;
    font-size: 0.95rem;
}
.blurting-topic-input,
.blurting-minutes-input {
    width: 100%;
    max-width: 320px;
    padding: 10px 14px;
    border: 1px solid rgba(127, 168, 154, 0.35);
    border-radius: 10px;
    font-size: 1rem;
    margin-bottom: 1rem;
}
.blurting-timer-opt { margin-bottom: 1.25rem; }
.blurting-minutes-input { max-width: 80px; }
.blurting-start-btn { max-width: 240px; margin-top: 0.5rem; }
.blurting-write-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}
.blurting-topic-display { font-weight: 600; color: #5E8578; }
.blurting-timer-display { font-variant-numeric: tabular-nums; color: #555; }
.blurting-textarea {
    width: 100%;
    min-height: 280px;
    padding: 16px;
    border: 1px solid rgba(127, 168, 154, 0.35);
    border-radius: 12px;
    font-size: 1rem;
    line-height: 1.5;
    resize: vertical;
    margin-bottom: 1rem;
}
.blurting-write-actions { margin-top: 0.5rem; }
.blurting-done-msg {
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
    color: #555;
}
.blurting-done-view .study-session-btn { max-width: 240px; }

/* Spinner Wheel */
.spinner-wheel-container {
    max-width: 920px;
    padding: 1.5rem 1rem 2rem;
    background: linear-gradient(180deg, rgba(127, 168, 154, 0.06) 0%, transparent 40%);
    border-radius: 20px;
}
.spinner-wheel-container .blurting-back-btn { margin-bottom: 1rem; }
.spinner-wheel-intro { color: #555; margin-bottom: 1.25rem; font-size: 1rem; line-height: 1.45; }
.spinner-wheel-add-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 1rem; }
.spinner-wheel-add-row .spinner-wheel-input { flex: 1; min-width: 120px; }
.spinner-wheel-input {
    padding: 10px 14px;
    border: 1px solid rgba(127, 168, 154, 0.3);
    border-radius: 12px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.spinner-wheel-input:focus {
    outline: none;
    border-color: #5E8578;
    box-shadow: 0 0 0 3px rgba(94, 133, 120, 0.15);
}
.spinner-wheel-add-btn { flex-shrink: 0; }
.spinner-wheel-list { list-style: none; padding: 0; margin: 0 0 1.25rem 0; }
.spinner-wheel-list-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px; margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    border: 1px solid rgba(127, 168, 154, 0.2);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.spinner-wheel-list-term { font-weight: 500; color: #333; }
.spinner-wheel-list-remove {
    background: none; border: none; color: #888; cursor: pointer;
    font-size: 1.25rem; line-height: 1; padding: 0 6px;
    border-radius: 6px; transition: color 0.2s, background 0.2s;
}
.spinner-wheel-list-remove:hover { color: #c00; background: rgba(0,0,0,0.04); }
.spinner-wheel-start-btn { max-width: 200px; }
.spinner-wheel-play-header {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 10px; margin-bottom: 16px;
}
.spinner-wheel-add-during {
    background: rgba(127, 168, 154, 0.12);
    border: 1px solid rgba(127, 168, 154, 0.25);
    color: #5E8578;
    cursor: pointer;
    font-size: 0.9rem; font-weight: 600;
    padding: 8px 14px; border-radius: 10px;
    transition: background 0.2s, border-color 0.2s;
}
.spinner-wheel-add-during:hover {
    background: rgba(127, 168, 154, 0.2);
    border-color: rgba(127, 168, 154, 0.4);
}
.spinner-wheel-mode-label { font-size: 0.9rem; color: #5a6b64; font-weight: 500; }
.spinner-wheel-add-during-form {
    display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
    margin-bottom: 14px;
}
.spinner-wheel-add-during-form .spinner-wheel-input { flex: 1; min-width: 100px; }
.spinner-wheel-how {
    text-align: center;
    font-size: 0.9rem;
    color: #5a6b64;
    margin: 0 0 16px 0;
    padding: 10px 16px;
    background: rgba(127, 168, 154, 0.08);
    border-radius: 12px;
    border: 1px solid rgba(127, 168, 154, 0.15);
    line-height: 1.4;
}
.spinner-wheel-main-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: center;
    gap: 24px;
    width: 100%;
}
.spinner-wheel-side {
    flex: 0 0 160px;
    min-width: 140px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 14px;
    border: 1px solid rgba(127, 168, 154, 0.15);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}
.spinner-wheel-side-title {
    margin: 0 0 10px 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: #5E8578;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.spinner-wheel-on-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}
.spinner-wheel-on-item {
    padding: 6px 0;
    border-bottom: 1px solid rgba(127, 168, 154, 0.1);
    color: #333;
}
.spinner-wheel-on-item:last-child { border-bottom: none; }
.spinner-wheel-on-pts {
    color: #5E8578;
    font-weight: 600;
    font-size: 0.8rem;
}
.spinner-wheel-on-empty {
    color: #888;
    font-size: 0.85rem;
    padding: 6px 0;
    margin: 0;
}
.spinner-wheel-all-title { margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(127, 168, 154, 0.12); }
.spinner-wheel-all-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.88rem;
    max-height: 200px;
    overflow-y: auto;
}
.spinner-wheel-all-item {
    padding: 5px 0;
    border-bottom: 1px solid rgba(127, 168, 154, 0.08);
    color: #333;
}
.spinner-wheel-all-item:last-child { border-bottom: none; }
.spinner-wheel-stats { margin-bottom: 12px; }
.spinner-wheel-stat {
    margin: 0 0 6px 0;
    font-size: 0.9rem;
    color: #333;
}
.spinner-wheel-stat:last-child { margin-bottom: 0; }
.spinner-wheel-tip-side {
    margin: 0;
    padding: 10px 0 0 0;
    border-top: 1px solid rgba(127, 168, 154, 0.12);
    font-size: 0.8rem;
}
.spinner-wheel-center-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto;
    order: 0;
}
.spinner-wheel-side-left { order: 1; }
.spinner-wheel-side-right { order: 2; }
@media (max-width: 820px) {
    .spinner-wheel-main-row { flex-wrap: wrap; flex-direction: column; align-items: center; }
    .spinner-wheel-side { flex: 1 1 auto; width: 100%; max-width: 360px; }
}
.spinner-wheel-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(127, 168, 154, 0.12);
    text-align: center;
    width: 100%;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
}
.spinner-wheel-progress {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #5E8578;
    margin-bottom: 10px;
}
.spinner-wheel-tip {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 10px;
    line-height: 1.4;
    font-style: italic;
}
.spinner-wheel-arena {
    margin: 28px 0;
    position: relative;
    padding: 20px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(127, 168, 154, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(127, 168, 154, 0.15);
}
.spinner-wheel-wrap {
    width: 440px; height: 440px; margin: 0 auto;
    position: relative;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.08));
}
.spinner-wheel-svg {
    width: 100%; height: 100%;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.95);
}
.spinner-wheel-pointer {
    position: absolute; top: 0; left: 50%;
    transform: translate(-50%, -100%);
    width: 0; height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 32px solid #4a6b60;
    z-index: 2;
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}
.spinner-wheel-spin-btn {
    display: block;
    margin: 0 auto 1.25rem;
    max-width: 180px;
    padding: 14px 28px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(94, 133, 120, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
}
.spinner-wheel-spin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(94, 133, 120, 0.4);
}
.spinner-wheel-landed { margin-top: 1.75rem; text-align: center; }
.spinner-wheel-card {
    max-width: 340px; margin: 0 auto 14px;
    min-height: 120px;
    cursor: pointer;
    perspective: 800px;
    transition: transform 0.2s;
}
.spinner-wheel-card:hover { transform: scale(1.02); }
.spinner-wheel-card-inner {
    position: relative; width: 100%; min-height: 120px;
    transition: transform 0.4s ease;
    transform-style: preserve-3d;
}
.spinner-wheel-card.flipped .spinner-wheel-card-inner { transform: rotateY(180deg); }
.spinner-wheel-card-front,
.spinner-wheel-card-back {
    position: absolute; width: 100%; min-height: 120px; left: 0; top: 0;
    backface-visibility: hidden;
    display: flex; align-items: center; justify-content: center;
    padding: 22px;
    border-radius: 16px;
    box-shadow: 0 6px 24px rgba(127, 168, 154, 0.2), 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(127, 168, 154, 0.2);
}
.spinner-wheel-card-front {
    background: linear-gradient(145deg, #6b9a8e 0%, #5E8578 50%, #4a6b60 100%);
    color: #fff;
    font-weight: 600;
    font-size: 1.2rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.spinner-wheel-card-back {
    background: #fff;
    color: #333;
    transform: rotateY(180deg);
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: left;
}
.spinner-wheel-tap-hint { font-size: 0.85rem; color: #666; margin-bottom: 14px; }
.spinner-wheel-actions {
    display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
}
.spinner-wheel-actions .study-session-btn {
    max-width: 140px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(94, 133, 120, 0.25);
    transition: transform 0.15s, box-shadow 0.15s;
}
.spinner-wheel-actions .study-session-btn:hover {
    box-shadow: 0 4px 12px rgba(94, 133, 120, 0.35);
}
.spinner-wheel-hide.hidden { display: none !important; }

.monitor-pomodoro-countdown {
    text-align: center;
    padding: 12px;
    margin: 12px 0;
    background: rgba(127, 168, 154, 0.12);
    border-radius: 10px;
    border: 1px solid rgba(127, 168, 154, 0.25);
}
.monitor-pomodoro-countdown.hidden {
    display: none !important;
}
.monitor-pomodoro-label {
    display: block;
    font-size: 0.9rem;
    color: #5E8578;
    margin-bottom: 4px;
}
.monitor-pomodoro-time {
    font-size: 1.75rem;
    font-weight: 700;
    color: #5E8578;
}

/* ========== Pomodoro Arena (focus environment) ========== */
.pomodoro-arena {
    min-height: 100vh;
    background: linear-gradient(165deg, #0f172a 0%, #1e293b 40%, #334155 100%);
    padding: 2rem 1.5rem;
    position: relative;
}
.pomodoro-arena .pomodoro-view { max-width: 520px; margin: 0 auto; text-align: center; }
.pomodoro-arena .pomodoro-view.hidden { display: none !important; }

.pomodoro-streak {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 1.5rem;
}
.pomodoro-streak span { color: #f59e0b; font-weight: 600; }

/* Circular timer ring */
.pomodoro-timer-ring {
    width: 220px;
    height: 220px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: box-shadow 0.4s ease;
}
.pomodoro-timer-inner {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}
.pomodoro-timer-display {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.1;
}
.pomodoro-timer-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 0.25rem;
    opacity: 0.9;
}
.pomodoro-timer-ready {
    border: 4px solid rgba(148, 163, 184, 0.4);
    color: rgba(226, 232, 240, 0.9);
}
.pomodoro-timer-running {
    border: 4px solid transparent;
    color: #86efac;
    box-shadow: 0 0 40px rgba(34, 197, 94, 0.25);
}
.pomodoro-timer-running .pomodoro-timer-progress {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(#22c55e 0deg var(--pomodoro-progress, 0deg), rgba(34, 197, 94, 0.2) var(--pomodoro-progress, 0deg));
}
.pomodoro-timer-running.pomodoro-last-minute {
    color: #f87171;
    box-shadow: 0 0 50px rgba(248, 113, 113, 0.35);
}
.pomodoro-timer-running.pomodoro-last-minute .pomodoro-timer-progress {
    background: conic-gradient(#ef4444 0deg var(--pomodoro-progress, 0deg), rgba(239, 68, 68, 0.2) var(--pomodoro-progress, 0deg));
}
.pomodoro-timer-running.pomodoro-last-minute { animation: pomodoro-heartbeat 1s ease-in-out infinite; }
@keyframes pomodoro-heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}
.pomodoro-timer-finished {
    border: 4px solid rgba(234, 179, 8, 0.6);
    color: #fcd34d;
    box-shadow: 0 0 50px rgba(234, 179, 8, 0.2);
}
.pomodoro-complete-emoji { font-size: 3rem; display: block; margin-bottom: 0.25rem; }

.pomodoro-intro {
    color: rgba(226, 232, 240, 0.85);
    font-size: 1rem;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}
.pomodoro-intention { margin-bottom: 1.5rem; }
.pomodoro-intention-label {
    display: block;
    font-size: 0.8rem;
    color: rgba(226, 232, 240, 0.7);
    margin-bottom: 0.5rem;
}
.pomodoro-intention-select {
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #e2e8f0;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.95rem;
    min-width: 200px;
}

/* Pill buttons */
.pomodoro-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.75rem;
    font-size: 1.05rem;
    font-weight: 600;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
    font-family: inherit;
}
.pomodoro-pill:hover { transform: scale(1.03); }
.pomodoro-pill:active { transform: scale(0.98); }
.pomodoro-pill-icon { font-size: 1.1em; }
.pomodoro-pill-start, .pomodoro-pill-primary {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.4);
}
.pomodoro-pill-stop {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.35);
}
.pomodoro-pill-save {
    background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
    color: #1e293b;
    box-shadow: 0 4px 20px rgba(234, 179, 8, 0.4);
}
.pomodoro-pill-secondary {
    background: rgba(148, 163, 184, 0.2);
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.4);
}
.pomodoro-pill-ghost {
    background: transparent;
    color: rgba(226, 232, 240, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.3);
}
.pomodoro-shortcut {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: rgba(148, 163, 184, 0.6);
}
.pomodoro-shortcut kbd {
    background: rgba(51, 65, 85, 0.8);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.75em;
}

/* Focus mode layout */
.pomodoro-focus-view { max-width: 100%; }
.pomodoro-focus-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}
.pomodoro-focus-main { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.pomodoro-focus-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem 1.25rem;
    font-size: 0.95rem;
    color: rgba(226, 232, 240, 0.9);
}
.pomodoro-activity-badge { font-size: 1rem; }
.pomodoro-focus-score-line strong { color: #86efac; }
.pomodoro-phone-line { font-size: 0.9rem; opacity: 0.9; }
.pomodoro-xp-live {
    font-size: 1rem;
    font-weight: 600;
    color: #fcd34d;
}
.pomodoro-focus-bars {
    width: 100%;
    max-width: 260px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.pomodoro-bar-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: rgba(226, 232, 240, 0.85);
}
.pomodoro-bar-row span { flex: 0 0 85px; }
.pomodoro-bar {
    flex: 1;
    height: 8px;
    background: rgba(51, 65, 85, 0.8);
    border-radius: 4px;
    overflow: hidden;
}
.pomodoro-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #22c55e, #86efac);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.pomodoro-focus-creature {
    margin-top: 0.5rem;
    padding: 1rem 1.25rem;
    background: rgba(30, 41, 59, 0.6);
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.15);
}
.pomodoro-creature-avatar { font-size: 2.5rem; margin-bottom: 0.25rem; }
.pomodoro-creature-msg {
    font-size: 0.95rem;
    color: rgba(226, 232, 240, 0.9);
    font-style: italic;
    margin: 0;
}

.pomodoro-video-pip {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    width: 120px;
    height: 90px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(34, 197, 94, 0.4);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    z-index: 10;
}
.pomodoro-video-pip .monitor-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pomodoro-save-wrap { margin-top: 1rem; }
.pomodoro-stats-hidden, .pomodoro-status-hidden { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

/* Complete & break views */
.pomodoro-complete-view .pomodoro-timer-ring { margin-bottom: 1rem; }
.pomodoro-complete-title { font-size: 1.5rem; color: #fcd34d; margin: 0 0 0.5rem; }
.pomodoro-complete-xp { font-size: 1.75rem; font-weight: 700; color: #86efac; margin: 0.25rem 0; }
.pomodoro-complete-unlock { color: rgba(226, 232, 240, 0.9); margin-bottom: 1rem; }
.pomodoro-complete-why { color: rgba(226, 232, 240, 0.75); font-size: 0.9rem; margin-bottom: 1.25rem; max-width: 380px; margin-left: auto; margin-right: auto; }
.pomodoro-complete-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}
.pomodoro-creature-complete { font-size: 1rem; color: rgba(226, 232, 240, 0.85); margin-top: 1rem; }
.pomodoro-break-title { color: #e2e8f0; font-size: 1.5rem; margin-bottom: 0.25rem; }
.pomodoro-break-sub { color: rgba(226, 232, 240, 0.8); margin-bottom: 1.5rem; }
.pomodoro-break-grid { margin-bottom: 1.5rem; }
.pomodoro-break-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }

/* Milestone toast */
.pomodoro-milestone-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 1rem 1.5rem;
    background: rgba(30, 41, 59, 0.98);
    border: 2px solid #22c55e;
    border-radius: 16px;
    color: #86efac;
    font-weight: 700;
    font-size: 1.25rem;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.pomodoro-milestone-toast.show {
    opacity: 1;
    animation: pomodoro-toast-pop 0.4s ease;
}
@keyframes pomodoro-toast-pop {
    0% { transform: translate(-50%, -50%) scale(0.9); }
    70% { transform: translate(-50%, -50%) scale(1.05); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

.word-game-actions {
    display: flex;
    gap: 10px;
    width: 100%;
}

.word-game-actions .play-btn {
    flex: 1;
    margin: 0;
}

/* Wavelength game */
.wavelength-container { max-width: 640px; margin: 0 auto; padding: 20px; }
.wavelength-game .spectrum-labels { display: flex; justify-content: space-between; margin: 1rem 0; font-weight: 600; color: var(--text-primary); }
.wavelength-game .wavelength-slider { width: 100%; margin: 0.5rem 0; }
.wavelength-game .guess-area, .wavelength-game .clue-input-area { margin: 1rem 0; }
.wavelength-game .round-info { color: var(--text-secondary); margin-bottom: 0.5rem; }
.wavelength-game .wavelength-scores { margin-top: 1.5rem; }
.wavelength-game .wavelength-scores ul { list-style: none; padding: 0; }
.wavelength-results .wavelength-leaderboard { list-style: none; padding: 0; margin: 1rem 0; }

/* Game Modal */
.game-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.game-modal.hidden {
    display: none !important;
}

.game-modal:not(.hidden) {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 30px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px var(--shadow);
    color: var(--text-primary);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2em;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

/* Typing Game */
.typing-game {
    min-width: 600px;
}

.typing-display {
    text-align: center;
    margin: 40px 0;
}

.word-display {
    font-size: 3em;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 30px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.typing-input {
    width: 100%;
    padding: 15px;
    font-size: 1.5em;
    text-align: center;
    border: 3px solid var(--accent-primary);
    border-radius: 10px;
    text-transform: lowercase;
    background: var(--bg-card);
    color: var(--text-primary);
}

.game-stats {
    display: flex;
    gap: 30px;
    justify-content: center;
    padding: 20px;
    background: var(--bg-card);
    border-radius: 10px;
    margin-bottom: 20px;
}

.game-stats span {
    font-size: 1.1em;
    color: var(--text-secondary);
}

.game-stats strong {
    color: var(--accent-primary);
    font-size: 1.2em;
}

/* Memory Game */
.memory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
}

.memory-card {
    aspect-ratio: 1;
    background: var(--accent-primary);
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.3s;
}

.memory-card.flipped {
    transform: rotateY(180deg);
}

.memory-card.matched {
    opacity: 0.5;
    cursor: default;
}

.card-back, .card-front {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
    border-radius: 10px;
}

.card-back {
    background: var(--accent-primary);
    color: white;
    font-size: 2em;
    font-weight: 700;
}

.card-front {
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 3em;
    transform: rotateY(180deg);
}

/* Snake Game */
.snake-game {
    text-align: center;
}

#snakeCanvas {
    border: 3px solid var(--accent-primary);
    border-radius: 10px;
    background: var(--bg-card);
    display: block;
    margin: 20px auto;
}

.snake-controls {
    margin-top: 20px;
}

/* Wordle Game */
.wordle-game {
    min-width: 400px;
}

.wordle-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 30px 0;
}

.wordle-row {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.wordle-cell {
    width: 60px;
    height: 60px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    font-weight: 700;
    text-transform: uppercase;
    background: var(--bg-card);
    color: var(--text-primary);
}

.wordle-cell.correct {
    background: #4caf50;
    color: white;
    border-color: #4caf50;
}

.wordle-cell.present {
    background: #ffc107;
    color: white;
    border-color: #ffc107;
}

.wordle-cell.absent {
    background: #757575;
    color: white;
    border-color: #757575;
}

.wordle-input-area {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.wordle-input {
    flex: 1;
    padding: 12px;
    font-size: 1.2em;
    text-align: center;
    text-transform: uppercase;
    border: 2px solid var(--accent-primary);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
}

.typing-results, .memory-results, .snake-results, .wordle-results {
    text-align: center;
    padding: 30px;
    background: var(--bg-card);
    border-radius: 10px;
    margin-top: 20px;
    color: var(--text-primary);
}

.typing-results h2,
.typing-results p,
.memory-results h2,
.memory-results p,
.snake-results h2,
.snake-results p,
.wordle-results h2,
.wordle-results p {
    color: var(--text-primary);
}

.typing-results strong,
.memory-results strong,
.snake-results strong,
.wordle-results strong {
    color: var(--accent-primary);
}

/* Activity Selector Styles */
.activity-selector {
    background: transparent;
    padding: 0;
    margin-bottom: 0;
}

/* Activity grid - cleaner cards with better spacing */
.activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px; /* Increased gap for cleaner look */
    margin-bottom: 0;
}

.activity-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 20px; /* Generous padding */
    background: var(--bg-card);
    border: none; /* Removed border, using shadow instead */
    border-radius: 16px; /* Standardized radius */
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow-soft);
}

.activity-btn:hover {
    background: var(--accent-gradient);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 20px var(--shadow);
}

.activity-icon {
    font-size: 2.5em;
    margin-bottom: 8px; /* Better spacing */
}

.activity-name {
    font-size: 0.95em;
    font-weight: 600;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

/* Removed duplicate - using styles defined above */

.current-activity-display {
    margin-top: 30px;
}

/* Activity confirmed card - emphasizes "locked-in" state with prominent check */
.activity-confirmed {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px; /* More generous padding */
    background: var(--bg-card);
    border-radius: 18px; /* Standardized radius */
    box-shadow: 0 4px 16px var(--shadow-soft), 0 0 0 1px rgba(76, 175, 80, 0.2);
    gap: 24px; /* Better spacing */
    border: none; /* Removed heavy border, using shadow instead */
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

[data-theme="dark"] .activity-confirmed {
    box-shadow: 0 4px 16px var(--shadow-soft), 0 0 0 1px rgba(76, 175, 80, 0.3);
}

.activity-check {
    width: 48px; /* Larger for emphasis */
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--success-color) 0%, #45a049 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6em;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.35);
    position: relative;
}

/* Subtle pulse animation on check to draw attention */
.activity-check::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(76, 175, 80, 0.3);
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

.activity-info {
    display: flex;
    flex-direction: column;
    gap: 6px; /* Better spacing */
    flex: 1;
    text-align: left;
}

.activity-label {
    font-size: 0.8em;
    color: var(--text-tertiary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    transition: color 0.3s ease;
}

.activity-name-large {
    font-size: 1.4em; /* Slightly larger for emphasis */
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.3px;
    transition: color 0.3s ease;
}

.current-activity-display p {
    font-size: 1.2em;
    color: #2e7d32;
    margin-bottom: 15px;
}

.current-activity-display strong {
    font-size: 1.3em;
    color: #1b5e20;
}

.change-activity-btn {
    padding: 10px 24px;
    background: white;
    border: 2px solid #4caf50;
    border-radius: 10px;
    color: #4caf50;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95em;
}

.change-activity-btn:hover {
    background: #4caf50;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

@media (max-width: 768px) {
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        padding: 20px;
        max-width: 95%;
    }
    
    .typing-game {
        min-width: auto;
    }
    
    .word-display {
        font-size: 2em;
    }
    
    .memory-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    #snakeCanvas {
        width: 100%;
        max-width: 400px;
    }
    
    .activity-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    #signalsGrid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    #scoresGrid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .metric-card {
        padding: 10px 12px;
        min-height: 70px;
    }
    
    .metric-label {
        font-size: 0.8em;
        margin-bottom: 4px;
    }
    
    .metric-value {
        font-size: 1.1em;
        margin-bottom: 6px;
    }
}

/* Avatar Customization Styles */
.avatar-customization-section {
    padding: 0;
    box-shadow: none;
    margin: 0;
    max-width: 100%;
}

.avatar-customization-section h3 {
    color: #333;
    margin-bottom: 25px;
    font-size: 1.3em;
}

.customization-preview {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #FAF7F2;
    border-radius: 12px;
}

.customization-preview #customizationPreview {
    display: inline-block;
}

.avatar-canvas {
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.customization-options {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.customization-group h4 {
    color: #666;
    font-size: 1em;
    margin-bottom: 12px;
    font-weight: 600;
}

.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.color-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.color-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.color-btn.active {
    border-color: #7FA89A;
    box-shadow: 0 0 0 3px rgba(127, 168, 154, 0.3);
}

.expression-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.expression-btn {
    padding: 10px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95em;
}

.expression-btn:hover {
    border-color: #7FA89A;
    background: #FAF7F2;
}

.expression-btn.active {
    border-color: #7FA89A;
    background: #7FA89A;
    color: white;
}

.accessory-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.accessory-btn {
    padding: 10px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95em;
}

.accessory-btn:hover:not(.disabled) {
    border-color: #7FA89A;
    background: #FAF7F2;
}

.accessory-btn.active {
    border-color: #7FA89A;
    background: #7FA89A;
    color: white;
}

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

.game-avatar-container {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.game-avatar-container .avatar-image {
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    background: white;
}

.avatar-image {
    border-radius: 50%;
    object-fit: contain;
    display: block;
}

.avatar-selection-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.avatar-option-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    color: var(--text-primary);
}

.avatar-option-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(127, 168, 154, 0.1), transparent);
    transition: left 0.5s;
}

.avatar-option-card:hover::before {
    left: 100%;
}

.avatar-option-card:hover {
    border-color: #7FA89A;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 8px 20px rgba(127, 168, 154, 0.3), 0 0 15px rgba(127, 168, 154, 0.1);
    color: var(--text-primary);
}

.avatar-option-card.active {
    border-color: #7FA89A;
    background: linear-gradient(135deg, #7FA89A 0%, #5E8578 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(127, 168, 154, 0.5), 0 0 20px rgba(127, 168, 154, 0.3);
    transform: scale(1.05);
    animation: activePulse 2s ease-in-out infinite;
}

@keyframes activePulse {
    0%, 100% { 
        box-shadow: 0 8px 25px rgba(127, 168, 154, 0.5), 0 0 20px rgba(127, 168, 154, 0.3);
    }
    50% { 
        box-shadow: 0 8px 25px rgba(127, 168, 154, 0.7), 0 0 30px rgba(127, 168, 154, 0.5);
    }
}

.avatar-option-preview {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 120px;
}

.avatar-option-image {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 50%;
    background: var(--bg-card);
    padding: 5px;
    transition: background 0.3s ease;
}

.avatar-option-card.active .avatar-option-image {
    background: rgba(255, 255, 255, 0.2);
}

.avatar-option-card h4 {
    margin: 10px 0 5px;
    font-size: 1.1em;
    font-weight: 600;
    text-transform: lowercase;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.avatar-option-card.active h4 {
    color: white;
}

.avatar-description {
    margin: 5px 0;
    font-size: 0.9em;
    font-weight: 500;
    text-transform: lowercase;
    font-style: italic;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.avatar-option-card.active .avatar-description {
    color: rgba(255, 255, 255, 0.9);
}

.avatar-lore {
    margin: 10px 0 0;
    font-size: 0.8em;
    line-height: 1.5;
    text-transform: lowercase;
    color: var(--text-secondary);
    opacity: 0.9;
    transition: color 0.3s ease, opacity 0.3s ease;
}

.avatar-option-card.active .avatar-lore {
    color: rgba(255, 255, 255, 0.85);
    opacity: 1;
}

.avatar-option-card p {
    margin: 0;
    font-size: 0.85em;
    opacity: 0.8;
}

/* Multiplayer Rooms Styles */
.multiplayer-container {
    max-width: 1200px;
}

.multiplayer-actions {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.create-room-btn, .refresh-rooms-btn {
    min-height: 44px;
    padding: 12px 24px;
}

.rooms-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.rooms-section h2 {
    color: #333;
    margin-bottom: 20px;
}

.rooms-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.no-rooms {
    text-align: center;
    color: #999;
    padding: 40px;
    font-style: italic;
}

.room-card {
    background: #FAF7F2;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s;
}

.room-card:hover {
    border-color: #7FA89A;
    box-shadow: 0 4px 12px rgba(127, 168, 154, 0.2);
    transform: translateY(-3px);
}

.room-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.room-card-header h3 {
    color: #7FA89A;
    margin: 0;
    font-size: 1.2em;
}

.room-id {
    font-size: 0.85em;
    color: #999;
    font-family: monospace;
}

.room-card-info {
    margin-bottom: 15px;
}

.room-card-info p {
    margin: 8px 0;
    color: #666;
    font-size: 0.95em;
}

.join-room-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #7FA89A 0%, #5E8578 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 44px;
}

.join-room-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(127, 168, 154, 0.4);
}

.room-lobby {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.room-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
    padding: 20px;
    background: #FAF7F2;
    border-radius: 10px;
}

.room-info-item {
    color: #666;
    font-size: 0.95em;
}

.players-list {
    margin: 25px 0;
}

.players-list h3 {
    color: #333;
    margin-bottom: 15px;
}

.player-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #FAF7F2;
    border-radius: 8px;
    margin-bottom: 10px;
}

.player-name {
    font-weight: 600;
    color: #333;
}

.player-status.ready {
    color: #4caf50;
    font-weight: 600;
}

.player-status.not-ready {
    color: #ff9800;
}

.player-score {
    color: #7FA89A;
    font-weight: 600;
}

.lobby-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.ready-btn, .start-game-btn, .leave-room-btn {
    min-height: 44px;
    padding: 12px 24px;
}

.pacman-game-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.pacman-game-area {
    text-align: center;
    margin: 20px 0;
}

#pacmanCanvas {
    border: 3px solid #7FA89A;
    border-radius: 10px;
    background: #000;
    max-width: 100%;
    height: auto;
}

.pacman-scores {
    margin: 20px 0;
    padding: 20px;
    background: #FAF7F2;
    border-radius: 10px;
}

.pacman-scores h3 {
    color: #333;
    margin-bottom: 15px;
}

.pacman-scores p {
    margin: 8px 0;
    color: #666;
}

.pacman-scores .current-player {
    color: #7FA89A;
    font-weight: 600;
}

.pacman-controls {
    text-align: center;
    color: #666;
    margin-top: 15px;
}

@media (max-width: 768px) {
    .rooms-list {
        grid-template-columns: 1fr;
    }
    
    .room-info {
        grid-template-columns: 1fr;
    }
    
    .player-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    #pacmanCanvas {
        width: 100%;
        max-width: 100%;
    }
    
    .lobby-actions {
        flex-direction: column;
    }
    
    .lobby-actions button {
        width: 100%;
    }
}

/* Fullscreen Game Page */
#gamePlayPage {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 2000;
    overflow: hidden;
}

.fullscreen-game-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.fullscreen-game-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #000;
}

.game-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 2px solid #7FA89A;
    z-index: 10;
}

.game-scores {
    color: white;
}

.game-scores h3 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 1.2em;
}

#scoresList {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.score-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    background: rgba(127, 168, 154, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(127, 168, 154, 0.5);
}

.score-item.current-player {
    background: rgba(127, 168, 154, 0.4);
    border-color: #7FA89A;
    font-weight: 600;
}

.score-item .player-name {
    color: #fff;
}

.score-item .player-score {
    color: #FFD700;
    font-weight: 700;
    font-size: 1.1em;
}

.exit-game-btn {
    padding: 10px 20px;
    background: rgba(255, 0, 0, 0.2);
    border: 2px solid #ff4444;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.exit-game-btn:hover {
    background: rgba(255, 0, 0, 0.4);
    transform: scale(1.05);
}

.game-canvas-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow: hidden;
    min-height: 600px;
    width: 100%;
}

.game-canvas-container #phaser-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-canvas-container #phaser-container canvas {
    border: 3px solid #7FA89A;
    border-radius: 10px;
    background: #000;
    display: block;
    margin: 0 auto;
}

.game-canvas-container #pacmanCanvas {
    max-width: 100%;
    max-height: 100%;
    border: 3px solid #7FA89A;
    border-radius: 10px;
    background: #000;
}

.game-controls-bar {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.8);
    border-top: 2px solid #7FA89A;
    text-align: center;
    color: #fff;
    z-index: 10;
}

.game-controls-bar p {
    color: #ccc;
    font-size: 0.9em;
}

@media (max-width: 768px) {
    .game-header-bar {
        flex-direction: column;
        gap: 15px;
        padding: 10px;
    }
    
    .game-scores h3 {
        font-size: 1em;
    }
    
    #scoresList {
        gap: 10px;
    }
    
    .score-item {
        padding: 6px 12px;
        font-size: 0.9em;
    }
    
    .game-canvas-container {
        padding: 10px;
    }
    
    .exit-game-btn {
        width: 100%;
        padding: 12px;
    }
}

/* Join Confirmation Modal */
.join-confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.join-confirm-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

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

.join-confirm-content h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.join-confirm-content p {
    color: #666;
    margin-bottom: 25px;
    font-size: 1.1em;
    line-height: 1.6;
}

.join-confirm-content strong {
    color: #7FA89A;
    font-size: 1.2em;
}

.confirm-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.confirm-btn, .cancel-btn {
    min-height: 44px;
    padding: 12px 24px;
    font-size: 16px;
}

/* Terms and Conditions Page */
.terms-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.terms-content {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 8px var(--shadow-soft);
}

.terms-content h1 {
    font-size: 2.5em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    text-transform: lowercase;
}

.terms-updated {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 30px;
    font-style: italic;
}

.terms-intro {
    font-size: 1.1em;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.terms-section {
    margin-bottom: 35px;
}

.terms-section h2 {
    font-size: 1.5em;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 15px;
    text-transform: lowercase;
}

.terms-section h3 {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 20px;
    margin-bottom: 10px;
    text-transform: lowercase;
}

.terms-section p {
    font-size: 1em;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.terms-section ul {
    margin-left: 25px;
    margin-bottom: 15px;
}

.terms-section li {
    font-size: 1em;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.contact-email {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
}

.contact-email:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .terms-content {
        padding: 25px;
    }
    
    .terms-content h1 {
        font-size: 2em;
    }
    
    .terms-section h2 {
        font-size: 1.3em;
    }
    
    .terms-intro {
        font-size: 1em;
    }
}

/* Terms Dropdown in About Us */
.terms-dropdown-section {
    margin-top: 40px;
    border-top: 2px solid var(--border-color);
    padding-top: 30px;
}

.terms-dropdown-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1em;
    font-weight: 500;
    color: var(--text-primary);
}

.terms-dropdown-toggle:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.terms-dropdown-toggle .dropdown-arrow {
    transition: transform 0.3s ease;
    font-size: 0.9em;
}

.terms-dropdown-toggle.active .dropdown-arrow {
    transform: rotate(180deg);
}

.terms-dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.3s ease;
    background: var(--bg-card);
    border-radius: 10px;
    margin-top: 10px;
}

.terms-dropdown-content:not(.hidden) {
    max-height: 5000px;
    padding: 20px;
    border: 2px solid var(--border-color);
}

.terms-dropdown-inner {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 10px;
}

.terms-dropdown-inner::-webkit-scrollbar {
    width: 8px;
}

.terms-dropdown-inner::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

.terms-dropdown-inner::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 4px;
}

.terms-dropdown-inner::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}

.terms-dropdown-inner .terms-section {
    margin-bottom: 25px;
}

.terms-dropdown-inner .terms-section h3 {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 10px;
    text-transform: lowercase;
}

.terms-dropdown-inner .terms-section h4 {
    font-size: 1em;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 15px;
    margin-bottom: 8px;
    text-transform: lowercase;
}

.terms-dropdown-inner .terms-section p {
    font-size: 0.95em;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.terms-dropdown-inner .terms-section ul {
    margin-left: 20px;
    margin-bottom: 12px;
}

.terms-dropdown-inner .terms-section li {
    font-size: 0.95em;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.terms-dropdown-inner .terms-updated {
    color: var(--text-secondary);
    font-size: 0.85em;
    margin-bottom: 20px;
    font-style: italic;
}

.terms-dropdown-inner .terms-intro {
    font-size: 1em;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.terms-dropdown-inner .contact-email {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
}

.terms-dropdown-inner .contact-email:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .terms-dropdown-toggle {
        padding: 12px 15px;
        font-size: 1em;
    }
    
    .terms-dropdown-content:not(.hidden) {
        padding: 15px;
    }
    
    .terms-dropdown-inner {
        max-height: 400px;
    }
}

/* About Us Page - Kawasaki Pitch Deck */
.about-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.pitch-deck {
    position: relative;
    min-height: 600px;
}

.pitch-slide {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.pitch-slide.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-content {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 4px 12px var(--shadow-soft);
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.slide-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 20px;
}

.slide-title {
    font-size: 3em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    text-transform: lowercase;
}

.slide-subtitle {
    font-size: 1.5em;
    color: var(--text-secondary);
    margin-bottom: 30px;
    text-transform: lowercase;
    font-style: italic;
}

.slide-heading {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 40px;
    text-transform: lowercase;
}

.slide-body {
    max-width: 800px;
    margin: 0 auto;
}

.slide-text-large {
    font-size: 1.5em;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 30px;
    text-transform: lowercase;
}

.slide-text {
    font-size: 1.1em;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: 20px;
    text-transform: lowercase;
}

.slide-text-small {
    font-size: 0.9em;
    color: var(--text-muted);
    margin-top: 30px;
    font-style: italic;
    text-transform: lowercase;
}

.slide-list {
    list-style: none;
    text-align: left;
    max-width: 600px;
    margin: 30px auto;
}

.slide-list li {
    font-size: 1.1em;
    color: var(--text-secondary);
    padding: 12px 0;
    padding-left: 30px;
    position: relative;
    text-transform: lowercase;
}

.slide-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #7FA89A;
    font-weight: bold;
}

.slide-contact {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 1.1em;
    text-transform: lowercase;
}

/* Title Avatars */
.title-avatars {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
}

.title-avatar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.title-avatar img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    padding: 5px;
    background: var(--bg-tertiary);
}

.avatar-label {
    font-size: 0.85em;
    color: var(--text-secondary);
    text-transform: lowercase;
    font-weight: 500;
}

/* Slide Navigation */
.slide-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 15px 20px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 1rem;
}

.slide-nav-btn {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 10px 20px;
    font-size: 1em;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: lowercase;
    font-weight: 500;
}

.slide-nav-btn:hover:not(:disabled) {
    background: #7FA89A;
    color: white;
    border-color: #7FA89A;
}

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

.slide-counter {
    font-size: 1em;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Value Propositions */
.value-props {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin: 40px 0;
    max-width: 700px;
}

.value-prop {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 25px;
    background: var(--bg-tertiary);
    border-radius: 1rem;
    border: 2px solid var(--border-color);
    position: relative;
}

.value-avatar {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid var(--bg-card);
    background: var(--bg-card);
    padding: 3px;
    z-index: 1;
}

.value-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.value-icon {
    font-size: 3em;
}

.value-text {
    font-size: 1.1em;
    color: var(--text-primary);
    text-align: center;
    text-transform: lowercase;
    font-weight: 500;
}

/* Magic Features */
.magic-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 30px 0;
    max-width: 700px;
}

.magic-item {
    padding: 25px;
    background: var(--bg-tertiary);
    border-radius: 1rem;
    border: 2px solid var(--border-color);
    text-align: center;
    position: relative;
}

.magic-avatar {
    width: 70px;
    height: 70px;
    margin: 0 auto 15px;
    position: relative;
}

.magic-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    border: 3px solid var(--border-color);
    background: var(--bg-card);
    padding: 5px;
}

.avatar-badge {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 10px;
    background: #7FA89A;
    color: white;
    border-radius: 0.5rem;
    font-size: 0.75em;
    font-weight: 600;
    white-space: nowrap;
    border: 2px solid var(--bg-card);
    text-transform: lowercase;
}

.avatar-badge.warning {
    background: #E6C79C;
    color: var(--text-primary);
}

.magic-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
}

.magic-item strong {
    display: block;
    font-size: 1.2em;
    color: var(--text-primary);
    margin-bottom: 10px;
    text-transform: lowercase;
}

.magic-item p {
    font-size: 1em;
    color: var(--text-secondary);
    line-height: 1.5;
    text-transform: lowercase;
}

/* Business Model */
.business-timeline {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 30px 0;
    max-width: 700px;
    position: relative;
    padding-left: 40px;
}

.business-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--border-color);
}

.timeline-phase {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    position: relative;
}

.phase-number {
    position: absolute;
    left: -32px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 3px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-primary);
    z-index: 1;
}

.phase-content {
    flex: 1;
    padding: 25px;
    background: var(--bg-tertiary);
    border-radius: 1rem;
    border: 2px solid var(--border-color);
}

.model-phase {
    font-size: 1.3em;
    font-weight: 700;
    color: #7FA89A;
    margin-bottom: 10px;
    text-transform: lowercase;
}

.phase-content p {
    font-size: 1em;
    color: var(--text-secondary);
    line-height: 1.6;
    text-transform: lowercase;
    margin-bottom: 10px;
}

.phase-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 0.5rem;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: lowercase;
}

.phase-status.current {
    background: rgba(127, 168, 154, 0.15);
    color: #5E8578;
    border: 1px solid #7FA89A;
}

.phase-status.future {
    background: rgba(107, 107, 107, 0.15);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

/* Go-to-Market */
.gtm-strategy {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 30px 0;
    max-width: 700px;
}

.gtm-item {
    padding: 20px;
    background: var(--bg-tertiary);
    border-radius: 1rem;
    border: 2px solid var(--border-color);
    text-align: left;
}

.gtm-item strong {
    display: block;
    font-size: 1.2em;
    color: var(--text-primary);
    margin-bottom: 8px;
    text-transform: lowercase;
}

.gtm-item p {
    font-size: 1em;
    color: var(--text-secondary);
    line-height: 1.5;
    text-transform: lowercase;
}

/* Competition Avatars */
.competition-avatars {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 20px 0 30px;
    flex-wrap: wrap;
}

.competition-avatar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: 1rem;
    border: 2px solid var(--border-color);
}

.competition-avatar img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 50%;
}

.competition-avatar span {
    font-size: 0.85em;
    color: var(--text-secondary);
    text-transform: lowercase;
    font-weight: 500;
}

/* Comparison Chart */
.comparison-chart {
    margin: 40px 0;
    max-width: 800px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 1rem;
    padding: 25px;
    overflow-x: auto;
}

.chart-header {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.chart-label {
    font-weight: 700;
    color: var(--text-primary);
    text-transform: lowercase;
}

.chart-companies {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.chart-company {
    font-size: 0.9em;
    color: var(--text-secondary);
    text-align: center;
    text-transform: lowercase;
    font-weight: 500;
}

.chart-company.us {
    color: #7FA89A;
    font-weight: 700;
}

.chart-row {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 15px;
    margin-bottom: 15px;
    align-items: center;
}

.chart-feature {
    font-size: 0.95em;
    color: var(--text-primary);
    text-transform: lowercase;
    font-weight: 500;
}

.chart-bars {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    align-items: center;
}

.chart-bar {
    height: 30px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    position: relative;
    overflow: hidden;
}

.chart-bar.us {
    background: linear-gradient(135deg, #7FA89A 0%, #5E8578 100%);
    border: none;
}

.chart-bar:not(.us)::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--bar-width, 0%);
    background: linear-gradient(135deg, #7FA89A 0%, #5E8578 100%);
    border-radius: 0.5rem;
    transition: width 0.8s ease;
}

.chart-bar.us::after {
    display: none;
}

/* Problem Visualization */
.problem-visual {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 30px 0;
    max-width: 700px;
}

.problem-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 25px;
    background: var(--bg-tertiary);
    border-radius: 1rem;
    border: 2px solid var(--border-color);
    text-align: center;
}

.problem-icon {
    font-size: 3em;
}

.problem-text {
    font-size: 1em;
    color: var(--text-primary);
    text-transform: lowercase;
    font-weight: 500;
}

/* Team */
.team-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin: 30px 0;
    max-width: 700px;
}

.team-member {
    display: flex;
    gap: 20px;
    padding: 25px;
    background: var(--bg-tertiary);
    border-radius: 1rem;
    border: 2px solid var(--border-color);
    align-items: center;
}

.team-avatar-img {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 3px solid var(--border-color);
    background: var(--bg-card);
    padding: 5px;
    overflow: hidden;
}

.team-avatar-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.team-details {
    flex: 1;
    text-align: left;
}

.team-details strong {
    display: block;
    font-size: 1.3em;
    color: var(--text-primary);
    margin-bottom: 8px;
    text-transform: lowercase;
}

.team-details p {
    font-size: 1em;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 5px;
    text-transform: lowercase;
}

/* Metrics */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 30px 0;
    max-width: 700px;
}

.metric-card {
    padding: 25px;
    background: var(--bg-tertiary);
    border-radius: 1rem;
    border: 2px solid var(--border-color);
    text-align: center;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--shadow-soft);
}

.metric-avatar {
    width: 60px;
    height: 60px;
    margin: 0 auto 10px;
    border-radius: 50%;
    border: 3px solid var(--border-color);
    background: var(--bg-card);
    padding: 5px;
    overflow: hidden;
}

.metric-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.metric-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.metric-label {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-transform: lowercase;
}

.metric-value {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--accent-primary);
    text-transform: lowercase;
    margin-bottom: 8px;
}

.metric-trend {
    font-size: 1.2em;
    margin-top: 5px;
}

/* Roadmap */
.roadmap {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin: 30px 0;
    max-width: 700px;
    position: relative;
    padding-left: 50px;
}

.roadmap::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--border-color);
}

.roadmap-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    position: relative;
}

.roadmap-line {
    position: absolute;
    left: -30px;
    width: 3px;
    height: 100%;
    background: var(--border-color);
}

.roadmap-marker {
    position: absolute;
    left: -42px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    overflow: hidden;
    border: 3px solid var(--bg-card);
}

.roadmap-marker img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    padding: 5px;
}

.roadmap-marker.completed {
    background: #7FA89A;
}

.roadmap-marker.in-progress {
    background: var(--bg-card);
    border-color: #7FA89A;
}

.roadmap-marker.future {
    background: var(--bg-card);
    border-color: var(--border-color);
    opacity: 0.6;
}

.roadmap-content {
    flex: 1;
    padding: 20px;
    background: var(--bg-tertiary);
    border-radius: 1rem;
    border: 2px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.roadmap-content strong {
    display: block;
    font-size: 1.2em;
    color: var(--text-primary);
    margin-bottom: 8px;
    text-transform: lowercase;
}

.roadmap-content p {
    font-size: 1em;
    color: var(--text-secondary);
    line-height: 1.5;
    text-transform: lowercase;
    margin-bottom: 10px;
}

.roadmap-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(135deg, #7FA89A 0%, #5E8578 100%);
    transition: width 0.5s ease;
}

/* Tech Stack */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 30px;
}

.tech-badge {
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    color: var(--text-primary);
    font-size: 0.9em;
    font-weight: 500;
    text-transform: lowercase;
}

/* Responsive */
@media (max-width: 768px) {
    .slide-content {
        padding: 40px 20px;
        min-height: 400px;
    }
    
    .slide-title {
        font-size: 2em;
    }
    
    .slide-heading {
        font-size: 2em;
    }
    
    .slide-text-large {
        font-size: 1.2em;
    }
    
    .value-props {
        grid-template-columns: 1fr;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .team-member {
        flex-direction: column;
        text-align: center;
    }
    
    .team-details {
        text-align: center;
    }
}

/* Gacha Game Styles */
.gacha-game-container {
    padding: 30px;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.gacha-game-container h2 {
    color: var(--accent-primary);
    margin-bottom: 20px;
    font-size: 2em;
}

.gacha-info {
    background: var(--bg-card);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-soft);
}

.gacha-cost, .gacha-odds, .gacha-current-points {
    margin: 10px 0;
    font-size: 1.1em;
    color: var(--text-primary);
}

.gacha-warning {
    background: var(--warning-color);
    color: var(--text-primary);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
}

.gacha-choices h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
}

.gacha-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 30px;
}

.gacha-btn {
    flex: 1;
    max-width: 200px;
    padding: 25px 20px;
    border: 3px solid var(--border-color);
    border-radius: 15px;
    background: var(--bg-card);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.gacha-btn:hover:not(:disabled) {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--shadow);
    border-color: var(--accent-primary);
}

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

.gacha-btn.double-btn:hover:not(:disabled) {
    border-color: var(--success-color);
    background: rgba(143, 191, 176, 0.1);
}

.gacha-btn.halve-btn:hover:not(:disabled) {
    border-color: var(--error-color);
    background: rgba(216, 154, 154, 0.1);
}

.gacha-btn-large {
    width: 100%;
    max-width: 400px;
    padding: 40px 30px;
    margin: 30px auto;
    border: 4px solid var(--accent-primary);
    border-radius: 20px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    box-shadow: 0 8px 25px var(--shadow);
}

.gacha-btn-large:hover:not(:disabled) {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 35px var(--shadow);
    border-color: var(--accent-secondary);
}

.gacha-btn-large:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.gacha-icon-large {
    font-size: 4em;
}

.gacha-label-large {
    font-size: 2em;
    font-weight: 700;
}

.gacha-subtitle-large {
    font-size: 1.1em;
    opacity: 0.9;
}

.gacha-icon {
    font-size: 3em;
}

.gacha-label {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--text-primary);
}

.gacha-subtitle {
    font-size: 0.9em;
    color: var(--text-secondary);
}

.gacha-result {
    margin-top: 30px;
    padding: 20px;
    border-radius: 10px;
    background: var(--bg-card);
    box-shadow: var(--shadow);
}

.gacha-result.hidden {
    display: none;
}

.gacha-result-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.gacha-result-icon {
    font-size: 4em;
}

.gacha-result-message {
    font-size: 1.3em;
    font-weight: 600;
    color: var(--text-primary);
}

.gacha-result-content.gacha-win .gacha-result-message {
    color: var(--success-color);
}

.gacha-result-content.gacha-lose .gacha-result-message {
    color: var(--error-color);
}

.gacha-result-details {
    text-align: left;
    width: 100%;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-top: 10px;
}

.gacha-result-details p {
    margin: 8px 0;
    color: var(--text-secondary);
}

.gacha-result-details strong {
    color: var(--text-primary);
    font-size: 1.2em;
}

.gacha-loading {
    font-size: 1.2em;
    color: var(--text-secondary);
    animation: pulse 1.5s infinite;
}

.gacha-error {
    color: var(--error-color);
    font-weight: 600;
}

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

/* Group Study Styles */
.group-study-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.group-study-content {
    color: var(--text-primary);
}

.join-group-study-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
    margin: 30px auto;
}

.join-group-study-form input {
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1.2em;
    background: var(--bg-card);
    color: var(--text-primary);
    text-align: center;
    letter-spacing: 0.2em;
}

.secret-code-display {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    margin: 30px 0;
    box-shadow: var(--shadow);
}

.secret-code-value {
    font-size: 3em;
    font-weight: bold;
    color: var(--accent-primary);
    letter-spacing: 0.1em;
    margin: 20px 0;
    font-family: 'Courier New', monospace;
}

.secret-code-hint {
    color: var(--text-secondary);
    margin-top: 10px;
}

.participants-list {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 15px;
    margin: 20px 0;
    box-shadow: var(--shadow);
}

.participants-list h3 {
    margin-bottom: 15px;
    color: var(--text-primary);
}

#participantsList {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.participant-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.participant-item.host {
    border-left: 4px solid var(--accent-primary);
}

.participant-name {
    font-weight: 600;
    color: var(--text-primary);
}

.participant-status {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.lobby-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 30px 0;
}

.session-stats {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

.stat-item {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    min-width: 150px;
}

.stat-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 8px;
}

.stat-value {
    display: block;
    font-size: 2em;
    font-weight: bold;
    color: var(--accent-primary);
}

.video-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.local-video-wrapper {
    position: relative;
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.local-video-wrapper video {
    width: 100%;
    height: auto;
    display: block;
}

.video-label {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9em;
}

.remote-videos-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.remote-video-item {
    position: relative;
    background: var(--bg-card);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.remote-video-item video {
    width: 100%;
    height: auto;
    display: block;
}

.session-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 30px 0;
}

/* Zoom-style video grid layout */
.group-study-session {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.session-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.session-header h1 {
    margin: 0;
    color: var(--text-primary);
}

.session-controls {
    display: flex;
    gap: 10px;
}

.video-grid-container {
    position: relative;
    min-height: 600px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.participant-video-card {
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    position: relative;
}

.participant-video-card.local-user {
    border: 3px solid var(--accent-primary);
}

.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--bg-secondary);
    overflow: hidden;
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
}

.avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3em;
    font-weight: bold;
    color: white;
    border: 4px solid rgba(255, 255, 255, 0.3);
}

.video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 10px 15px;
    color: white;
}

.participant-name {
    font-weight: 600;
    font-size: 1.1em;
}

.participant-scores {
    padding: 15px;
    background: var(--bg-secondary);
    display: flex;
    justify-content: space-around;
    gap: 10px;
    flex-wrap: wrap;
}

.score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex: 1;
    min-width: 70px;
}

.score-label {
    font-size: 0.85em;
    color: var(--text-secondary);
    font-weight: 500;
}

.score-value {
    font-size: 1.3em;
    font-weight: bold;
    color: var(--accent-primary);
}

.group-score-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-card);
    border-radius: 20px;
    padding: 30px 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
    z-index: 10;
    border: 3px solid var(--accent-primary);
    min-width: 200px;
}

.group-score-label {
    font-size: 1.1em;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 600;
}

.group-score-value {
    font-size: 3.5em;
    font-weight: bold;
    color: var(--accent-primary);
    margin: 10px 0;
}

.group-score-details {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-top: 10px;
}

.group-study-results {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
}

.results-summary {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 15px;
    margin: 30px 0;
    box-shadow: var(--shadow);
}

.results-summary h2 {
    margin-bottom: 20px;
    color: var(--text-primary);
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    color: var(--text-secondary);
    font-size: 1.1em;
}

.result-value {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--accent-primary);
}

.participants-results {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 15px;
    margin: 20px 0;
    box-shadow: var(--shadow);
}

.participants-results h3 {
    margin-bottom: 15px;
    color: var(--text-primary);
}

#participantsResultsList {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.participant-result-item {
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 10px;
}

.participant-result-item .participant-name {
    font-size: 1.2em;
    margin-bottom: 8px;
}

.participant-result-item .participant-score {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--accent-primary);
    margin-bottom: 8px;
}

.participant-details {
    display: flex;
    gap: 20px;
    color: var(--text-secondary);
    font-size: 0.9em;
}

/* Mobile responsive styles for Group Study */
@media (max-width: 768px) {
    .group-study-session {
        padding: 10px;
    }
    
    .session-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .session-header h1 {
        font-size: 1.5em;
    }
    
    .session-controls {
        width: 100%;
        flex-direction: column;
    }
    
    .session-controls button {
        width: 100%;
    }
    
    .video-grid-container {
        min-height: 400px;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .participant-video-card {
        min-height: 200px;
    }
    
    .video-wrapper {
        min-height: 200px;
    }
    
    .participant-scores {
        padding: 10px;
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .score-item {
        min-width: 80px;
        flex: 1 1 30%;
    }
    
    .score-label {
        font-size: 0.75em;
    }
    
    .score-value {
        font-size: 1.1em;
    }
    
    .group-score-center {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        margin: 20px auto;
        padding: 20px;
        min-width: auto;
        width: 100%;
        max-width: 300px;
    }
    
    .group-score-value {
        font-size: 2.5em;
    }
    
    .group-study-lobby {
        padding: 15px;
    }
    
    .secret-code-display {
        padding: 15px;
    }
    
    .secret-code-value {
        font-size: 1.5em;
        padding: 15px;
    }
    
    .participants-list {
        margin: 20px 0;
    }
    
    .participant-item {
        padding: 12px;
        font-size: 0.9em;
    }
}

/* Flashcards Styles */
.flashcards-container {
    max-width: 1000px;
    animation: fadeInUp 0.6s ease-out;
}

.flashcards-actions {
    margin-bottom: 30px;
}

.decks-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.decks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.deck-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow-soft);
}

.deck-card:hover {
    box-shadow: 0 4px 16px var(--shadow);
    transform: translateY(-2px);
}

.deck-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.deck-card-header h3 {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

.deck-actions-inline {
    display: flex;
    gap: 8px;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.btn-icon:hover {
    opacity: 1;
    background: var(--bg-tertiary);
}

.deck-description {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 16px;
    min-height: 40px;
}

.deck-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.deck-card-count {
    color: var(--text-tertiary);
    font-size: 0.85em;
}

.cards-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.card-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.card-content {
    flex: 1;
}

.card-front-preview,
.card-back-preview {
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 0.95em;
    line-height: 1.5;
}

.card-front-preview strong,
.card-back-preview strong {
    color: var(--accent-primary);
    margin-right: 8px;
}

.card-actions {
    display: flex;
    gap: 8px;
}

/* Study Mode */
.study-modal .modal-content {
    max-width: 600px;
}

.study-progress {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.1em;
    color: var(--text-secondary);
}

.flashcard-container {
    margin: 30px 0;
    perspective: 1000px;
}

.flashcard {
    width: 100%;
    height: 300px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    cursor: pointer;
}

.flashcard-front,
.flashcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px var(--shadow);
}

.flashcard-front {
    transform: rotateY(0deg);
}

.flashcard-back {
    transform: rotateY(180deg);
}

.flashcard-front.hidden {
    display: none;
}

.flashcard-back.hidden {
    display: none;
}

.flashcard-front p,
.flashcard-back p {
    font-size: 1.2em;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.6;
    word-wrap: break-word;
}

.study-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 30px;
}

.btn-wrong,
.btn-correct {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-wrong {
    background: var(--error-color);
    color: white;
}

.btn-wrong:hover {
    background: #C88A8A;
    transform: translateY(-2px);
}

.btn-correct {
    background: var(--success-color);
    color: white;
}

.btn-correct:hover {
    background: #7FA89A;
    transform: translateY(-2px);
}

.study-complete {
    text-align: center;
    padding: 30px;
}

.study-complete h3 {
    font-size: 1.5em;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.study-complete p {
    font-size: 1.1em;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.deck-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.deck-modal .modal-content {
    max-width: 800px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.loading-decks,
.loading-videos {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-size: 1.1em;
    text-transform: lowercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.loading-text {
    animation: loadingFade 1.5s ease-in-out infinite;
}

.loading-dots::after {
    content: '...';
    animation: loadingDots 1.5s steps(4, end) infinite;
}

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

@keyframes loadingDots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}

.no-decks,
.no-videos {
    text-align: center;
    padding: 60px 20px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.empty-icon {
    font-size: 4em;
    opacity: 0.5;
}

.empty-state h2 {
    font-size: 1.5em;
    color: var(--text-primary);
    margin: 0;
}

.empty-state p {
    color: var(--text-secondary);
    margin: 0;
}

/* Knowt-Style Flashcard UI */
.knowt-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.knowt-modal.hidden {
    display: none !important;
}

.knowt-modal:not(.hidden) {
    display: flex;
}

.knowt-card-form {
    max-width: 900px;
    background: var(--bg-primary);
    border-radius: 12px;
}

.knowt-header {
    border-bottom: 1px solid var(--border-color);
    padding: 20px 24px;
}

.knowt-card-body {
    padding: 24px;
}

/* Rich Text Toolbar */
.rich-text-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px 8px 0 0;
    flex-wrap: wrap;
}

.toolbar-btn {
    background: transparent;
    border: none;
    padding: 6px 10px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--text-primary);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
}

.toolbar-btn:hover {
    background: var(--bg-card);
}

.toolbar-btn.active {
    background: var(--accent-primary);
    color: white;
}

.toolbar-divider {
    width: 1px;
    height: 20px;
    background: var(--border-color);
    margin: 0 4px;
}

/* Card Entry */
.card-entry {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.card-entry-number {
    width: 32px;
    height: 32px;
    background: var(--accent-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.card-entry-content {
    flex: 1;
}

.card-field {
    margin-bottom: 20px;
}

.card-field-label {
    font-size: 0.85em;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-field-input-wrapper {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 0 0 8px 8px;
    background: var(--bg-card);
}

.card-field-actions {
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.field-action-btn {
    background: transparent;
    border: none;
    padding: 6px 10px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 1em;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.field-action-btn:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.card-field-editor {
    min-height: 80px;
    padding: 16px;
    font-size: 1em;
    line-height: 1.6;
    color: var(--text-primary);
    outline: none;
    word-wrap: break-word;
}

.card-field-editor:empty:before {
    content: attr(data-placeholder);
    color: var(--text-tertiary);
    font-style: italic;
}

.card-field-editor:focus {
    outline: none;
}

.card-entry-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    justify-content: flex-end;
}

.card-action-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 1em;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.card-action-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.card-action-btn.delete:hover {
    background: var(--error-color);
    color: white;
    border-color: var(--error-color);
}

.knowt-form-actions {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

/* Gen-Z Quizlet-Style Study Mode */
.genz-study-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.genz-study-modal.hidden {
    display: none !important;
}

.genz-study-content {
    width: 100%;
    max-width: 600px;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.genz-study-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    margin-bottom: 20px;
}

.genz-close-btn {
    background: none;
    border: none;
    font-size: 2em;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.genz-close-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.genz-progress {
    display: flex;
    gap: 16px;
    font-size: 0.9em;
    color: var(--text-secondary);
    text-transform: lowercase;
}

.genz-mastered {
    color: var(--accent-primary);
}

.genz-card-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
    margin: 40px 0;
}

.genz-card {
    width: 100%;
    max-width: 500px;
    min-height: 300px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.genz-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.genz-card.flipped {
    transform: rotateY(180deg);
}

.genz-card.flipped .genz-card-content {
    transform: rotateY(180deg);
}

.genz-card-content {
    width: 100%;
    text-align: center;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform-style: preserve-3d;
}

.genz-card-content p {
    font-size: 1.4em;
    line-height: 1.6;
    color: var(--text-primary);
    margin: 0;
    word-wrap: break-word;
}

.genz-actions {
    display: flex;
    gap: 16px;
    padding: 20px 0;
    justify-content: center;
}

.genz-btn {
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: lowercase;
    flex: 1;
    max-width: 200px;
}

.genz-btn-wrong {
    background: var(--error-color);
    color: white;
}

.genz-btn-wrong:hover {
    background: #C88A8A;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(200, 138, 138, 0.3);
}

.genz-btn-correct {
    background: var(--accent-primary);
    color: white;
}

.genz-btn-correct:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(127, 168, 154, 0.3);
}

.genz-btn-primary {
    background: var(--accent-gradient);
    color: white;
    max-width: 250px;
}

.genz-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(127, 168, 154, 0.4);
}

.genz-complete {
    text-align: center;
    padding: 40px 20px;
}

.genz-complete h2 {
    font-size: 2em;
    color: var(--text-primary);
    margin-bottom: 16px;
    text-transform: lowercase;
    font-weight: 500;
}

.genz-complete p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 1.1em;
}

/* XP Popup Animation */
.xp-popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: var(--accent-primary);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 600;
    z-index: 1000;
    pointer-events: none;
    transition: all 0.3s ease;
    text-transform: lowercase;
}

.xp-popup.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    font-size: 1em;
    text-transform: lowercase;
    transition: all 0.3s ease;
    opacity: 0;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Flashcard Workspace Styles */
.flashcards-workspace {
    min-height: 100vh;
    background: var(--bg-primary);
}

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

.flashcards-header h1 {
    margin: 0;
    font-size: 2em;
    text-transform: lowercase;
}

.flashcards-header .subtitle {
    color: var(--text-secondary);
    margin: 4px 0 0 0;
    text-transform: lowercase;
}

.flashcards-header .btn-primary {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    color: var(--text-primary);
    transition: all 0.2s;
    text-transform: lowercase;
    font-weight: 500;
}

.flashcards-header .btn-primary:hover {
    border-color: var(--accent-primary);
    background: var(--bg-secondary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px var(--shadow-soft);
}

.flashcards-header .header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Hub Options */
.hub-options {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    padding: 0;
}

.hub-option-btn {
    flex: 1;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.hub-option-btn:hover {
    border-color: var(--accent-primary);
    background: var(--bg-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-soft);
}

.hub-option-btn.active {
    background: var(--accent-gradient);
    border: 2px solid var(--accent-primary);
    color: white;
}

.hub-option-btn.active .hub-option-label {
    color: white;
}

.hub-option-btn.active:hover {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(127, 168, 154, 0.4);
}

.hub-option-icon {
    font-size: 2em;
    line-height: 1;
}

.hub-option-label {
    font-size: 1em;
    text-transform: lowercase;
    font-weight: 500;
    color: var(--text-primary);
}

/* Hub Actions */
.hub-actions {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
    padding: 0;
}

.hub-actions .btn-secondary {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 1em;
    text-transform: lowercase;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.hub-actions .btn-secondary:hover {
    border-color: var(--accent-primary);
    background: var(--bg-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-soft);
}

/* Modern Deck Cards */
.deck-card-modern {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.deck-card-modern:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.deck-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.deck-card-title {
    font-size: 1.3em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

.deck-menu-btn {
    background: none;
    border: none;
    font-size: 1.5em;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.deck-menu-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.deck-menu-dropdown {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 16px var(--shadow);
    padding: 8px;
    min-width: 160px;
    z-index: 10000;
    overflow: hidden;
}

.deck-menu-dropdown .menu-item {
    width: 100%;
    background: none;
    border: none;
    padding: 12px 16px;
    text-align: left;
    cursor: pointer;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95em;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
    text-transform: lowercase;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.deck-menu-dropdown .menu-item:hover {
    background: var(--bg-secondary);
    transform: translateX(2px);
    border-color: var(--accent-primary);
}

.deck-menu-dropdown .menu-item:active {
    transform: translateX(0);
}

.deck-menu-dropdown .menu-item > span:first-child {
    font-size: 1.1em;
    line-height: 1;
    opacity: 0.8;
    display: flex;
    align-items: center;
    min-width: 20px;
}

.deck-menu-dropdown .menu-item > span:last-child {
    flex: 1;
}

.deck-menu-dropdown .menu-item[data-action="delete"] {
    color: var(--error-color);
}

.deck-menu-dropdown .menu-item[data-action="delete"]:hover {
    background: rgba(216, 154, 154, 0.1);
    color: var(--error-color);
}

.deck-menu-dropdown .menu-item[data-action="edit"]:hover {
    color: var(--accent-primary);
}

.deck-card-desc {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin: 0 0 16px 0;
    min-height: 20px;
}

.deck-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85em;
}

.deck-author {
    color: var(--text-secondary);
    font-style: italic;
}

.deck-visibility {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 500;
}

.deck-visibility.public {
    background: rgba(127, 168, 154, 0.1);
    color: var(--accent-primary);
}

.deck-visibility.private {
    background: rgba(107, 107, 107, 0.1);
    color: var(--text-secondary);
}

.deck-card-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.deck-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.deck-stat .stat-value {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--accent-primary);
}

.deck-stat .stat-label {
    font-size: 0.85em;
    color: var(--text-secondary);
    text-transform: lowercase;
}

.deck-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.deck-last-studied {
    font-size: 0.85em;
    color: var(--text-tertiary);
    text-transform: lowercase;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9em;
}

/* Deck Workspace */
.deck-workspace-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.deck-workspace-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--border-color);
}

.back-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    color: var(--text-primary);
    transition: all 0.2s;
    text-transform: lowercase;
}

.back-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
}

.deck-header-info {
    flex: 1;
}

.deck-title-editable {
    font-size: 2em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    outline: none;
    border: none;
    background: transparent;
    text-transform: lowercase;
}

.deck-title-editable:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 4px;
    border-radius: 4px;
}

.deck-description-editable {
    font-size: 1em;
    color: var(--text-secondary);
    margin: 0;
    outline: none;
    border: none;
    background: transparent;
    min-height: 24px;
    text-transform: lowercase;
}

.deck-description-editable.placeholder {
    color: var(--text-tertiary);
    font-style: italic;
}

.deck-description-editable:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 4px;
    border-radius: 4px;
}

.deck-description-editable[data-placeholder]:empty:before {
    content: attr(data-placeholder);
    color: var(--text-tertiary);
}

.deck-header-stats {
    display: flex;
    gap: 32px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-item .stat-value {
    font-size: 1.5em;
    font-weight: 600;
    color: var(--accent-primary);
}

.stat-item .stat-label {
    font-size: 0.85em;
    color: var(--text-secondary);
    text-transform: lowercase;
}

.study-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.study-material-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--accent-primary);
    border-radius: 8px;
    font-size: 0.9em;
    color: var(--text-secondary);
    text-transform: lowercase;
    width: 100%;
    margin-top: -12px;
}

.study-material-status .material-icon {
    font-size: 1.2em;
}

.study-material-status .material-text {
    color: var(--text-primary);
    font-weight: 500;
}

.study-material-status .material-date {
    color: var(--text-secondary);
    font-size: 0.85em;
}

/* UX Change #3, #4, #6, #7, #8: New Hub UX Elements */
.hub-identity {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    font-size: 0.9em;
}

.hub-streak {
    color: var(--accent-primary);
    font-weight: 500;
}

.hub-last-studied {
    color: var(--text-secondary);
}

.deck-header-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.action-step {
    padding: 12px 16px;
    background: var(--bg-card);
    border: 2px solid var(--accent-primary);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95em;
    text-transform: lowercase;
    font-weight: 500;
}

.study-resume {
    margin-top: 16px;
    width: 100%;
}

.resume-btn {
    width: 100%;
    padding: 16px 24px;
    font-size: 1.1em;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    text-transform: lowercase;
    transition: all 0.2s;
}

.resume-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(127, 168, 154, 0.4);
}

.study-feed {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.study-feed-section {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.study-feed-section h3 {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    text-transform: lowercase;
}

.feed-item {
    color: var(--text-secondary);
    font-size: 0.95em;
    text-transform: lowercase;
}

.upload-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.upload-actions button {
    flex: 1;
    padding: 10px 16px;
    font-size: 0.9em;
}

.add-content-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: white;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(127, 168, 154, 0.4);
    transition: all 0.2s;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.add-content-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(127, 168, 154, 0.5);
}

.study-btn {
    padding: 12px 32px;
    font-size: 1.1em;
    text-transform: lowercase;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s;
    cursor: pointer;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.deck-workspace-header .btn-secondary {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
}

.deck-workspace-header .btn-secondary:hover {
    border-color: var(--accent-primary);
    background: var(--bg-secondary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px var(--shadow-soft);
}

.btn-secondary {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    border-color: var(--accent-primary);
    background: var(--bg-secondary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px var(--shadow-soft);
}

/* Study Mode Selection Modal */
#studyModeSelectModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#studyModeSelectModal.hidden {
    display: none !important;
}

.study-mode-select {
    max-width: 500px;
    width: 90%;
    text-align: center;
}

.study-mode-select .modal-header {
    position: relative;
    margin-bottom: 30px;
}

.study-mode-select .modal-header h2 {
    font-size: 1.5em;
    text-transform: lowercase;
    margin: 0;
    color: var(--text-primary);
}

.study-mode-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.study-mode-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.study-mode-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-soft);
    background: var(--bg-secondary);
}

.study-mode-card .mode-icon {
    font-size: 3em;
    line-height: 1;
}

.study-mode-card .mode-title {
    font-size: 1.3em;
    font-weight: 600;
    text-transform: lowercase;
    color: var(--text-primary);
}

.study-mode-card .mode-description {
    font-size: 0.9em;
    color: var(--text-secondary);
    text-transform: lowercase;
}

/* Base btn-primary style for workspace buttons */
/* Base button styles for workspace header */
.deck-workspace-header .btn-primary,
.deck-workspace-header .btn-secondary {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.2s;
    font-weight: 500;
    text-transform: lowercase;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.deck-workspace-header .btn-primary {
    background: var(--accent-gradient);
    border: 2px solid var(--accent-primary);
    color: white;
}

.deck-workspace-header .btn-primary:hover {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(127, 168, 154, 0.4);
}

.deck-workspace-header .btn-secondary {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
}

.deck-workspace-header .btn-secondary:hover {
    border-color: var(--accent-primary);
    background: var(--bg-secondary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px var(--shadow-soft);
}

/* Hub Tabs */
.hub-tabs {
    display: flex;
    gap: 12px;
    margin: 24px 0;
    padding: 0;
}

.hub-tab {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 32px;
    font-size: 1.1em;
    text-transform: lowercase;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.hub-tab:hover {
    border-color: var(--accent-primary);
    background: var(--bg-secondary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px var(--shadow-soft);
}

.hub-tab.active {
    background: var(--accent-gradient);
    border: 2px solid var(--accent-primary);
    color: white;
}

.hub-tab.active:hover {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(127, 168, 154, 0.4);
}

/* Workspace Cards */
.cards-workspace {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.workspace-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    gap: 16px;
    transition: all 0.2s;
    position: relative;
}

.workspace-card:hover {
    border-color: var(--accent-primary);
}

.workspace-card.saving {
    opacity: 0.7;
}

.workspace-card.saving::after {
    content: 'saving...';
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.8em;
    color: var(--text-tertiary);
    text-transform: lowercase;
}

.workspace-card-number {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--accent-primary);
    min-width: 32px;
    text-align: center;
    padding-top: 4px;
}

.workspace-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.workspace-card-front,
.workspace-card-back {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-label {
    font-size: 0.85em;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.card-text-editable {
    font-size: 1em;
    color: var(--text-primary);
    outline: none;
    min-height: 24px;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.card-text-editable:focus {
    background: var(--bg-secondary);
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.workspace-card-meta {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.card-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: lowercase;
}

.card-badge.due {
    background: rgba(200, 138, 138, 0.2);
    color: var(--error-color);
}

.card-badge.mastered {
    background: rgba(127, 168, 154, 0.2);
    color: var(--accent-primary);
}

.card-delete-btn {
    background: none;
    border: none;
    font-size: 1.5em;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
    line-height: 1;
}

.card-delete-btn:hover {
    background: var(--error-color);
    color: white;
}

.empty-cards-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-cards-state .hint {
    font-size: 0.9em;
    color: var(--text-tertiary);
    margin-top: 8px;
    text-transform: lowercase;
}

/* Inline Card Creator */
.create-card-button-container {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}

.create-card-button-container.hidden {
    display: none;
}

.create-card-button-container .btn-primary {
    background: var(--accent-gradient);
    border: 2px solid var(--accent-primary);
    border-radius: 8px;
    padding: 12px 32px;
    font-size: 1.1em;
    text-transform: lowercase;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.create-card-button-container .btn-primary:hover {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(127, 168, 154, 0.4);
}

.inline-card-creator {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-top: 24px;
}

.card-creator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: lowercase;
}

.toggle-creator-btn {
    background: none;
    border: none;
    font-size: 1.5em;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 8px;
}

.card-creator-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-field label {
    font-size: 0.85em;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.card-input {
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.2s;
    resize: vertical;
}

.card-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.card-creator-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.card-creator-actions .btn-primary,
.card-creator-actions .btn-secondary {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    color: var(--text-primary);
    transition: all 0.2s;
    text-transform: lowercase;
    font-weight: 500;
}

.card-creator-actions .btn-primary:hover,
.card-creator-actions .btn-secondary:hover {
    border-color: var(--accent-primary);
    background: var(--bg-secondary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px var(--shadow-soft);
}

/* Knowt Study Mode (legacy) */
.knowt-study-modal {
    background: rgba(0, 0, 0, 0.95);
}

.knowt-study-content {
    max-width: 1000px;
    width: 90vw;
    max-height: 90vh;
    background: #1a1a1a;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.study-header {
    padding: 16px 24px;
    display: flex;
    justify-content: flex-end;
    border-bottom: 1px solid #2a2a2a;
}

.study-body {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
}

/* Card Top Actions */
.card-top-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    align-items: center;
}

.card-action-top {
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.card-action-top:hover {
    background: #3a3a3a;
    border-color: #4a4a4a;
}

.card-action-top.icon-only {
    padding: 8px;
    font-size: 1.2em;
}

/* Knowt Flashcard */
.knowt-flashcard-container {
    width: 100%;
    max-width: 700px;
    margin: 20px 0;
    perspective: 1000px;
}

.knowt-flashcard {
    width: 100%;
    min-height: 400px;
    background: #2a2a2a;
    border: 2px solid #3a3a3a;
    border-radius: 16px;
    padding: 60px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.knowt-flashcard:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
}

.knowt-card-content {
    width: 100%;
    text-align: center;
}

.knowt-card-content p {
    font-size: 1.4em;
    line-height: 1.8;
    color: white;
    margin: 0;
    word-wrap: break-word;
}

/* Study Navigation */
.study-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin: 30px 0;
}

.nav-btn {
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    background: #3a3a3a;
    transform: scale(1.1);
}

.study-progress-text {
    color: #888;
    font-size: 1.1em;
    font-weight: 500;
    min-width: 80px;
    text-align: center;
}

/* Study Bottom Actions */
.study-bottom-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 700px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #2a2a2a;
}

.study-controls-left {
    display: flex;
    gap: 12px;
}

.control-btn {
    background: transparent;
    border: 1px solid #3a3a3a;
    color: #888;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.2s ease;
}

.control-btn:hover {
    background: #2a2a2a;
    color: white;
    border-color: #4a4a4a;
}

.study-controls-right {
    display: flex;
    align-items: center;
}

.toggle-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.toggle-switch input[type="checkbox"] {
    width: 40px;
    height: 20px;
    appearance: none;
    background: #3a3a3a;
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s ease;
}

.toggle-switch input[type="checkbox"]:checked {
    background: var(--accent-primary);
}

.toggle-switch input[type="checkbox"]:before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
}

.toggle-switch input[type="checkbox"]:checked:before {
    transform: translateX(20px);
}

.toggle-label {
    color: #888;
    font-size: 0.9em;
}

/* Description Section */
.study-description-section {
    width: 100%;
    max-width: 700px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #2a2a2a;
}

.description-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #888;
    font-size: 0.9em;
}

.add-btn {
    background: transparent;
    border: none;
    color: var(--accent-primary);
    cursor: pointer;
    font-size: 0.9em;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.add-btn:hover {
    background: #2a2a2a;
}

/* Unified Auth Modal */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal.hidden {
    display: none;
}

.auth-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.auth-modal-content {
    position: relative;
    background: var(--bg-card);
    border-radius: 1.5rem;
    padding: 40px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.auth-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 2em;
    color: var(--text-secondary);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.auth-modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.auth-modal-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-modal-header h2 {
    font-size: 1.8em;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
    text-transform: lowercase;
}

.auth-modal-header p {
    font-size: 1em;
    color: var(--text-secondary);
    text-transform: lowercase;
}

.auth-modal-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-modal-btn {
    padding: 16px 24px;
    border: none;
    border-radius: 0.75rem;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: lowercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-modal-btn-primary {
    background: var(--accent-gradient);
    color: white;
}

.auth-modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(127, 168, 154, 0.4);
}

.auth-modal-btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.auth-modal-btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
}

.auth-modal-btn-tertiary {
    background: transparent;
    color: var(--text-secondary);
    text-decoration: underline;
}

.auth-modal-btn-tertiary:hover {
    color: var(--text-primary);
}

.auth-modal-btn-icon {
    font-size: 1.2em;
}

/* Game XP Hint */
.game-xp-hint {
    font-size: 0.85em;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 8px;
    text-align: center;
}

.game-cost.insufficient-xp {
    color: var(--error-color);
    font-weight: 600;
}

/* Guest Mode Notice */
.guest-mode-notice {
    background: var(--bg-card);
    border: 2px solid var(--accent-primary);
    border-radius: 1rem;
    padding: 24px;
    margin-bottom: 24px;
    text-align: center;
}

.guest-notice-content p {
    margin: 8px 0;
    color: var(--text-primary);
    font-size: 0.95em;
}

.guest-notice-content p:first-child {
    font-weight: 500;
}

.guest-signup-btn {
    margin-top: 16px;
    padding: 12px 24px;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: lowercase;
}

.guest-signup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(127, 168, 154, 0.4);
}

/* Games XP Header */
.games-xp-header {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 20px;
    margin-bottom: 24px;
    text-align: center;
}

.games-xp-balance {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.games-xp-label {
    font-size: 1.1em;
    color: var(--text-secondary);
    text-transform: lowercase;
}

.games-xp-value {
    font-size: 1.5em;
    font-weight: 600;
    color: var(--accent-primary);
}

.games-xp-hint {
    font-size: 0.9em;
    color: var(--text-secondary);
    font-style: italic;
    text-transform: lowercase;
    margin: 0;
}

/* Earn XP Button */
.study-xp-section {
    width: 100%;
    max-width: 700px;
    margin-top: 30px;
    display: flex;
    justify-content: flex-end;
}

.earn-xp-btn {
    background: var(--accent-primary);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.2s ease;
}

.earn-xp-btn:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
}

/* Dark theme adjustments for study mode */
.knowt-study-modal .modal-close {
    color: white;
    background: transparent;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.knowt-study-modal .modal-close:hover {
    background: #2a2a2a;
}

/* ==================== LEARN MODE STYLES ==================== */

.learn-modal {
    z-index: 1000;
}

.learn-modal .modal-content {
    max-width: 600px;
    padding: 0;
    background: var(--bg-primary);
    border-radius: 16px;
    overflow: hidden;
}

.learn-content {
    display: flex;
    flex-direction: column;
    min-height: 500px;
}

/* Top Bar */
.learn-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #2a2a2a;
    border-bottom: 1px solid var(--border-color);
}

.learn-mode-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-weight: 500;
}

.learn-mode-icon {
    font-size: 1.2em;
}

.learn-mode-title {
    font-size: 0.95em;
}

.learn-stats {
    display: flex;
    gap: 16px;
    align-items: center;
}

.learn-xp {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95em;
}

.learn-streak {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95em;
}

.learn-streak-icon {
    font-size: 1em;
}

.learn-top-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.learn-btn-text {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.9em;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.learn-btn-text:hover {
    background: rgba(255, 255, 255, 0.1);
}

.learn-btn-icon {
    background: transparent;
    border: none;
    font-size: 1.1em;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 4px;
    transition: background 0.2s ease;
    color: var(--text-primary);
}

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

/* Options Menu */
.learn-options-menu {
    padding: 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.learn-option-group {
    margin-bottom: 16px;
}

.learn-option-group:last-child {
    margin-bottom: 0;
}

.learn-option-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9em;
    color: var(--text-secondary);
    font-weight: 500;
}

.learn-option-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.9em;
    cursor: pointer;
}

.learn-option-group input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

/* Progress Bar - Removed, using top bar stats instead */

/* Card Container */
.learn-card-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    min-height: 300px;
}

.learn-card {
    width: 100%;
    max-width: 600px;
    background: #3a3a3a;
    border: none;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.learn-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.learn-card-label {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.learn-card-content {
    text-align: center;
    margin-bottom: 24px;
}

.learn-card-content p {
    font-size: 2em;
    line-height: 1.4;
    color: var(--text-primary);
    word-wrap: break-word;
    margin: 0;
    font-weight: 500;
}

.learn-card-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.learn-mastered-btn {
    background: #4a9d5f;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.learn-mastered-btn:hover {
    background: #3d8a50;
    transform: translateY(-1px);
}

.learn-hint-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.learn-hint-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

.learn-card-icons {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.learn-icon-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1em;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.learn-icon-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.learn-instruction {
    font-size: 0.9em;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 8px;
}

/* MCQ Container */
.learn-mcq-container {
    width: 100%;
    max-width: 600px;
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.learn-mcq-option {
    width: 100%;
    padding: 16px 20px;
    background: #3a3a3a;
    border: 2px solid transparent;
    border-radius: 8px;
    font-size: 1em;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.learn-mcq-option:hover:not(:disabled) {
    background: #444;
    border-color: var(--accent-primary);
}

.learn-mcq-option:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.learn-mcq-option.correct {
    background: #4a9d5f;
    color: white;
    border-color: #4a9d5f;
}

.learn-mcq-option.incorrect {
    background: #c88a8a;
    color: white;
    border-color: #c88a8a;
}

.mcq-number {
    font-weight: 600;
    min-width: 24px;
}

.mcq-text {
    flex: 1;
}

/* Typed Container */
.learn-typed-container {
    width: 100%;
    max-width: 500px;
    margin-top: 20px;
    display: flex;
    gap: 12px;
}

.learn-typed-container input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1em;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: border-color 0.2s ease;
}

.learn-typed-container input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.learn-submit-btn {
    padding: 14px 24px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.learn-submit-btn:hover {
    background: var(--accent-primary-dark, #6a8f82);
    transform: translateY(-2px);
}

/* Animations */
.learn-card.correct-animation {
    animation: correctPulse 0.6s ease;
}

@keyframes correctPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 6px 30px rgba(127, 168, 154, 0.4);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }
}

.learn-card.incorrect-shake {
    animation: shake 0.6s ease;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-8px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(8px);
    }
}

/* XP Popup */
.learn-xp-popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: var(--accent-primary);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1em;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 10;
}

.learn-xp-popup.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) translateY(-20px);
}

/* Toast */
.learn-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    font-size: 0.95em;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
}

.learn-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Completion Screen */
.learn-complete {
    text-align: center;
    padding: 60px 40px;
}

.learn-complete h2 {
    font-size: 2em;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.learn-complete p {
    font-size: 1.1em;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.learn-btn-primary {
    padding: 14px 32px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.learn-btn-primary:hover {
    background: var(--accent-primary-dark, #6a8f82);
    transform: translateY(-2px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .learn-modal .modal-content {
        max-width: 100%;
        border-radius: 0;
        min-height: 100vh;
    }

    .learn-card {
        padding: 30px 20px;
    }

    .learn-card-content p {
        font-size: 1.2em;
    }

    .learn-typed-container {
        flex-direction: column;
    }

    .learn-submit-btn {
        width: 100%;
    }
}

/* Translator page loading indicator */
.translator-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px;
    margin: 24px 0;
    background: var(--bg-primary);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 1em;
    font-weight: 500;
    border: 2px dashed var(--border-color);
}

.translator-loading.hidden {
    display: none !important;
}

.translator-loading .loading-spinner {
    border: 3px solid rgba(127, 168, 154, 0.2);
    border-top: 3px solid var(--accent-primary);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    animation: spin 0.8s linear infinite;
}

/* Translator Page Styles */
.translator-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.translator-header {
    text-align: center;
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.translator-header h1 {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.translator-header .subtitle {
    font-size: 1.1em;
    color: var(--text-secondary);
    font-weight: 400;
}

.translator-main {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 30px;
    align-items: start;
}

.translator-settings,
.translator-input-section {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 20px var(--shadow-soft);
    transition: all 0.3s ease;
}

.translator-settings:hover,
.translator-input-section:hover {
    box-shadow: 0 8px 30px var(--shadow);
    transform: translateY(-2px);
}

.translator-settings h2,
.translator-input-section h2 {
    font-size: 1.5em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
    text-transform: lowercase;
}

.translator-settings .form-group {
    margin-bottom: 24px;
}

.translator-settings .form-group label {
    display: block;
    font-size: 0.9em;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.translator-settings .form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1em;
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.translator-settings .form-group select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(127, 168, 154, 0.1);
}

.translator-settings .form-group select:hover {
    border-color: var(--accent-primary);
}

.translator-settings #translatorPageSaveSettingsBtn {
    width: 100%;
    padding: 14px 24px;
    margin-top: 8px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: lowercase;
}

.translator-settings #translatorPageSaveSettingsBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(127, 168, 154, 0.4);
}

.translator-input-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.translator-input-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.translator-input-container textarea {
    width: 100%;
    padding: 18px;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    font-size: 1.05em;
    font-family: inherit;
    background: var(--bg-primary);
    color: var(--text-primary);
    resize: vertical;
    min-height: 150px;
    transition: all 0.2s ease;
    line-height: 1.6;
}

.translator-input-container textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(127, 168, 154, 0.1);
}

.translator-input-container textarea::placeholder {
    color: var(--text-muted);
}

.translator-input-container #translatorPageTranslateBtn {
    padding: 16px 32px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: lowercase;
    align-self: flex-start;
    box-shadow: 0 4px 15px rgba(127, 168, 154, 0.3);
}

.translator-input-container #translatorPageTranslateBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(127, 168, 154, 0.5);
}

.translator-input-container #translatorPageTranslateBtn:active {
    transform: translateY(0);
}

.translator-output-container {
    margin-top: 8px;
}

.translator-output-container textarea {
    width: 100%;
    padding: 18px;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    font-size: 1.05em;
    font-family: inherit;
    background: var(--bg-primary);
    color: var(--text-primary);
    resize: vertical;
    min-height: 150px;
    transition: all 0.2s ease;
    line-height: 1.6;
    cursor: text;
}

.translator-output-container textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(127, 168, 154, 0.1);
}

.translator-output-container textarea::placeholder {
    color: var(--text-muted);
}


/* Responsive Design for Translator Page */
@media (max-width: 1200px) {
    .translator-main {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .translator-settings,
    .translator-input-section {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .translator-container {
        padding: 20px 15px;
    }
    
    .translator-header h1 {
        font-size: 2em;
    }
    
    .translator-settings,
    .translator-input-section {
        padding: 20px;
        border-radius: 16px;
    }
}

/* Practice Test Builder Styles */
.practice-test-builder {
    max-width: 1000px;
    width: 95%;
}

.practice-test-body {
    padding: 0;
}

.practice-test-builder-container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    padding: 32px;
}

.practice-test-builder-steps {
    min-height: 500px;
}

.builder-step {
    display: none;
}

.builder-step.active {
    display: block;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--accent-gradient);
    color: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: 1.2em;
}

.step-header h3 {
    margin: 0;
    font-size: 1.5em;
    color: var(--text-primary);
    font-weight: 600;
}

/* Intent Cards */
.intent-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.intent-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.intent-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--shadow);
}

.intent-card.selected {
    border-color: var(--accent-primary);
    background: linear-gradient(135deg, rgba(127, 168, 154, 0.1) 0%, rgba(127, 168, 154, 0.05) 100%);
}

.intent-icon {
    font-size: 2.5em;
    margin-bottom: 12px;
}

.intent-card h4 {
    margin: 0 0 8px 0;
    font-size: 1.2em;
    color: var(--text-primary);
    font-weight: 600;
}

.intent-card p {
    margin: 0;
    font-size: 0.9em;
    color: var(--text-secondary);
}

/* Difficulty & Length Options */
.difficulty-options,
.length-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.difficulty-btn,
.length-btn {
    flex: 1;
    min-width: 100px;
    padding: 16px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1em;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.difficulty-btn:hover,
.length-btn:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.difficulty-btn.active,
.length-btn.active {
    background: var(--accent-gradient);
    border-color: var(--accent-primary);
    color: white;
}

.option-subtitle {
    display: block;
    font-size: 0.8em;
    opacity: 0.8;
    margin-top: 4px;
}

.step-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.advanced-options-collapsible {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Builder Navigation */
.builder-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid var(--border-color);
}

.btn-back,
.btn-skip,
.btn-next,
.btn-generate {
    padding: 14px 28px;
    font-size: 1.1em;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.btn-generate {
    background: var(--accent-gradient);
    border: 2px solid var(--accent-primary);
    color: white;
    font-size: 1.2em;
    padding: 16px 32px;
    animation: pulse 2s infinite;
}

.btn-generate:hover {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(127, 168, 154, 0.4);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(127, 168, 154, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(127, 168, 154, 0);
    }
}

.btn-next {
    background: var(--accent-gradient);
    border: 2px solid var(--accent-primary);
    color: white;
}

.btn-next:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
}

/* Live Preview */
.practice-test-preview {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 24px;
    height: fit-content;
    position: sticky;
    top: 24px;
}

.practice-test-preview h4 {
    margin: 0 0 20px 0;
    font-size: 1.1em;
    color: var(--text-primary);
    font-weight: 600;
}

.preview-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.preview-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.preview-label {
    font-size: 0.9em;
    color: var(--text-secondary);
}

.preview-value {
    font-size: 1em;
    font-weight: 600;
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 968px) {
    .practice-test-builder-container {
        grid-template-columns: 1fr;
    }
    
    .practice-test-preview {
        position: relative;
        top: 0;
    }
    
    .intent-cards {
        grid-template-columns: 1fr;
    }
    
    .difficulty-options,
    .length-options {
        flex-direction: column;
    }
    
    .difficulty-btn,
    .length-btn {
        width: 100%;
    }
}

/* Practice Test Page Styles - Unified Design */
#practiceTestsHubsList.practice-tests-unified-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
    gap: 24px !important;
    margin-top: 0 !important;
}

.practice-test-unified-card {
    background: var(--bg-card) !important;
    border: 2px solid var(--border-color) !important;
    border-radius: 20px !important;
    padding: 0 !important;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex !important;
    flex-direction: column !important;
    position: relative;
    min-height: 200px;
}

.practice-test-unified-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(127, 168, 154, 0.15);
}

.practice-test-unified-card.no-tests {
    border-style: dashed;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
}

.practice-test-unified-card.no-tests:hover {
    border-style: solid;
    background: var(--bg-card);
}

.practice-test-card-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--accent-gradient);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 1;
}

.practice-test-card-badge.create {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.practice-test-card-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.practice-test-hub-name {
    font-size: 0.9em;
    font-weight: 500;
    color: var(--text-secondary);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.practice-test-name {
    font-size: 1.4em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
}

.practice-test-main-test {
    margin-top: 8px;
}

.practice-test-meta {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin: 4px 0 0 0;
}

.practice-test-empty-state {
    font-size: 1.1em;
    color: var(--text-primary);
    margin: 8px 0;
    font-weight: 500;
}

.practice-test-more {
    font-size: 0.85em;
    color: var(--accent-primary);
    margin: 8px 0 0 0;
    font-weight: 500;
}

.practice-test-card-action {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.practice-test-card-action .btn-primary {
    width: 100%;
    padding: 10px;
    font-size: 0.95em;
    font-weight: 500;
}

.practice-test-unified-card.has-tests .practice-test-card-content {
    padding-bottom: 0;
}

.practice-test-unified-card.has-tests .practice-test-card-action {
    margin-top: auto;
}

@media (max-width: 768px) {
    .practice-tests-unified-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .practice-test-unified-card {
        min-height: 180px;
    }
}

/* Practice Tests Page - New Design */
.practice-tests-page-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 32px 24px;
}

.practice-tests-header {
    margin-bottom: 40px;
}

.practice-test-section {
    margin-bottom: 48px;
}

.section-header {
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 1.5em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.create-test-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 48px;
    text-align: center;
}

.create-test-content {
    max-width: 500px;
    margin: 0 auto;
}

.create-test-icon {
    font-size: 4em;
    margin-bottom: 24px;
}

.create-test-content h3 {
    font-size: 1.5em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}

.create-test-content p {
    font-size: 1em;
    color: var(--text-secondary);
    margin: 0 0 32px 0;
    line-height: 1.6;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.2em;
}

.practice-tests-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.empty-state-small {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}


.celebration {
    margin-top: 40px;
    padding: 40px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 2px solid var(--accent-primary);
}

.celebration-content h2 {
    font-size: 2em;
    margin-bottom: 16px;
    color: var(--accent-primary);
}

.celebration-content p {
    font-size: 1.2em;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.celebration-subtext {
    font-style: italic;
    color: var(--text-tertiary);
    font-size: 1em;
}

.back-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 24px;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: var(--bg-card);
    border-color: var(--accent-primary);
}

/* Universal Back Button */
.universal-back-btn {
    position: fixed;
    top: 100px;
    left: 280px;
    z-index: 100;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px var(--shadow-soft);
    display: flex;
    align-items: center;
    gap: 6px;
}

.universal-back-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-primary);
    transform: translateX(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.universal-back-btn:active {
    transform: translateX(0);
}

/* Responsive: move back button on mobile */
@media (max-width: 768px) {
    .universal-back-btn {
        top: 70px;
        left: 16px;
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

/* Adjust back button position when sidebar is collapsed or on smaller screens */
@media (max-width: 1024px) {
    .universal-back-btn {
        left: 16px;
    }
}

/* Hide back button on home pages */
#homePage .universal-back-btn,
#publicHomePage .universal-back-btn {
    display: none;
}

/* ==================== CLEAN FLASHCARD EDITOR (Knowt/Quizlet Style) ==================== */

/* Flashcards List Page */
.flashcards-list-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

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

.flashcards-header h1 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.create-deck-btn {
    font-size: 1.1rem;
    padding: 14px 28px;
    font-weight: 600;
    box-shadow: 0 2px 8px var(--shadow);
}

.decks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

/* Deck Editor Page */
.deck-editor-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 24px;
}

.deck-editor-header {
    margin-bottom: 32px;
}

.deck-editor-title-section {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
}

.deck-editor-title-section h1 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.deck-card-count-badge {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.deck-editor-body {
    margin-top: 32px;
}

.deck-editor-empty-state {
    text-align: center;
    padding: 64px 24px;
    color: var(--text-secondary);
}

.empty-state-prompt {
    font-size: 1.2rem;
    margin-bottom: 24px;
}

.deck-editor-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.deck-editor-secondary-actions {
    display: flex;
    gap: 16px;
}

.btn-text {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px 12px;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.btn-text:hover {
    color: var(--accent-primary);
}

/* Deck Editor Cards List */
.deck-cards-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.deck-editor-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    gap: 16px;
    transition: box-shadow 0.2s ease;
}

.deck-editor-card:hover {
    box-shadow: 0 2px 8px var(--shadow-soft);
}

.deck-editor-card-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: var(--bg-secondary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.deck-editor-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.deck-editor-card-front,
.deck-editor-card-back {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
    font-weight: 600;
}

.deck-editor-card-front p,
.deck-editor-card-back p {
    margin: 0;
    color: var(--text-primary);
    line-height: 1.5;
}

.deck-editor-card-actions {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* Create Deck Modal */
.create-deck-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.create-deck-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.create-deck-modal-content {
    position: relative;
    background: var(--bg-card);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px var(--shadow);
    z-index: 10001;
}

.create-deck-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.create-deck-modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.create-deck-modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.create-deck-modal-close:hover {
    background: var(--bg-secondary);
}

.create-deck-form {
    padding: 24px;
}

.create-deck-form .form-group {
    margin-bottom: 24px;
}

.create-deck-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.optional {
    font-weight: 400;
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.form-select {
    cursor: pointer;
}

.create-deck-form .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.btn-large {
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
}

/* Card Editor Modal */
/* Hide card editor modal by default to prevent flash - override class rule */
.card-editor-modal#cardEditorModal,
#cardEditorModal.card-editor-modal,
body #cardEditorModal.card-editor-modal {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

#cardEditorModal.card-editor-modal:not(.hidden) {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.card-editor-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-editor-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.card-editor-modal-content {
    position: relative;
    background: var(--bg-card);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px var(--shadow);
    z-index: 10001;
}

.card-editor-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.card-editor-modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.card-editor-modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.card-editor-modal-close:hover {
    background: var(--bg-secondary);
}

.card-editor-form {
    padding: 24px;
}

.card-field-group {
    margin-bottom: 24px;
}

.card-field-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.card-input,
.card-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.card-input:focus,
.card-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.card-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

.card-editor-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.card-editor-primary-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Responsive */
@media (max-width: 768px) {
    .flashcards-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .create-deck-btn {
        width: 100%;
    }
    
    .decks-grid {
        grid-template-columns: 1fr;
    }
    
    .deck-editor-actions {
        flex-direction: column;
        gap: 16px;
    }
    
    .card-editor-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .card-editor-primary-actions {
        width: 100%;
        justify-content: space-between;
    }
}

/* Simple Deck Cards (Knowt/Quizlet Style) */
.deck-card-simple {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.deck-card-simple:hover {
    box-shadow: 0 4px 12px var(--shadow-soft);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.deck-card-simple-header {
    margin-bottom: 16px;
}

.deck-card-simple-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.deck-card-simple-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.deck-card-simple-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.deck-card-simple-count {
    font-size: 0.9rem;
    color: var(--text-tertiary);
}

.deck-card-simple-open {
    font-size: 0.9rem;
    padding: 8px 16px;
}

/* ==================== COMPREHENSIVE PRACTICE TEST CREATION ==================== */

/* Step Indicator */
.test-creation-steps-indicator {
    display: flex;
    justify-content: space-between;
    margin: 40px 0;
    padding: 0 20px;
    position: relative;
}

.test-creation-steps-indicator::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: var(--border-color);
    z-index: 0;
}

.step-indicator-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
    cursor: pointer;
    transition: all 0.2s;
}

.step-indicator-item .step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.step-indicator-item.active .step-number {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.step-indicator-item.completed .step-number {
    background: var(--success-color, #7FA89A);
    border-color: var(--success-color, #7FA89A);
    color: white;
}

.step-indicator-item .step-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.step-indicator-item.active .step-label {
    color: var(--accent-primary);
    font-weight: 600;
}

/* Test Creation Steps */
.test-creation-step {
    display: none;
    margin-top: 40px;
}

.test-creation-step.active {
    display: block;
}

.test-creation-step h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.test-creation-step > p {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

/* Source Selection */
.source-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border-color);
    position: relative;
    z-index: 10;
}

.source-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

.source-tab:hover {
    color: var(--accent-primary);
}

.source-tab.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.source-content {
    display: none;
    min-height: 300px;
}

.source-content.active {
    display: block;
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    transition: all 0.2s;
    background: var(--bg-secondary);
}

.upload-area.drag-over {
    border-color: var(--accent-primary);
    background: var(--accent-primary-light, rgba(127, 168, 154, 0.1));
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.upload-icon {
    font-size: 3rem;
    opacity: 0.6;
}

.uploaded-files-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.uploaded-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.source-selection-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    max-height: 400px;
    overflow-y: auto;
    padding: 8px;
}

.source-item-card {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s;
    cursor: pointer;
}

.source-item-card:hover {
    border-color: var(--accent-primary);
    background: var(--bg-secondary);
}

.source-item-card label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    width: 100%;
}

.source-item-card input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.source-item-content h4 {
    margin: 0 0 4px 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.source-item-content p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.content-preview {
    margin-top: 24px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.content-preview h3 {
    margin-top: 0;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.preview-stats {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.preview-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.preview-stat strong {
    font-size: 1.5rem;
    color: var(--accent-primary);
}

/* Intent Selection */
.intent-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.intent-card {
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-card);
}

.intent-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.intent-card.selected {
    border-color: var(--accent-primary);
    background: var(--accent-primary-light, rgba(127, 168, 154, 0.1));
}

.intent-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.intent-card h3 {
    margin: 0 0 8px 0;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.intent-card p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Customization Grid */
.customization-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin: 30px 0;
}

.customization-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.customization-section label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-select,
.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 1rem;
}

.form-select:focus,
.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(127, 168, 154, 0.1);
}

.optional {
    color: var(--text-tertiary);
    font-weight: normal;
    font-size: 0.85rem;
}

/* Step Actions */
.step-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

/* Preview */
.test-preview-summary {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 24px;
    margin: 30px 0;
    border: 1px solid var(--border-color);
}

.preview-section h3 {
    margin-top: 0;
    font-size: 1.3rem;
    color: var(--text-primary);
}

.preview-item {
    margin: 12px 0;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.preview-item:last-child {
    border-bottom: none;
}

.preview-item strong {
    color: var(--text-primary);
    margin-right: 8px;
}

.test-title-section {
    margin: 30px 0;
}

.test-title-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.generation-status {
    margin-top: 30px;
    text-align: center;
    padding: 40px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

/* Responsive */
@media (max-width: 768px) {
    .test-creation-steps-indicator {
        padding: 0 10px;
    }
    
    .step-indicator-item .step-label {
        font-size: 0.75rem;
    }
    
    .intent-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .customization-grid {
        grid-template-columns: 1fr;
    }
    
    .source-tabs {
        flex-wrap: wrap;
    }
}

/* ==================== PRACTICE TEST TAKING PAGE ==================== */

.test-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.test-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.test-title-section h1 {
    margin: 0 0 10px 0;
    font-size: 2em;
    color: var(--text-primary);
}

.test-meta {
    display: flex;
    gap: 15px;
    color: var(--text-secondary);
    font-size: 0.95em;
}

.test-timer {
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1em;
    min-width: 80px;
    text-align: center;
}

.test-timer.warning {
    background: #ff9800;
}

.test-timer.danger {
    background: #f44336;
    animation: pulse 1s infinite;
}

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

/* Test Instructions */
.test-instructions {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.instructions-content h2 {
    margin-bottom: 20px;
    color: var(--text-primary);
}

.instructions-content ul {
    max-width: 600px;
    margin: 20px auto;
}

.instructions-actions {
    margin-top: 30px;
}

/* Test Content */
.test-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.test-progress {
    margin-bottom: 30px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    color: var(--text-secondary);
    font-size: 0.9em;
}

/* Questions */
.questions-container {
    margin-bottom: 30px;
}

.test-question {
    margin-bottom: 40px;
    padding: 25px;
    background: #FAF7F2;
    border-radius: 10px;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

.test-question:last-child {
    margin-bottom: 0;
}

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

.question-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.2em;
}

.question-type-badge {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
}

.question-content {
    margin-top: 15px;
}

.question-text {
    font-size: 1.05em;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 20px;
}

/* Answer Options */
.answer-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-label {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.option-label:hover {
    border-color: var(--primary-color);
    background: #f5f5f5;
}

.option-label input[type="radio"] {
    margin-right: 12px;
    margin-top: 2px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.option-label input[type="radio"]:checked + span {
    font-weight: 600;
    color: var(--primary-color);
}

.option-label:has(input[type="radio"]:checked) {
    border-color: var(--primary-color);
    background: #e8f5e9;
}

/* Answer Textareas */
.answer-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1em;
    resize: vertical;
    transition: border-color 0.2s;
}

.answer-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.answer-textarea.short-answer {
    min-height: 80px;
}

.answer-textarea.free-response {
    min-height: 150px;
}

/* Test Actions */
.test-actions {
    display: flex;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

/* Test Results */
.test-results {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.results-header {
    text-align: center;
    margin-bottom: 40px;
}

.results-header h2 {
    margin-bottom: 30px;
    color: var(--text-primary);
}

.overall-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, #5E8578 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5em;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.score-circle.excellent {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
}

.score-circle.good {
    background: linear-gradient(135deg, #8bc34a 0%, #689f38 100%);
}

.score-circle.needs-work {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

.score-circle.poor {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
}

.results-content {
    margin-top: 30px;
}

.results-summary {
    margin-bottom: 40px;
    padding: 20px;
    background: #FAF7F2;
    border-radius: 10px;
}

.feedback-section h3 {
    margin-top: 0;
    color: var(--text-primary);
}

.feedback-section p {
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Question Results */
.question-results {
    margin-bottom: 30px;
}

.question-result {
    margin-bottom: 25px;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
}

.question-result.correct {
    background: #e8f5e9;
    border-color: #4caf50;
}

.question-result.incorrect {
    background: #ffebee;
    border-color: #f44336;
}

.question-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.question-result-header h4 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.1em;
}

.question-score {
    font-weight: 600;
    color: var(--text-secondary);
}

.question-result-content {
    margin-top: 15px;
}

.answer-comparison {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.your-answer,
.correct-answer,
.answer-feedback {
    padding: 15px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid var(--border-color);
}

.your-answer {
    border-left-color: var(--primary-color);
}

.correct-answer {
    border-left-color: #4caf50;
}

.answer-feedback {
    border-left-color: #2196f3;
}

.your-answer strong,
.correct-answer strong,
.answer-feedback strong {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.your-answer p,
.correct-answer p,
.answer-feedback p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.results-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding-top: 30px;
    border-top: 2px solid var(--border-color);
}

/* Responsive */
@media (max-width: 768px) {
    .test-header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .test-timer {
        width: 100%;
    }
    
    .test-instructions {
        padding: 25px;
    }
    
    .test-content {
        padding: 20px;
    }
    
    .test-question {
        padding: 20px;
    }
    
    .test-actions {
        flex-direction: column;
    }
    
    .results-actions {
        flex-direction: column;
    }
    
    .score-circle {
        width: 100px;
        height: 100px;
        font-size: 2em;
    }
}

/* Create Flashcard Deck Page Styles - Hide immediately to prevent flash */
#createFlashcardDeckPage {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
}

#createFlashcardDeckPage:not(.hidden) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
    position: relative !important;
    left: auto !important;
}

#createFlashcardDeckPage .create-flashcard-deck-container {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

#createFlashcardDeckPage:not(.hidden) .create-flashcard-deck-container {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.create-flashcard-deck-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.create-deck-header {
    text-align: center;
    margin-bottom: 30px;
}

.create-deck-header .back-btn {
    position: absolute;
    left: 20px;
    top: 20px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 16px;
    padding: 8px 12px;
}

.create-deck-header .back-btn:hover {
    color: #333;
}

.create-deck-header h1 {
    font-size: 2em;
    margin: 0 0 10px 0;
    color: #333;
}

.create-deck-subtext {
    color: #666;
    font-size: 0.95em;
    margin: 0;
}

.deck-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f5f5f5;
    border-radius: 8px;
    margin-bottom: 30px;
    font-size: 0.9em;
}

.deck-progress #cardsCount {
    font-weight: 600;
    color: #333;
}

.progress-suggestion {
    color: #666;
    font-style: italic;
}

.deck-setup-section {
    margin-bottom: 30px;
}

.optional-fields-toggle {
    margin: 15px 0;
}

.optional-fields-toggle .btn-text {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 0.9em;
    padding: 5px 0;
}

.optional-fields-toggle .btn-text:hover {
    color: #333;
}

.optional-fields {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.fast-mode-toggle {
    margin-bottom: 30px;
    text-align: center;
}

.toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95em;
    color: #666;
}

.toggle-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.card-editor-section {
    margin: 40px 0;
}

.card-editor-container {
    display: flex;
    justify-content: center;
}

/* Cards Table Layout */
.cards-table {
    width: 100%;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.cards-table-header {
    display: grid;
    grid-template-columns: 1fr 1fr 100px;
    gap: 15px;
    padding: 15px 20px;
    background: #f5f5f5;
    border-bottom: 2px solid #e0e0e0;
    font-weight: 600;
    font-size: 0.9em;
    color: #666;
}

.card-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 12px;
}

.card-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.card-row:hover {
    background: #fafafa;
}

.card-col-front,
.card-col-back {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.card-col-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.card-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95em;
    font-family: inherit;
    transition: border-color 0.2s;
    direction: ltr;
    text-align: left;
}

.card-input:focus {
    outline: none;
    border-color: #4CAF50;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    padding: 5px 10px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.btn-icon:hover {
    opacity: 1;
}

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

.cards-actions {
    margin-top: 20px;
    text-align: center;
}

.card-input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 0.95em;
}

.card-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s;
}

.card-input:focus {
    outline: none;
    border-color: #4CAF50;
}

.input-tip {
    margin: 6px 0 0 0;
    font-size: 0.85em;
    color: #888;
    font-style: italic;
}

.quality-nudge {
    margin: 6px 0 0 0;
    font-size: 0.85em;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.quality-nudge.success {
    background: #e8f5e9;
    color: #2e7d32;
}

.quality-nudge.warning {
    background: #fff3e0;
    color: #e65100;
}

.card-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
    flex-wrap: wrap;
}

.card-actions .btn-secondary {
    padding: 10px 20px;
}

.card-actions .btn-primary {
    padding: 10px 24px;
}

.save-deck-section {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.save-deck-section .btn-large {
    padding: 14px 40px;
    font-size: 1.1em;
}

/* Success Screen */
.deck-success-screen {
    max-width: 600px;
    margin: 0 auto;
    padding: 60px 20px;
    text-align: center;
}

.success-content h2 {
    font-size: 2em;
    margin: 0 0 10px 0;
    color: #333;
}

.success-content p {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 30px;
}

.success-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.success-actions .btn-primary,
.success-actions .btn-secondary {
    width: 100%;
    padding: 14px 24px;
    font-size: 1em;
}

/* Responsive */
@media (max-width: 768px) {
    .create-flashcard-deck-container {
        padding: 20px 15px;
    }
    
    .create-deck-header .back-btn {
        position: static;
        margin-bottom: 20px;
    }
    
    .card-editor {
        padding: 20px;
    }
    
    .cards-table-header,
    .card-row {
        padding: 12px;
    }
    
    .card-col-actions {
        justify-content: flex-end;
    }
    
    .card-actions {
        flex-direction: column;
    }
    
    .card-actions button {
        width: 100%;
    }
}

/* Translation Page Styles */
.translation-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.translation-container .back-btn {
    position: absolute;
    left: 20px;
    top: 20px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 16px;
    padding: 8px 12px;
}

.translation-container .back-btn:hover {
    color: #333;
}

.translation-container h1 {
    text-align: center;
    margin: 0 0 10px 0;
}

.translation-container .subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

.input-method-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tab-btn {
    flex: 1;
    min-width: 150px;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    transition: all 0.2s;
}

.tab-btn:hover {
    border-color: #4CAF50;
    background: #f5f5f5;
}

.tab-btn.active {
    border-color: #4CAF50;
    background: #4CAF50;
    color: #fff;
}

.input-method {
    margin-bottom: 25px;
}

.input-method.hidden {
    display: none;
}

.input-hint {
    margin-top: 8px;
    font-size: 0.85em;
    color: #888;
    font-style: italic;
}

.file-preview,
.photo-preview,
.link-preview {
    margin-top: 15px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    font-size: 0.9em;
}

.file-preview.error,
.photo-preview .error,
.link-preview .error {
    color: #d32f2f;
}

.photo-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    margin-top: 10px;
}

.translation-result {
    margin-top: 40px;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
}

.translation-result h3 {
    margin: 0 0 20px 0;
    color: #333;
}

.translated-text {
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.6;
    max-height: 500px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.result-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Responsive */
@media (max-width: 768px) {
    .translation-container {
        padding: 20px 15px;
    }
    
    .translation-container .back-btn {
        position: static;
        margin-bottom: 20px;
    }
    
    .input-method-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        width: 100%;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .result-actions button {
        width: 100%;
    }
}

/* Create Hub Flashcard Deck Page */

/* Creation Path Selection */
.creation-path-section {
    margin: 40px 0;
}

.creation-path-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.creation-path-card {
    padding: 32px 24px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.creation-path-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.creation-path-card.selected {
    border-color: var(--accent-color);
    background: var(--accent-color-light, rgba(99, 102, 241, 0.1));
}

.path-icon {
    font-size: 3em;
    margin-bottom: 16px;
}

.creation-path-card h3 {
    font-size: 1.5em;
    margin: 0 0 12px 0;
    color: var(--text-primary);
    font-weight: 600;
}

.creation-path-card p {
    margin: 8px 0;
    color: var(--text-secondary);
    font-size: 0.95em;
}

.path-description {
    font-size: 0.85em !important;
    color: var(--text-tertiary) !important;
    font-style: italic;
}

/* Creation Steps */
.creation-step {
    margin: 40px 0;
    padding: 32px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

/* File Upload */
.file-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-primary);
}

.file-upload-area:hover,
.file-upload-area.drag-over {
    border-color: var(--accent-color);
    background: var(--bg-card);
}

.upload-placeholder {
    pointer-events: none;
}

.upload-icon {
    font-size: 3em;
    margin-bottom: 16px;
}

.upload-placeholder p {
    margin: 8px 0;
    color: var(--text-secondary);
}

.upload-hint {
    font-size: 0.9em;
    color: var(--text-tertiary);
}

.file-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-top: 16px;
}

.file-info span {
    color: var(--text-primary);
    font-weight: 500;
}

/* Intent Options */
.intent-options {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.intent-option {
    flex: 1;
    min-width: 150px;
    padding: 20px 24px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    color: var(--text-primary);
    transition: all 0.2s;
    font-weight: 500;
}

.intent-option:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.intent-option.selected {
    border-color: var(--accent-color);
    background: var(--accent-color-light, rgba(99, 102, 241, 0.1));
    color: var(--accent-color);
}

/* Scope Controls */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px;
    border-radius: 8px;
    transition: background 0.2s;
}

.checkbox-label:hover {
    background: var(--bg-primary);
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.form-hint {
    font-size: 0.85em;
    color: var(--text-tertiary);
    margin-top: 8px;
    font-style: italic;
}

/* Preview Step */
.preview-cards-container {
    margin: 24px 0;
}

.preview-card {
    padding: 20px;
    margin-bottom: 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.preview-card-front,
.preview-card-back {
    margin: 8px 0;
    color: var(--text-primary);
}

.preview-card-front strong,
.preview-card-back strong {
    color: var(--text-secondary);
    margin-right: 8px;
}

.preview-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    margin-top: 32px;
}

/* Navigation */
.creation-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.creation-navigation button.hidden {
    visibility: hidden;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    
    .creation-path-cards {
        grid-template-columns: 1fr;
    }
    
    .intent-options {
        flex-direction: column;
    }
}

/* Upload & Generate, Manual, AI-Guided Flashcard Deck Pages */
#uploadFlashcardDeckPage,
#manualFlashcardDeckPage,
#aiGuidedFlashcardDeckPage {
    min-height: 100vh;
    background: var(--bg-primary);
}

.flashcard-deck-editor-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

.deck-editor-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.deck-editor-header .back-btn {
    position: absolute;
    left: 0;
    top: 0;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 16px;
    padding: 8px 12px;
    transition: color 0.2s;
}

.deck-editor-header .back-btn:hover {
    color: #333;
}

.deck-editor-header h1 {
    font-size: 2.5em;
    margin-bottom: 8px;
    color: #333;
    font-weight: 700;
}

.deck-editor-subtitle {
    color: #666;
    margin-bottom: 0;
    font-size: 1.1em;
}

.deck-editor-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

/* File Upload Section */
.file-upload-section {
    margin: 24px 0;
    padding: 28px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
}

.file-upload-section h3 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 1.1em;
    font-weight: 600;
}

.file-upload-area {
    border: 2px dashed #e0e0e0;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #f5f5f5;
    margin-top: 12px;
}

.file-upload-area:hover,
.file-upload-area.drag-over {
    border-color: #7FA89A;
    background: #fff;
}

.upload-placeholder {
    pointer-events: none;
}

.upload-icon {
    font-size: 2.5em;
    margin-bottom: 12px;
}

.upload-title {
    font-size: 1em;
    color: var(--text-primary);
    margin: 8px 0;
    font-weight: 500;
}

.upload-hint {
    font-size: 0.9em;
    color: var(--text-tertiary);
}

.file-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    margin-top: 12px;
}

.file-info-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-icon {
    font-size: 1.5em;
}

/* Deck Info Section */
.deck-info-section {
    padding: 28px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 8px;
}

/* Generation Settings */
.generation-settings {
    padding: 24px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.generation-settings h3 {
    margin: 0 0 20px 0;
    color: var(--text-primary);
    font-size: 1.3em;
}

/* Generated Cards Preview */
.generated-cards-section {
    padding: 24px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.generated-cards-section h3 {
    margin: 0 0 20px 0;
    color: var(--text-primary);
    font-size: 1.3em;
}

.cards-preview-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.preview-card-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 12px;
}

.preview-card-number {
    font-weight: 600;
    color: var(--accent-color);
    font-size: 0.9em;
}

.preview-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.preview-card-front,
.preview-card-back {
    color: var(--text-primary);
}

.preview-card-front strong,
.preview-card-back strong {
    color: var(--text-secondary);
    margin-right: 8px;
}

/* Card Editor Section */
.card-editor-section {
    padding: 28px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
}

.card-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.card-editor-header > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-editor-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2em;
    font-weight: 600;
}

.card-count {
    color: #666;
    font-size: 0.95em;
}

.card-editor-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.card-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 12px;
}

.card-col-number {
    font-weight: 600;
    color: #7FA89A;
    font-size: 0.9em;
    margin-bottom: 4px;
}

.card-col-front,
.card-col-back {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.card-col-front input,
.card-col-back input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #fff;
    color: #333;
    font-size: 0.95em;
    transition: border-color 0.2s;
}

.card-col-front input:focus,
.card-col-back input:focus {
    outline: none;
    border-color: #7FA89A;
}

.card-col-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 4px;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    padding: 4px 8px;
    transition: transform 0.2s;
}

.btn-icon:hover {
    transform: scale(1.1);
}

.empty-cards-message {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
    font-size: 0.95em;
}

.cards-actions {
    margin-top: 16px;
}

/* Topic Input Section */
.topic-input-section {
    padding: 24px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

/* Tips Section */
.tips-section {
    padding: 24px 28px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
}

.tips-section h4 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 1em;
    font-weight: 600;
}

.tips-section ul {
    margin: 0;
    padding-left: 20px;
    color: #666;
    font-size: 0.95em;
}

.tips-section li {
    margin: 6px 0;
    line-height: 1.6;
}

/* Deck Editor Actions */
.deck-editor-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding-top: 32px;
    margin-top: 24px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .flashcard-deck-editor-container {
        padding: 20px 16px;
    }
    
    .deck-editor-header {
        margin-bottom: 30px;
    }
    
    .deck-editor-header h1 {
        font-size: 2em;
    }
    
    .deck-editor-content {
        gap: 24px;
    }
    
    .file-upload-area {
        padding: 30px 15px;
    }
    
    .card-row {
        padding: 12px;
    }
    
    .card-col-number {
        font-size: 0.85em;
    }
    
    .card-editor-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .card-editor-header > div {
        width: 100%;
    }
    
    #generateCardsFromFileBtn {
        width: 100%;
        margin-top: 0;
    }
    
    .deck-editor-actions {
        flex-direction: column;
    }
    
    .deck-editor-actions button {
        width: 100%;
    }
    
    .intent-option {
        width: 100%;
    }
    
    .preview-actions {
        flex-direction: column;
    }
    
    .preview-actions button {
        width: 100%;
    }
    
    .creation-navigation {
        flex-direction: column;
        gap: 16px;
    }
    
    .creation-navigation button {
        width: 100%;
    }
}

/* ============================================================================
   Landing Page Styles
   ============================================================================ */

/* Landing Page - Full width, no sidebar */
#landingPage {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
    position: relative;
    left: 0 !important;
}

/* Remove body padding when landing page is active (full-width, no sidebar) */
body.landing-page-active {
    padding-left: 0 !important;
    padding-top: 0 !important;
}

/* Hide sidebar completely on landing page */
body.landing-page-active #sidebar,
body.landing-page-active .sidebar {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Hide side sign in/sign up panels when landing is shown */
body.landing-page-active #signinPage,
body.landing-page-active #signupPage {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Landing Header */
.landing-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.landing-header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.landing-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.landing-logo-img {
    width: 32px;
    height: 32px;
}

.landing-logo-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.landing-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.landing-nav-btn {
    padding: 8px 16px;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1001;
    pointer-events: auto;
    cursor: pointer;
}

.landing-nav-btn.btn-text {
    color: var(--text-secondary);
    background: transparent;
    border: none;
}

.landing-nav-btn.btn-text:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.landing-nav-btn.btn-primary {
    background: var(--accent-primary);
    color: white;
    border: none;
    font-weight: 500;
}

.landing-nav-btn.btn-primary:hover {
    background: var(--accent-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(127, 168, 154, 0.3);
}

/* ========== LANDING PAGE: Bold, spacious, high-presence (marketing, not tool UI) ========== */
/* Scale: H1 56–64px, H2 28–32px, body 18px, meta 14–15px. Spacing: 16 / 32 / 64 / 96. */

/* Landing motion: keyframes */
@keyframes landingFadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes landingFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes landingScaleIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes landingCtaGlow {
    0%, 100% { box-shadow: 0 8px 32px rgba(127, 168, 154, 0.35); }
    50% { box-shadow: 0 12px 40px rgba(127, 168, 154, 0.5); }
}

@keyframes landingFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes landingPop {
    from {
        opacity: 0;
        transform: scale(0.88);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

@keyframes landingShine {
    0% { background-position: -120% 0; }
    100% { background-position: 220% 0; }
}

@keyframes landingBounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(40px);
    }
    55% {
        transform: scale(1.08) translateY(-6px);
    }
    75% {
        transform: scale(0.94) translateY(2px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes landingWiggle {
    0%, 100% { transform: rotate(-1deg); }
    50% { transform: rotate(1deg); }
}

@keyframes landingAvatarFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    25% { transform: translateY(-6px) scale(1.02); }
    50% { transform: translateY(0) scale(1); }
    75% { transform: translateY(-4px) scale(1.01); }
}

@keyframes landingListSlide {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes landingWordPop {
    0% {
        opacity: 0;
        transform: translateY(12px) scale(0.92);
    }
    70% {
        transform: translateY(-2px) scale(1.03);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes landingShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-3px); }
    40% { transform: translateX(3px); }
    60% { transform: translateX(-2px); }
    80% { transform: translateX(2px); }
}

@keyframes landingBlurIn {
    from {
        opacity: 0;
        filter: blur(8px);
        transform: scale(1.05);
    }
    to {
        opacity: 1;
        filter: blur(0);
        transform: scale(1);
    }
}

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

@keyframes landingArrowNudge {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(4px); }
}

@media (prefers-reduced-motion: reduce) {
    #landingPage [class*="landing-"] {
        animation-duration: 0.01ms !important;
        animation-delay: 0ms !important;
        transition-duration: 0.01ms !important;
    }
}

#landingPage .landing-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 64px 32px 96px;
    background: #F7F5F2;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    font-size: 18px;
    line-height: 1.5;
}

/* Logo: ~30–40% larger, brand mark, breathing room. */
#landingPage .landing-logo-only {
    margin-bottom: 64px;
    flex-shrink: 0;
    animation: landingScaleIn 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

#landingPage .landing-logo-only .landing-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

#landingPage .landing-logo-only .landing-logo-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

#landingPage .landing-logo-only .landing-logo-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
    letter-spacing: -0.02em;
}

#landingPage .landing-logo-only:hover .landing-logo {
    animation: landingWiggle 0.5s ease-in-out;
}

/* Hero: headline dominates. 80–100px padding, 56–64px desktop / 40–44px mobile. */
#landingPage .landing-hero {
    text-align: center;
    width: 100%;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 96px;
    padding: 80px 0 100px;
}

#landingPage .landing-hero-line1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.08;
    margin: 0 0 32px;
    color: #1a1a1a;
    letter-spacing: -0.04em;
}

#landingPage .landing-hero-line1-a,
#landingPage .landing-hero-line1-b {
    display: block;
    animation: landingBounceIn 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

#landingPage .landing-hero-line1-a { animation-delay: 0.1s; }
#landingPage .landing-hero-line1-b { animation-delay: 0.2s; }

#landingPage .landing-hero-line2 {
    font-size: 1.125rem;
    font-weight: 400;
    line-height: 1.5;
    margin: 0 0 32px;
    color: #5c5c5c;
    animation: landingWordPop 0.6s cubic-bezier(0.34, 1.2, 0.64, 1) 0.35s backwards;
}

#landingPage .landing-hero-line2 strong {
    font-weight: 600;
    color: #1a1a1a;
}

#landingPage .landing-hero-support {
    font-size: 1.125rem;
    line-height: 1.55;
    color: #5c5c5c;
    margin: 0 0 48px;
    max-width: 42ch;
    margin-left: auto;
    margin-right: auto;
    animation: landingBlurIn 0.8s ease-out 0.5s backwards;
}

#landingPage .landing-hero-support strong {
    color: #1a1a1a;
    font-weight: 600;
}

#landingPage .landing-hero-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    animation: landingFadeUp 0.7s ease-out 0.6s backwards;
}

/* Primary CTA: obvious and important. Subtle idle glow pulse. */
#landingPage .landing-cta-btn {
    display: inline-block;
    padding: 18px 32px;
    background: var(--accent-primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: box-shadow 0.25s ease, transform 0.2s ease;
    animation: landingCtaGlow 2.5s ease-in-out infinite;
}

#landingPage .landing-cta-btn:hover {
    box-shadow: 0 12px 40px rgba(127, 168, 154, 0.5);
    transform: translateY(-3px) scale(1.02);
    animation: none;
}

#landingPage .landing-cta-btn:active {
    transform: translateY(-1px) scale(1);
}

#landingPage .landing-hero-free {
    font-size: 0.9375rem;
    color: #5c5c5c;
    margin: 0;
    animation: landingFadeIn 0.5s ease-out 0.85s backwards;
}

#landingPage .landing-cta-secondary {
    font-size: 0.9375rem;
    color: #5c5c5c;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

#landingPage .landing-cta-secondary {
    animation: landingFadeIn 0.5s ease-out 0.95s backwards;
}

#landingPage .landing-cta-secondary:hover {
    color: var(--accent-primary);
    animation: landingArrowNudge 0.5s ease-in-out infinite;
}

/* 1. Anonymous Proof Preview */
#landingPage .landing-proof-preview {
    width: 100%;
    margin-bottom: 96px;
}

#landingPage .landing-proof-cta {
    display: block;
    width: 100%;
    max-width: 320px;
    margin: 0 auto 24px;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-primary);
    background: transparent;
    border: 2px solid var(--accent-primary);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

#landingPage .landing-proof-cta:hover {
    background: var(--accent-primary);
    color: #fff;
    transform: translateY(-2px);
}

#landingPage .landing-preview-reveal {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
}

#landingPage .landing-preview-reveal.is-visible {
    opacity: 1;
    visibility: visible;
}

#landingPage .landing-proof-preview:has(.landing-preview-reveal.is-visible) .landing-proof-cta {
    display: none;
}

#landingPage .landing-preview-card-wrap {
    width: 100%;
    margin-bottom: 0;
    animation: none;
}

#landingPage .landing-preview-reveal.is-visible .landing-preview-card-wrap {
    animation: landingFadeUp 0.5s ease-out forwards;
}

#landingPage .landing-preview-card {
    background: #fff;
    border-radius: 20px;
    padding: 32px 28px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    border: none;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    animation: landingFloat 4s ease-in-out infinite;
}

#landingPage .landing-preview-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-4px);
    animation: none;
}

#landingPage .landing-preview-card:active {
    animation: landingShake 0.4s ease-in-out;
}

#landingPage .landing-preview-card .landing-preview-card-label {
    animation: landingFadeUp 0.45s ease-out 0.65s backwards;
}

#landingPage .landing-preview-card .landing-preview-row:nth-child(2) {
    animation: landingFadeUp 0.45s ease-out 0.8s backwards;
}

#landingPage .landing-preview-card .landing-preview-row:nth-child(3) {
    animation: landingFadeUp 0.45s ease-out 0.95s backwards;
}

#landingPage .landing-preview-card .landing-preview-row:nth-child(4) {
    animation: landingFadeUp 0.45s ease-out 1.1s backwards;
}

#landingPage .landing-preview-card-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 20px;
}

#landingPage .landing-preview-row {
    font-size: 1.125rem;
    color: #1a1a1a;
    margin-bottom: 12px;
}

#landingPage .landing-preview-row span {
    color: #888;
    margin-right: 0.35rem;
}

#landingPage .landing-preview-xp {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #eee;
    animation: landingPop 0.5s cubic-bezier(0.22, 1, 0.36, 1) 1.25s backwards;
}

/* How it works: H2 scale 28–32px, body 18px. */
#landingPage .landing-how {
    width: 100%;
    margin-bottom: 96px;
}

#landingPage .landing-how-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1a1a1a;
    text-transform: lowercase;
    letter-spacing: -0.02em;
    margin: 0 0 32px;
    text-align: center;
    animation: landingBounceIn 0.7s cubic-bezier(0.34, 1.2, 0.64, 1) 0.15s backwards;
}

#landingPage .landing-how-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

#landingPage .landing-how-item {
    text-align: center;
    animation: landingBounceIn 0.6s cubic-bezier(0.34, 1.2, 0.64, 1) backwards;
    transition: transform 0.25s ease;
}

#landingPage .landing-how-item:nth-child(1) { animation-delay: 0.3s; }
#landingPage .landing-how-item:nth-child(2) { animation-delay: 0.4s; }
#landingPage .landing-how-item:nth-child(3) { animation-delay: 0.5s; }
#landingPage .landing-how-item:nth-child(4) { animation-delay: 0.6s; }

#landingPage .landing-how-item:hover {
    transform: translateY(-4px);
}

#landingPage .landing-how-emoji {
    display: block;
    font-size: 1.5rem;
    opacity: 0.7;
    margin-bottom: 8px;
    transition: transform 0.25s ease;
}

#landingPage .landing-how-item:hover .landing-how-emoji {
    transform: scale(1.2);
    opacity: 0.9;
}

#landingPage .landing-how-label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    text-transform: lowercase;
    margin-bottom: 4px;
}

#landingPage .landing-how-line {
    font-size: 0.9375rem;
    color: #5c5c5c;
    margin: 0;
    line-height: 1.45;
    text-transform: lowercase;
}

/* 2. Focus Spectrum Strip */
#landingPage .landing-spectrum {
    width: 100%;
    margin-bottom: 96px;
}

#landingPage .landing-spectrum-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1a1a1a;
    text-transform: lowercase;
    text-align: center;
    margin: 0 0 24px;
}

#landingPage .landing-spectrum-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

#landingPage .landing-spectrum-item {
    flex: 1 1 140px;
    min-width: 0;
    text-align: center;
    padding: 20px 12px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#landingPage .landing-spectrum-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

#landingPage .landing-spectrum-emoji {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 8px;
    opacity: 0.9;
}

#landingPage .landing-spectrum-label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

#landingPage .landing-spectrum-meta {
    font-size: 0.8125rem;
    color: #666;
    line-height: 1.4;
}

/* 4. How focused are you right now? */
#landingPage .landing-focus-quiz {
    width: 100%;
    margin-bottom: 96px;
}

#landingPage .landing-focus-quiz-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    text-align: center;
    margin: 0 0 20px;
}

#landingPage .landing-focus-quiz-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 16px;
}

#landingPage .landing-focus-opt {
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 500;
    color: #1a1a1a;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

#landingPage .landing-focus-opt:hover,
#landingPage .landing-focus-opt[aria-pressed="true"] {
    border-color: var(--accent-primary);
    background: rgba(var(--accent-rgb, 59, 130, 246), 0.08);
}

#landingPage .landing-focus-quiz-result {
    font-size: 0.9375rem;
    color: #5c5c5c;
    text-align: center;
    margin: 0;
    min-height: 1.5em;
}

/* 3. What we actually detect */
#landingPage .landing-detect {
    width: 100%;
    margin-bottom: 96px;
}

#landingPage .landing-detect-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1a1a1a;
    text-align: center;
    margin: 0 0 24px;
}

#landingPage .landing-detect-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 420px;
    margin: 0 auto;
}

#landingPage .landing-detect-yes,
#landingPage .landing-detect-no {
    padding: 20px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

#landingPage .landing-detect-yes .landing-detect-item { color: #1a1a1a; }
#landingPage .landing-detect-no .landing-detect-item { color: #888; }

#landingPage .landing-detect-item {
    font-size: 0.9375rem;
    margin-bottom: 8px;
}

#landingPage .landing-detect-item:last-child {
    margin-bottom: 0;
}

/* 5. Mood Shift Before/After */
#landingPage .landing-mood {
    width: 100%;
    margin-bottom: 96px;
}

#landingPage .landing-mood-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1a1a1a;
    text-align: center;
    margin: 0 0 24px;
}

#landingPage .landing-mood-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

#landingPage .landing-mood-card {
    padding: 24px 20px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

#landingPage .landing-mood-before {
    background: #f5f5f5;
}

#landingPage .landing-mood-after {
    background: #fff;
    border: 2px solid var(--accent-primary);
}

#landingPage .landing-mood-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 12px;
    color: #1a1a1a;
}

#landingPage .landing-mood-list {
    font-size: 0.9375rem;
    color: #5c5c5c;
    margin: 0;
    padding-left: 1.25rem;
    line-height: 1.6;
}

/* Points logic slideshow on landing */
#landingPage .landing-scoring {
    width: 100%;
    margin-bottom: 96px;
}

#landingPage .landing-scoring-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1a1a1a;
    text-align: center;
    margin: 0 0 24px;
}

#landingPage .scoring-slideshow-inline {
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

#landingPage .scoring-slideshow-inline .slide-title {
    font-size: 1.25rem;
}

#landingPage .scoring-slideshow-inline .slide-text {
    font-size: 0.9375rem;
}

/* 6. Why this isn't fake */
#landingPage .landing-why-real {
    width: 100%;
    margin-bottom: 96px;
    text-align: center;
}

#landingPage .landing-why-real-line1,
#landingPage .landing-why-real-line2,
#landingPage .landing-why-real-line3 {
    font-size: 1.125rem;
    color: #1a1a1a;
    margin: 0 0 8px;
}

#landingPage .landing-why-real-line2 {
    font-weight: 600;
}

#landingPage .landing-why-real-line3 {
    font-size: 0.9375rem;
    color: #666;
}

/* 7. Who this is NOT for */
#landingPage .landing-not-for {
    width: 100%;
    margin-bottom: 64px;
}

#landingPage .landing-not-for-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 12px;
}

#landingPage .landing-not-for-list {
    font-size: 0.9375rem;
    color: #5c5c5c;
    margin: 0;
    padding-left: 1.5rem;
    line-height: 1.6;
}

/* 8. Live session counter */
#landingPage .landing-session-count {
    font-size: 0.9375rem;
    color: #666;
    text-align: center;
    margin: 0 0 16px;
}

/* 9. Quiet mode promise */
#landingPage .landing-quiet {
    font-size: 0.9375rem;
    color: #666;
    text-align: center;
    margin: 0 0 64px;
}

/* 10. Hidden depth */
#landingPage .landing-hidden-depth {
    font-size: 0.875rem;
    color: #888;
    text-align: center;
    margin: 0 0 32px;
    font-style: italic;
}

/* Avatars: all five with staggered bounce + continuous float */
#landingPage .landing-avatars {
    width: 100%;
    margin-bottom: 96px;
}

#landingPage .landing-avatars-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1a1a1a;
    text-transform: lowercase;
    letter-spacing: -0.02em;
    margin: 0 0 32px;
    text-align: center;
    animation: landingBounceIn 0.7s cubic-bezier(0.34, 1.2, 0.64, 1) 0.1s backwards;
}

#landingPage .landing-avatars-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

#landingPage .landing-avatar-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 1rem;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: landingBounceIn 0.6s cubic-bezier(0.34, 1.3, 0.64, 1) backwards;
}

#landingPage .landing-avatar-card[data-delay="0"] { animation-delay: 0.2s; animation-name: landingBounceIn, landingAvatarFloat; animation-duration: 0.6s, 3.5s; animation-delay: 0.2s, 1.2s; animation-fill-mode: backwards, none; animation-iteration-count: 1, infinite; animation-timing-function: cubic-bezier(0.34, 1.3, 0.64, 1), ease-in-out; }
#landingPage .landing-avatar-card[data-delay="1"] { animation-delay: 0.35s; animation-name: landingBounceIn, landingAvatarFloat; animation-duration: 0.6s, 3.5s; animation-delay: 0.35s, 1.5s; animation-fill-mode: backwards, none; animation-iteration-count: 1, infinite; animation-timing-function: cubic-bezier(0.34, 1.3, 0.64, 1), ease-in-out; }
#landingPage .landing-avatar-card[data-delay="2"] { animation-delay: 0.5s; animation-name: landingBounceIn, landingAvatarFloat; animation-duration: 0.6s, 3.5s; animation-delay: 0.5s, 1.8s; animation-fill-mode: backwards, none; animation-iteration-count: 1, infinite; animation-timing-function: cubic-bezier(0.34, 1.3, 0.64, 1), ease-in-out; }
#landingPage .landing-avatar-card[data-delay="3"] { animation-delay: 0.65s; animation-name: landingBounceIn, landingAvatarFloat; animation-duration: 0.6s, 3.5s; animation-delay: 0.65s, 2.1s; animation-fill-mode: backwards, none; animation-iteration-count: 1, infinite; animation-timing-function: cubic-bezier(0.34, 1.3, 0.64, 1), ease-in-out; }
#landingPage .landing-avatar-card[data-delay="4"] { animation-delay: 0.8s; animation-name: landingBounceIn, landingAvatarFloat; animation-duration: 0.6s, 3.5s; animation-delay: 0.8s, 2.4s; animation-fill-mode: backwards, none; animation-iteration-count: 1, infinite; animation-timing-function: cubic-bezier(0.34, 1.3, 0.64, 1), ease-in-out; }

#landingPage .landing-avatar-card:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    animation-play-state: paused;
}

#landingPage .landing-avatar-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 50%;
}

#landingPage .landing-avatar-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a1a1a;
    text-transform: lowercase;
}

/* What you get: H2 28–32px, body 18px, generous spacing. */
#landingPage .landing-what-you-get {
    width: 100%;
    margin-bottom: 96px;
}

#landingPage .landing-what-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1a1a1a;
    text-transform: lowercase;
    letter-spacing: -0.02em;
    margin: 0 0 32px;
    text-align: center;
    animation: landingFadeUp 0.6s ease-out 0.15s backwards;
}

#landingPage .landing-what-block {
    background: #fff;
    border-radius: 16px;
    padding: 24px 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    animation: landingFadeUp 0.5s ease-out backwards;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

#landingPage .landing-what-block:nth-of-type(1) { animation-delay: 0.25s; }
#landingPage .landing-what-block:nth-of-type(2) { animation-delay: 0.35s; }

#landingPage .landing-what-block:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

#landingPage .landing-what-subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 16px;
}

#landingPage .landing-what-list {
    font-size: 1rem;
    color: #5c5c5c;
    line-height: 1.6;
    margin: 0;
    padding-left: 1.5rem;
}

#landingPage .landing-what-list li {
    margin-bottom: 8px;
    animation: landingListSlide 0.5s ease-out backwards;
}

#landingPage .landing-what-block:nth-of-type(1) .landing-what-list li:nth-child(1) { animation-delay: 0.4s; }
#landingPage .landing-what-block:nth-of-type(1) .landing-what-list li:nth-child(2) { animation-delay: 0.5s; }
#landingPage .landing-what-block:nth-of-type(1) .landing-what-list li:nth-child(3) { animation-delay: 0.6s; }
#landingPage .landing-what-block:nth-of-type(1) .landing-what-list li:nth-child(4) { animation-delay: 0.7s; }
#landingPage .landing-what-block:nth-of-type(2) .landing-what-list li:nth-child(1) { animation-delay: 0.55s; }
#landingPage .landing-what-block:nth-of-type(2) .landing-what-list li:nth-child(2) { animation-delay: 0.65s; }
#landingPage .landing-what-block:nth-of-type(2) .landing-what-list li:nth-child(3) { animation-delay: 0.75s; }
#landingPage .landing-what-block:nth-of-type(2) .landing-what-list li:nth-child(4) { animation-delay: 0.85s; }
#landingPage .landing-what-block:nth-of-type(2) .landing-what-list li:nth-child(5) { animation-delay: 0.95s; }

#landingPage .landing-what-list li:last-child {
    margin-bottom: 0;
}

/* Social proof: meta 14–15px, de-emphasized. */
#landingPage .landing-social {
    width: 100%;
    text-align: center;
    margin-bottom: 64px;
    animation: landingFadeIn 0.8s ease-out 0.3s backwards;
}

#landingPage .landing-social-line1,
#landingPage .landing-social-line2 {
    font-size: 0.9375rem;
    color: #666;
    margin: 0 0 4px;
    line-height: 1.5;
    animation: landingWordPop 0.5s cubic-bezier(0.34, 1.2, 0.64, 1) backwards;
}

#landingPage .landing-social-line1 { animation-delay: 0.4s; }
#landingPage .landing-social-line2 { animation-delay: 0.5s; }

/* Light humor: meta size, calm. */
#landingPage .landing-humor {
    width: 100%;
    text-align: center;
    margin-bottom: 64px;
    animation: landingFadeIn 0.8s ease-out 0.35s backwards;
}

#landingPage .landing-humor-text {
    font-size: 0.9375rem;
    color: #888;
    line-height: 1.8;
    margin: 0 0 8px;
    font-style: italic;
    animation: landingWordPop 0.6s cubic-bezier(0.34, 1.2, 0.64, 1) 0.25s backwards;
}

#landingPage .landing-humor-punch {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    transition: transform 0.3s ease;
}

#landingPage .landing-humor:hover .landing-humor-punch {
    transform: scale(1.03);
}

/* Final CTA: same button as hero, H2 scale. */
#landingPage .landing-final {
    width: 100%;
    text-align: center;
    margin-bottom: 64px;
    animation: landingFadeUp 0.7s ease-out 0.2s backwards;
}

#landingPage .landing-final-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px;
    animation: landingBounceIn 0.7s cubic-bezier(0.34, 1.2, 0.64, 1) 0.15s backwards;
}

#landingPage .landing-final-sub {
    font-size: 0.9375rem;
    color: #666;
    margin: 0 0 24px;
}

#landingPage .landing-footer-link {
    font-size: 0.875rem;
    margin: 0;
}

#landingPage .landing-footer-link a {
    color: #999;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

#landingPage .landing-footer-link a:hover {
    color: var(--accent-primary);
    transform: scale(1.05);
}

/* Mobile: hero 40–44px, tighter padding. */
@media (max-width: 640px) {
    #landingPage .landing-container {
        padding: 32px 16px 64px;
    }
    #landingPage .landing-logo-only {
        margin-bottom: 48px;
    }
    #landingPage .landing-logo-only .landing-logo-img {
        width: 32px;
        height: 32px;
    }
    #landingPage .landing-hero {
        padding: 48px 0 64px;
        margin-bottom: 64px;
    }
    #landingPage .landing-hero-line1 {
        font-size: clamp(2.5rem, 10vw, 2.75rem);
    }
    #landingPage .landing-proof-preview,
    #landingPage .landing-spectrum,
    #landingPage .landing-preview-card-wrap,
    #landingPage .landing-how,
    #landingPage .landing-focus-quiz,
    #landingPage .landing-detect,
    #landingPage .landing-mood,
    #landingPage .landing-what-you-get,
    #landingPage .landing-scoring,
    #landingPage .landing-why-real {
        margin-bottom: 64px;
    }
    #landingPage .landing-detect-grid {
        grid-template-columns: 1fr;
    }
    #landingPage .landing-mood-grid {
        grid-template-columns: 1fr;
    }
    #landingPage .landing-cta-btn {
        padding: 16px 28px;
        font-size: 1.0625rem;
    }
}

/* Dark theme: near-black background, same calm */
[data-theme="dark"] #landingPage .landing-container {
    background: #1a1a1a;
}

[data-theme="dark"] #landingPage .landing-logo-only .landing-logo-text,
[data-theme="dark"] #landingPage .landing-hero-line1,
[data-theme="dark"] #landingPage .landing-humor-punch,
[data-theme="dark"] #landingPage .landing-final-title {
    color: #f5f5f5;
}

[data-theme="dark"] #landingPage .landing-hero-line2,
[data-theme="dark"] #landingPage .landing-hero-line2 strong,
[data-theme="dark"] #landingPage .landing-hero-support,
[data-theme="dark"] #landingPage .landing-hero-support strong,
[data-theme="dark"] #landingPage .landing-hero-free,
[data-theme="dark"] #landingPage .landing-cta-secondary,
[data-theme="dark"] #landingPage .landing-social-line1,
[data-theme="dark"] #landingPage .landing-social-line2,
[data-theme="dark"] #landingPage .landing-final-sub {
    color: #b0b0b0;
}

[data-theme="dark"] #landingPage .landing-how-title,
[data-theme="dark"] #landingPage .landing-how-line {
    color: #999;
}

[data-theme="dark"] #landingPage .landing-how-label {
    color: #e5e5e5;
}

[data-theme="dark"] #landingPage .landing-humor-text {
    color: #888;
}

[data-theme="dark"] #landingPage .landing-preview-card {
    background: #2a2a2a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] #landingPage .landing-preview-card-label,
[data-theme="dark"] #landingPage .landing-preview-row span {
    color: #888;
}

[data-theme="dark"] #landingPage .landing-preview-row {
    color: #e5e5e5;
}

[data-theme="dark"] #landingPage .landing-preview-xp {
    border-top-color: #3a3a3a;
}

[data-theme="dark"] #landingPage .landing-footer-link a {
    color: #666;
}

[data-theme="dark"] #landingPage .landing-what-title {
    color: #999;
}

[data-theme="dark"] #landingPage .landing-what-block {
    background: #2a2a2a;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] #landingPage .landing-what-subtitle {
    color: #e5e5e5;
}

[data-theme="dark"] #landingPage .landing-what-list {
    color: #b0b0b0;
}

[data-theme="dark"] #landingPage .landing-avatars-title {
    color: #f5f5f5;
}

[data-theme="dark"] #landingPage .landing-avatar-card {
    background: #2a2a2a;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] #landingPage .landing-avatar-name {
    color: #e5e5e5;
}

[data-theme="dark"] #landingPage .landing-proof-cta {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

[data-theme="dark"] #landingPage .landing-proof-cta:hover {
    color: #1a1a1a;
    background: var(--accent-primary);
}

[data-theme="dark"] #landingPage .landing-spectrum-title,
[data-theme="dark"] #landingPage .landing-spectrum-label,
[data-theme="dark"] #landingPage .landing-focus-quiz-title,
[data-theme="dark"] #landingPage .landing-detect-title,
[data-theme="dark"] #landingPage .landing-mood-title,
[data-theme="dark"] #landingPage .landing-mood-card-title,
[data-theme="dark"] #landingPage .landing-why-real-line1,
[data-theme="dark"] #landingPage .landing-why-real-line2,
[data-theme="dark"] #landingPage .landing-not-for-title {
    color: #e5e5e5;
}

[data-theme="dark"] #landingPage .landing-spectrum-item,
[data-theme="dark"] #landingPage .landing-detect-yes,
[data-theme="dark"] #landingPage .landing-detect-no {
    background: #2a2a2a;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

[data-theme="dark"] #landingPage .landing-spectrum-meta,
[data-theme="dark"] #landingPage .landing-focus-quiz-result,
[data-theme="dark"] #landingPage .landing-detect-no .landing-detect-item,
[data-theme="dark"] #landingPage .landing-mood-list,
[data-theme="dark"] #landingPage .landing-why-real-line3,
[data-theme="dark"] #landingPage .landing-not-for-list,
[data-theme="dark"] #landingPage .landing-session-count,
[data-theme="dark"] #landingPage .landing-quiet,
[data-theme="dark"] #landingPage .landing-hidden-depth {
    color: #b0b0b0;
}

[data-theme="dark"] #landingPage .landing-detect-yes .landing-detect-item {
    color: #e5e5e5;
}

[data-theme="dark"] #landingPage .landing-focus-opt {
    background: #2a2a2a;
    border-color: #444;
    color: #e5e5e5;
}

[data-theme="dark"] #landingPage .landing-mood-before {
    background: #2a2a2a;
}

[data-theme="dark"] #landingPage .landing-mood-after {
    background: #2a2a2a;
    border-color: var(--accent-primary);
}

[data-theme="dark"] #landingPage .landing-scoring-title {
    color: #e5e5e5;
}

[data-theme="dark"] #landingPage .scoring-slideshow-inline {
    background: #2a2a2a;
    border-color: #3a3a3a;
}

/* Legacy landing classes (other pages may reference) */
.hero-content {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: center;
}

.hero-main {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 24px 0;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.2vw, 1.4rem);
    color: var(--text-primary);
    margin: 0 0 24px 0;
    line-height: 1.7;
    font-weight: 400;
}

.hero-subtitle .highlight-prove {
    color: var(--accent-primary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 4px;
    animation: subtlePulse 2s ease-in-out infinite;
}

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

.hero-description {
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    color: var(--text-secondary);
    margin: 0 0 40px 0;
    line-height: 1.7;
}

.hero-benefits {
    text-align: left;
    margin: 48px 0;
    padding: 32px;
    background: var(--bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.benefits-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 20px 0;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.benefits-list li {
    padding: 12px 0;
    padding-left: 24px;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 1rem;
}

.benefits-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: bold;
    font-size: 1.5rem;
}

.hero-tagline {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--text-primary);
    margin: 40px 0;
    line-height: 1.6;
    font-weight: 500;
    font-style: italic;
}

.hero-cta-single {
    margin: 40px 0;
    display: flex;
    justify-content: center;
}

.btn-hero-cta {
    min-width: 280px;
    font-size: 1.2rem;
    padding: 18px 40px;
    font-weight: 600;
}

/* Hero Demo Strip */
.hero-demo-strip {
    margin: 60px 0 40px;
    text-align: center;
}

.demo-label {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-style: italic;
}

.demo-screenshots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    max-width: 800px;
    margin: 0 auto;
}

.demo-screenshot {
    flex: 0 0 auto;
}

.screenshot-placeholder {
    width: 220px;
    height: 140px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.screenshot-placeholder:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.screenshot-placeholder.recording {
    border-color: var(--accent-primary);
}

.screenshot-placeholder.analysis {
    border-color: #4A90E2;
}

.screenshot-placeholder.xp {
    border-color: #FFB800;
}

.screenshot-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.screenshot-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.demo-arrow {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

/* Simplified Benefits */
.hero-benefits-simple {
    margin: 60px 0 40px;
    text-align: center;
}

.benefits-title-simple {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 32px 0;
}

.benefits-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.benefit-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.benefit-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.benefit-text strong {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.benefit-subtext {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.hero-ctas {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.hero-ctas .btn-primary {
    min-width: 240px;
    font-size: 1.1rem;
    padding: 16px 32px;
    font-weight: 600;
    position: relative;
    z-index: 1;
    pointer-events: auto;
    cursor: pointer;
}

.hero-ctas .btn-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: color 0.2s ease;
    position: relative;
    z-index: 1;
    pointer-events: auto;
    cursor: pointer;
}

.hero-ctas .btn-text:hover {
    color: var(--accent-primary);
}

/* Hero Right - Mockup */
.hero-right {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-mockup {
    width: 100%;
    max-width: 400px;
}

.mockup-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

.mockup-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.mockup-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.mockup-info {
    flex: 1;
}

.mockup-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.mockup-level {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.mockup-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 12px;
}

.mockup-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mockup-stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mockup-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.mockup-progress {
    margin-top: 16px;
}

.mockup-progress-bar {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.mockup-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-primary-light));
    border-radius: 4px;
    transition: width 0.3s ease;
    animation: progressPulse 2s ease-in-out infinite;
}

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

.mockup-progress-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* How It Works Section */
.landing-how-it-works {
    padding: 80px 20px;
    background: var(--bg-primary);
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin: 0 0 40px 0;
    letter-spacing: -0.02em;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.how-it-works-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.step-card {
    text-align: center;
    padding: 32px 24px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.step-icon-large {
    font-size: 3rem;
    margin-bottom: 16px;
    display: block;
    text-align: center;
}

.step-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    text-align: center;
    margin-bottom: 12px;
    display: block;
}

.step-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    display: block;
}

.step-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px 0;
    text-align: center;
}

.step-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
    text-align: center;
}

/* Preview Sections */
.landing-previews {
    padding: 80px 20px;
    background: var(--bg-secondary);
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.preview-section {
    margin-bottom: 60px;
    width: 100%;
}

.preview-section:last-child {
    margin-bottom: 0;
}

.preview-section .section-title {
    margin-bottom: 32px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.preview-card {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 40px;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    max-width: 100%;
    margin: 0 auto;
}

.preview-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.locked-preview {
    cursor: pointer;
}

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

.preview-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.locked-badge, .read-only-badge, .unlocked-badge {
    font-size: 0.75rem;
    padding: 4px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.unlocked-badge {
    background: rgba(127, 168, 154, 0.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.locked-preview:hover .preview-overlay {
    opacity: 1;
    pointer-events: auto;
}

.preview-message {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    padding: 20px;
}

/* Focus Score Preview */
.focus-score-display {
    text-align: center;
}

.focus-score-value {
    font-size: 4rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 8px;
}

.focus-score-label {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.focus-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.focus-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.detail-label {
    color: var(--text-secondary);
}

.detail-value {
    color: var(--text-primary);
    font-weight: 600;
}

/* XP Preview */
.preview-user-info {
    flex: 1;
}

.preview-username {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.preview-level {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.avatar-preview-small {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 16px;
}

.xp-display {
    margin-top: 24px;
}

.xp-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.xp-progress-bar {
    width: 100%;
    height: 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 16px;
}

.xp-progress-fill {
    height: 100%;
    background: var(--accent-primary);
    border-radius: 6px;
    transition: width 0.3s ease;
}

.xp-stats {
    display: flex;
    gap: 24px;
    justify-content: center;
}

.xp-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.xp-stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.xp-stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Games Hub Preview */
.games-grid-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.game-preview-item {
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: 12px;
    text-align: center;
    position: relative;
    border: 1px solid var(--border-color);
}

.game-preview-item.locked {
    opacity: 0.6;
}

.game-preview-item.unlocked {
    opacity: 1;
}

.game-unlock {
    font-size: 0.75rem;
    color: var(--accent-primary);
    font-style: italic;
    margin-top: 4px;
}

.game-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.game-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.game-lock {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.game-tooltip {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Avatars & Abilities Preview */
.avatars-section, .abilities-section {
    margin-bottom: 32px;
}

.avatars-section:last-child, .abilities-section:last-child {
    margin-bottom: 0;
}

.preview-subsection-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 16px 0;
}

.avatars-preview {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.avatar-preview-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    position: relative;
    min-width: 100px;
}

.avatar-preview-item.locked {
    opacity: 0.6;
}

.avatar-preview-item.unlocked {
    opacity: 1;
}

.preview-user-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.avatar-img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 8px;
}

.avatar-name {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 4px;
}

.avatar-lock {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.abilities-preview {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 0;
}

.ability-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.ability-item.locked {
    opacity: 0.6;
}

.ability-item.unlocked {
    opacity: 1;
}

.ability-unlock {
    font-size: 0.75rem;
    color: var(--accent-primary);
    font-style: italic;
}

.ability-name {
    color: var(--text-primary);
    font-weight: 500;
}

.ability-lock {
    color: var(--text-secondary);
}

/* Flashcard Preview */
.flashcard-preview {
    margin-top: 24px;
}

.flashcard-deck-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.deck-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.flashcard-preview-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
}

.flashcard-front, .flashcard-back {
    margin-bottom: 16px;
}

.flashcard-front:last-child, .flashcard-back:last-child {
    margin-bottom: 0;
}

.flashcard-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.flashcard-content {
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.flashcard-stats {
    display: flex;
    gap: 12px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    justify-content: center;
}

/* Social Proof */
.landing-social-proof {
    padding: 60px 20px;
    text-align: center;
    max-width: 1000px;
    margin: 40px auto;
    width: 100%;
    background: var(--bg-secondary);
    border-radius: 16px;
}

.social-proof-content {
    max-width: 700px;
    margin: 0 auto;
}

.social-proof-text {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin: 0 0 12px 0;
    font-weight: 500;
}

.social-proof-stats {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Responsive Design */
@media (min-width: 768px) {
    .hero-main {
        text-align: left;
    }
    
    .hero-benefits {
        max-width: 600px;
    }
    
    .hero-ctas {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 24px;
    }
    
    .landing-hero {
        padding: 100px 40px;
    }
    
    .landing-how-it-works {
        padding: 100px 40px;
    }
    
    .landing-previews {
        padding: 100px 40px;
    }
    
    .how-it-works-steps {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.4rem;
    }
    
    .hero-description {
        font-size: 1.15rem;
    }
    
    .how-it-works-steps {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .preview-card {
        padding: 40px;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .demo-screenshots {
        flex-direction: row;
        gap: 24px;
    }
    
    .demo-arrow {
        transform: none;
    }
}

/* Final CTA Section */
.landing-final-cta {
    padding: 80px 20px;
    text-align: center;
    max-width: 1000px;
    margin: 40px auto;
    width: 100%;
    background: var(--bg-secondary);
    border-radius: 16px;
}

.final-cta-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 16px 0;
    letter-spacing: -0.02em;
}

.final-cta-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0 0 32px 0;
}

.btn-final-cta {
    min-width: 300px;
    font-size: 1.2rem;
    padding: 18px 40px;
    font-weight: 600;
}

/* Knowledge Hub Styles */
.knowledge-hub-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.knowledge-hub-header {
    margin-bottom: 2rem;
}

.knowledge-hub-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.knowledge-hub-content {
    background: var(--card-bg, #fff);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.input-method-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color, #e0e0e0);
}

.method-tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-secondary, #666);
    transition: all 0.2s;
}

.method-tab:hover {
    color: var(--primary-color, #007bff);
}

.method-tab.active {
    color: var(--primary-color, #007bff);
    border-bottom-color: var(--primary-color, #007bff);
}

.input-method-content {
    display: none;
}

.input-method-content.active {
    display: block;
}

.upload-area {
    border: 2px dashed var(--border-color, #ddd);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.2s;
}

.upload-area.drag-over {
    border-color: var(--primary-color, #007bff);
    background: var(--primary-light, rgba(0,123,255,0.05));
}

.upload-placeholder {
    pointer-events: none;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.upload-hint {
    font-size: 0.875rem;
    color: var(--text-secondary, #666);
    margin-top: 0.5rem;
}

.uploaded-files-list {
    margin-top: 1rem;
}

.uploaded-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-secondary, #f5f5f5);
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.remove-file {
    background: none;
    border: none;
    color: var(--error-color, #dc3545);
    cursor: pointer;
    font-size: 1.5rem;
    padding: 0 0.5rem;
}

.message {
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1rem;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

