/* ===== Home Screen ===== */
#home-screen {
    background: var(--bg-primary);
    z-index: 10;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Top bar with light/dark toggle */
.home-top-bar {
    position: fixed;
    top: 16px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 20;
}

.theme-toggle-label {
    font-size: 1.3rem;
    line-height: 1;
}

.home-container {
    max-width: 600px;
    width: 90%;
    padding: 40px 30px;
    text-align: center;
    animation: fadeInUp 0.6s ease-out;
}

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

/* Header */
.home-title {
    font-size: clamp(2rem, 6vw, 3.2rem);
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--accent), #ff6b6b, #feca57, #48dbfb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
    background-size: 200% 200%;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.home-subtitle {
    font-size: clamp(1rem, 3vw, 1.3rem);
    color: var(--text-secondary);
    margin-bottom: 30px;
}

/* Feature Cards */
.feature-cards {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.feature-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 2px 8px var(--shadow);
    min-width: 120px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--shadow-lg);
}

.feature-icon {
    font-size: 2rem;
}

.feature-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Description */
.home-info {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.home-parent-note {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 28px;
}

/* Settings */
.home-settings {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px 24px;
    margin-bottom: 28px;
    box-shadow: 0 2px 8px var(--shadow);
}

.settings-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 4px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
}

.setting-row + .setting-row {
    border-top: 1px solid var(--border);
}

.setting-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
}

.setting-icon {
    font-size: 1.3rem;
}

/* Start Button */
.start-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 48px;
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--accent), #ff6b6b);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 20px var(--accent-glow);
    animation: pulse 2s ease-in-out infinite;
}

.start-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px var(--accent-glow);
}

.start-button:active {
    transform: scale(0.98);
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 4px 20px var(--accent-glow); }
    50% { box-shadow: 0 4px 40px var(--accent-glow), 0 0 60px var(--accent-glow); }
}

.start-icon {
    font-size: 1.5rem;
}

/* ===== Star Wars Home Theme Override ===== */
[data-starwars="true"] .home-title {
    background: linear-gradient(135deg, #ffe81f, #ff6b35, #ffe81f);
    -webkit-background-clip: text;
    background-clip: text;
}

[data-starwars="true"] .start-button {
    background: linear-gradient(135deg, #1a3a5c, #2d6a9f);
    box-shadow: 0 4px 20px rgba(45, 106, 159, 0.4);
}

[data-starwars="true"] .home-subtitle::after {
    content: ' ⚔️ May the Force be with you!';
}

/* ===== Dinosaur Home Theme Override ===== */
[data-dino="true"] .home-title {
    background: linear-gradient(135deg, #4caf50, #ff9800, #8bc34a);
    -webkit-background-clip: text;
    background-clip: text;
}

[data-dino="true"] .start-button {
    background: linear-gradient(135deg, #2e7d32, #689f38);
    box-shadow: 0 4px 20px rgba(46, 125, 50, 0.4);
}

[data-dino="true"] .home-subtitle::after {
    content: ' 🦕 Roar into adventure!';
}

/* ===== Mobile Responsive ===== */
@media (max-width: 480px) {
    .home-container {
        padding: 24px 16px;
        width: 95%;
    }

    .home-title {
        font-size: clamp(1.6rem, 8vw, 2.4rem);
    }

    .home-subtitle {
        font-size: clamp(0.9rem, 3.5vw, 1.1rem);
        margin-bottom: 20px;
    }

    .feature-cards {
        gap: 10px;
        margin-bottom: 16px;
    }

    .feature-card {
        padding: 12px 14px;
        min-width: 90px;
        border-radius: 12px;
    }

    .feature-icon {
        font-size: 1.5rem;
    }

    .feature-text {
        font-size: 0.78rem;
    }

    .home-info {
        font-size: 0.88rem;
        margin-bottom: 8px;
    }

    .home-parent-note {
        font-size: 0.78rem;
        margin-bottom: 20px;
    }

    .home-settings {
        padding: 12px 16px;
        margin-bottom: 20px;
        border-radius: 12px;
    }

    .settings-title {
        font-size: 0.78rem;
    }

    .setting-label {
        font-size: 0.88rem;
        gap: 8px;
    }

    .setting-icon {
        font-size: 1.1rem;
    }

    .start-button {
        padding: 16px 36px;
        font-size: 1.1rem;
        border-radius: 40px;
    }

    .start-icon {
        font-size: 1.3rem;
    }

    .toggle-switch {
        width: 44px;
        height: 24px;
    }

    .toggle-slider::before {
        height: 18px;
        width: 18px;
    }

    .toggle-switch input:checked + .toggle-slider::before {
        transform: translateX(20px);
    }
}

/* Tall phones / small tablets in portrait */
@media (max-height: 600px) {
    .home-container {
        padding: 16px 16px 24px;
    }

    .home-subtitle {
        margin-bottom: 12px;
    }

    .feature-cards {
        margin-bottom: 12px;
    }

    .home-info {
        margin-bottom: 6px;
    }

    .home-parent-note {
        margin-bottom: 16px;
    }

    .home-settings {
        margin-bottom: 16px;
    }
}

/* Tablet landscape */
@media (min-width: 768px) and (max-width: 1024px) {
    .home-container {
        max-width: 550px;
    }
}
