/* ==========================================
   HOMEPAGE LAYOUT — Neo-Brutalist Pop-Art Style
   Teal background, bold black borders, vivid cards
   ========================================== */

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: #00BFA5;
    font-family: 'Nunito', sans-serif;
    color: #1a1a1a;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* === Top Banner === */
.page-banner {
    width: 100%;
    background: #FFFDE7;
    color: #1a1a1a;
    text-align: center;
    padding: 16px 20px;
    font-family: 'Baloo 2', cursive;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 4px solid #1a1a1a;
    position: relative;
    z-index: 10;
}
.banner-icon { margin: 0 10px; font-size: 1.4rem; }

/* === 3-Column Layout === */
.hp-layout {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 20px;
    flex: 1;
}

/* === Center Column === */
.hp-center {
    flex: 1;
    max-width: 820px;
    min-width: 0;
}

/* === Hero Section === */
.hero {
    background: #FFFDE7;
    border: 4px solid #1a1a1a;
    border-radius: 24px;
    padding: 0;
    margin-bottom: 24px;
    box-shadow: 6px 6px 0 #1a1a1a;
    text-align: center;
    overflow: hidden;
}
.hero-content {
    padding: 36px 28px 28px;
}
.logo-title {
    font-family: 'Baloo 2', cursive;
    font-size: 2.2rem;
    font-weight: 800;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.2;
    margin-bottom: 10px;
}
.logo-title .highlight {
    color: #FF1493;
    -webkit-text-fill-color: #FF1493;
    background: none;
    -webkit-background-clip: unset;
}
.hero-subtitle {
    font-size: 1rem;
    color: #555;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* === Hero Nav Buttons === */
.hero-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}
.nav-btn {
    padding: 10px 22px;
    border-radius: 99px;
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
    font-size: 0.9rem;
    text-decoration: none;
    border: 3px solid #1a1a1a;
    transition: all 0.15s;
    box-shadow: 3px 3px 0 #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.nav-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 #1a1a1a;
}
.nav-btn:active {
    transform: translate(3px, 3px);
    box-shadow: 0 0 0 #1a1a1a;
}
.btn-mam-non { background: #FF69B4; color: #fff; }
.btn-tieu-hoc { background: #FFD700; color: #1a1a1a; }
.btn-thcs { background: #00CED1; color: #fff; }
.btn-thpt { background: #9B59B6; color: #fff; }

/* === Animated Shapes (hidden - use teal bg instead) === */
.bg-animated-shapes { display: none; }

/* ==========================================
   GAME SECTIONS (Level Sections)
   ========================================== */
.main-content {
    padding: 0;
}

.level-section {
    margin-bottom: 28px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    border-radius: 18px;
    border: 3px solid #1a1a1a;
    box-shadow: 4px 4px 0 #1a1a1a;
    margin-bottom: 16px;
    font-family: 'Baloo 2', cursive;
}
.section-header h2 {
    font-size: 1.3rem;
    margin: 0;
    color: #1a1a1a;
}
.section-header p {
    font-size: 0.8rem;
    margin: 0;
    opacity: 0.8;
    font-weight: 700;
}
.header-icon {
    font-size: 2.2rem;
    flex-shrink: 0;
}

/* Theme colors for section headers */
.section-header.theme-mam-non { background: #FF69B4; color: #fff; }
.section-header.theme-mam-non h2 { color: #fff; }
.section-header.theme-tieu-hoc { background: #FFD700; color: #1a1a1a; }
.section-header.theme-thcs { background: #00CED1; color: #fff; }
.section-header.theme-thcs h2 { color: #fff; }
.section-header.theme-thpt { background: #9B59B6; color: #fff; }
.section-header.theme-thpt h2 { color: #fff; }

/* ==========================================
   GAME CARDS — Neo-Brutalist
   ========================================== */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.game-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    border: 3px solid #1a1a1a;
    border-radius: 18px;
    overflow: hidden;
    transition: all 0.15s;
    box-shadow: 4px 4px 0 #1a1a1a;
    position: relative;
}
.game-card:hover {
    transform: translate(-3px, -3px);
    box-shadow: 7px 7px 0 #1a1a1a;
}
.game-card:active {
    transform: translate(4px, 4px);
    box-shadow: 0 0 0 #1a1a1a;
}

/* Card icon area — big colorful background */
.card-icon {
    width: 100%;
    padding: 24px 0;
    font-size: 3.5rem;
    text-align: center;
    border-bottom: 3px solid #1a1a1a;
}

/* Card content area */
.card-content {
    background: #FFFDE7;
    width: 100%;
    padding: 12px 14px;
    flex: 1;
}
.card-content h3 {
    font-family: 'Baloo 2', cursive;
    font-size: 0.95rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 4px;
    line-height: 1.2;
}
.card-content p {
    font-size: 0.78rem;
    color: #666;
    font-weight: 700;
    line-height: 1.3;
}

/* Card badge */
.card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #FF1493;
    color: #fff;
    padding: 3px 12px;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 800;
    border: 2px solid #1a1a1a;
    box-shadow: 2px 2px 0 #1a1a1a;
    text-transform: uppercase;
}

/* Card theme icon background colors */
.game-card.theme-mam-non .card-icon { background: #FF69B4; }
.game-card.theme-tieu-hoc .card-icon { background: #FFD700; }
.game-card.theme-thcs .card-icon { background: #00CED1; }
.game-card.theme-thpt .card-icon { background: #9B59B6; }

/* Alternate card colors within same theme */
.game-card.theme-mam-non:nth-child(even) .card-icon { background: #FF85C8; }
.game-card.theme-tieu-hoc:nth-child(even) .card-icon { background: #FFE44D; }
.game-card.theme-thcs:nth-child(even) .card-icon { background: #20E3E3; }
.game-card.theme-thpt:nth-child(even) .card-icon { background: #B370D4; }

/* ==========================================
   SIDEBARS — Neo-Brutalist
   ========================================== */
.sidebar {
    width: 230px;
    flex-shrink: 0;
    position: sticky;
    top: 24px;
}
.sidebar-card {
    background: #FFFDE7;
    border: 3px solid #1a1a1a;
    border-radius: 18px;
    padding: 18px 14px;
    box-shadow: 5px 5px 0 #1a1a1a;
}
.sidebar-card h3 {
    font-family: 'Baloo 2', cursive;
    font-size: 0.95rem;
    color: #1a1a1a;
    margin: 0 0 14px 0;
    padding-bottom: 10px;
    border-bottom: 3px dashed #ddd;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 800;
    color: #1a1a1a;
    text-decoration: none;
    transition: all 0.15s;
    background: #fff;
    border: 2px solid #1a1a1a;
    box-shadow: 3px 3px 0 #1a1a1a;
}
.sidebar-link:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 #1a1a1a;
    background: #E0F7FA;
}
.sidebar-link:active {
    transform: translate(3px, 3px);
    box-shadow: 0 0 0 #1a1a1a;
}
.sidebar-link .link-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* CTA Buttons */
.sidebar-cta {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.cta-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 0.85rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    transition: all 0.15s;
    border: 3px solid #1a1a1a;
    cursor: pointer;
    box-shadow: 4px 4px 0 #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.cta-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #1a1a1a;
}
.cta-btn:active {
    transform: translate(4px, 4px);
    box-shadow: 0 0 0 #1a1a1a;
}
.cta-btn .cta-icon { font-size: 1.3rem; }

.cta-btn.cta-zalo { background: #0068ff; }
.cta-btn.cta-teacher { background: #FF6B35; }
.cta-btn.cta-software { background: #00B894; }

/* ==========================================
   FOOTER — Neo-Brutalist
   ========================================== */
.page-footer {
    width: 100%;
    background: #FFFDE7;
    color: #1a1a1a;
    text-align: center;
    padding: 24px 20px;
    font-size: 0.85rem;
    line-height: 1.8;
    border-top: 4px solid #1a1a1a;
    z-index: 10;
}
.footer-title {
    font-family: 'Baloo 2', cursive;
    font-size: 1.1rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 2px;
    text-transform: uppercase;
}
.footer-author {
    color: #777;
    font-weight: 700;
    margin-bottom: 10px;
}
.footer-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}
.footer-links a {
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.82rem;
    padding: 5px 14px;
    border: 2px solid #1a1a1a;
    border-radius: 99px;
    background: #fff;
    box-shadow: 2px 2px 0 #1a1a1a;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.footer-links a:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 #1a1a1a;
    background: #E0F7FA;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

/* Tablet: sidebar collapses */
@media (max-width: 1099px) {
    .hp-layout {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }
    .sidebar {
        width: 100%;
        max-width: 820px;
        position: static;
    }
    .sidebar-card {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
    }
    .sidebar-card h3 {
        width: 100%;
        margin-bottom: 8px;
    }
    .sidebar-link {
        flex: 1;
        min-width: 150px;
        margin-bottom: 0;
        justify-content: center;
        text-align: center;
    }
    .sidebar-cta {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
    }
    .cta-btn {
        flex: 1;
        min-width: 150px;
        justify-content: center;
    }
    .sidebar-left { order: 2; }
    .hp-center { order: 1; max-width: 100%; }
    .sidebar-right { order: 3; }
}

/* Small phones */
@media (max-width: 500px) {
    .page-banner { font-size: 0.85rem; padding: 12px 14px; }
    .logo-title { font-size: 1.6rem !important; }
    .hero-subtitle { font-size: 0.85rem; }
    .hero-content { padding: 24px 16px 20px !important; }
    .nav-btn { padding: 8px 16px; font-size: 0.78rem; }
    .games-grid { grid-template-columns: 1fr; }
    .game-card {
        flex-direction: row;
        align-items: stretch;
    }
    .card-icon {
        width: 80px;
        min-height: 80px;
        padding: 16px 0;
        font-size: 2.5rem;
        border-bottom: none;
        border-right: 3px solid #1a1a1a;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .card-content {
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 10px 12px;
    }
    .section-header { padding: 10px 14px; }
    .section-header h2 { font-size: 1.1rem; }
    .header-icon { font-size: 1.8rem; }
    .sidebar-link { font-size: 0.75rem; padding: 8px 10px; min-width: 120px; }
    .cta-btn { font-size: 0.75rem; padding: 10px; min-width: 120px; }
    .page-footer { padding: 18px 14px; }
    .footer-links { gap: 8px; }
    .footer-links a { font-size: 0.75rem; padding: 4px 10px; }
}

/* Desktop */
@media (min-width: 1100px) {
    .page-banner { font-size: 1.6rem; }
    .logo-title { font-size: 2.6rem !important; }
    .sidebar { width: 250px; }
    .games-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

/* Medium desktop */
@media (min-width: 1100px) and (max-width: 1300px) {
    .sidebar { width: 220px; }
}
