@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6d5dfc;
    --secondary: #13b0f5;
    --dark: #111827;
    --text: #1f2937;
    --muted: #6b7280;
    --bg: #f5f7fb;
    --card: #ffffff;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7ff, #eef8ff);
    color: var(--text);
    min-height: 100vh;
}

a {
    text-decoration: none;
}

/* ================= TRANG CHỦ ================= */

.topbar {
    background: #111827;
    position: sticky;
    top: 0;
    z-index: 100;
}

.container {
    width: 90%;
    max-width: 1180px;
    margin: auto;
}

.nav {
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: white;
    font-size: 24px;
    font-weight: 800;
}

.logo span {
    color: #69d5ff;
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    color: #d1d5db;
    font-weight: 600;
}

.nav-links a:hover {
    color: white;
}

/* HERO */

.hero {
    padding: 80px 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
}

.badge {
    display: inline-block;
    background: #e9e7ff;
    color: #5546dd;
    padding: 9px 15px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 55px;
    margin-bottom: 20px;
}

.hero h1 span {
    color: #6d5dfc;
}

.hero p {
    color: #6b7280;
    line-height: 1.8;
    font-size: 17px;
}

.hero-btn {
    display: inline-block;
    margin-top: 25px;
    background: #6d5dfc;
    color: white;
    padding: 14px 22px;
    border-radius: 12px;
    font-weight: bold;
}

.hero-btn:hover {
    background: #5546dd;
}

/* KHUNG CODE */

.code-box {
    background: #151a2c;
    color: #d7def7;
    padding: 30px;
    border-radius: 20px;
    font-family: monospace;
    line-height: 2;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.purple {
    color: #b39cff;
}

.blue {
    color: #69d5ff;
}

.green {
    color: #70e0aa;
}

/* DANH MỤC */

.section {
    padding: 60px 0 80px;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 32px;
    margin-bottom: 10px;
}

.section-title p {
    color: #6b7280;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.course-card {
    background: white;
    padding: 27px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: 0.3s;
}

.course-card:hover {
    transform: translateY(-8px);
}

.course-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    margin-bottom: 20px;
}

.html {
    background: #fff0e9;
}

.css {
    background: #e9f3ff;
}

.js {
    background: #fff8cf;
}

.jquery {
    background: #eeeaff;
}

.course-card h3 {
    margin-bottom: 10px;
}

.course-card p {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 20px;
}

.course-card a {
    color: #6d5dfc;
    font-weight: bold;
}

/* FOOTER */

.footer {
    background: #111827;
    color: #9ca3af;
    text-align: center;
    padding: 25px;
}

.footer b {
    color: white;
}

/* ================= TRANG BÀI HỌC ================= */

.lesson-header {
    background: linear-gradient(135deg, #111827, #202c4b);
    color: white;
    padding: 40px 0;
}

.lesson-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lesson-header h1 {
    font-size: 32px;
}

.back {
    background: rgba(255,255,255,0.15);
    color: white;
    padding: 12px 18px;
    border-radius: 10px;
}

.lesson-layout {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 30px;
    padding: 40px 0 70px;
}

.sidebar {
    background: white;
    padding: 20px;
    border-radius: 18px;
    height: fit-content;
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
}

.sidebar h3 {
    margin-bottom: 15px;
}

.sidebar a {
    display: block;
    padding: 11px;
    color: #4b5563;
    border-radius: 8px;
}

.sidebar a:hover {
    background: #f0eeff;
    color: #6d5dfc;
}

.content {
    background: white;
    padding: 35px;
    border-radius: 20px;
    min-height: 500px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.05);
}

.eyebrow {
    color: #6d5dfc;
    font-weight: bold;
    font-size: 13px;
}

.content h2 {
    font-size: 32px;
    margin: 10px 0 15px;
}

.content p {
    color: #6b7280;
    line-height: 1.8;
    margin-bottom: 25px;
}

.lesson-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.lesson-item {
    border: 1px solid #e5e7eb;
    border-radius: 13px;
    padding: 17px;
    color: #374151;
    display: flex;
    justify-content: space-between;
    transition: 0.3s;
}

.lesson-item:hover {
    border-color: #6d5dfc;
    transform: translateY(-3px);
}

.lesson-item span {
    background: #f0eeff;
    color: #6d5dfc;
    padding: 6px 10px;
    border-radius: 8px;
    font-weight: bold;
}

/* ĐIỆN THOẠI */

@media (max-width: 900px) {

    .hero-grid {
        grid-template-columns: 1fr;
    }

    .course-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .lesson-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }
}

@media (max-width: 600px) {

    .nav-links {
        display: none;
    }

    .hero h1 {
        font-size: 38px;
    }

    .course-grid {
        grid-template-columns: 1fr;
    }

    .lesson-list {
        grid-template-columns: 1fr;
    }
}