/* style_home.css - Playful Home Page Design */

:root {
    --bg-color: #e0f7fa;
    --primary-color: #4a90e2;
    --secondary-color: #ffc107;
    --accent-color: #ff4081;
    --card-bg: #ffffff;
    --text-color: #333333;
}

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

body {
    font-family: 'Comic Sans MS', 'Chalkboard SE', 'Comic Neue', sans-serif;
    background: linear-gradient(135deg, #e0f7fa 0%, #80deea 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

h1 {
    font-size: 3.5rem;
    color: var(--primary-color);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 0.5rem;
}

p.subtitle {
    font-size: 1.5rem;
    color: #555;
}

.level-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
}

.level-card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s;
    text-decoration: none;
    color: var(--text-color);
    border: 4px solid transparent;
}

.level-card:hover {
    transform: scale(1.05) translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    border-color: var(--secondary-color);
}

.level-card .thumbnail {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.level-card h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.level-card .description {
    font-size: 1.1rem;
    color: #777;
    margin-bottom: 1.5rem;
    text-align: center;
}

.play-btn {
    background: var(--primary-color);
    color: white;
    padding: 0.8rem 2.5rem;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: bold;
    border: none;
    box-shadow: 0 4px 10px rgba(74, 144, 226, 0.3);
}

/* Specific colors for cards */
.level-card:nth-child(1) { border-bottom: 8px solid #4a90e2; }
.level-card:nth-child(2) { border-bottom: 8px solid #ffc107; }
.level-card:nth-child(3) { border-bottom: 8px solid #2ecc71; }

.level-card:nth-child(1) .play-btn { background: #4a90e2; }
.level-card:nth-child(2) .play-btn { background: #ffc107; }
.level-card:nth-child(3) .play-btn { background: #2ecc71; }

@media (max-width: 600px) {
    h1 { font-size: 2.5rem; }
    .level-grid { grid-template-columns: 1fr; }
}

/* Back to Hub Button */
.btn-back-hub {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    color: var(--primary-color);
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 3px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-back-hub:hover {
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    background: var(--primary-color);
    color: white;
}

/* System Controls (Speaker/Music) */
.system-controls {
    position: fixed;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 12px;
    z-index: 1000;
}

.speaker-btn, .music-toggle {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    background: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.speaker-btn:hover, .music-toggle:hover {
    transform: scale(1.1);
    background: #f0f7ff;
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

@media (max-width: 768px) {
    .btn-back-hub {
        top: 10px;
        right: 10px;
        width: 50px;
        height: 50px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
        bottom: auto;
    }

    .btn-back-hub .text { display: none; }
    .btn-back-hub .emoji { font-size: 1.5rem; }
    
    .system-controls {
        top: 10px;
        left: 10px;
    }
    
    .speaker-btn, .music-toggle {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}
