/* --- General Styles --- */
:root {
    --bg-color: #f8f9fa;
    --text-color: #212529;
    --primary-color: #7a5cfa;
    --secondary-color: #5d3ef2;
    --card-bg: #ffffff;
    --border-color: #e9ecef;
    --header-bg: #ffffff;
    --footer-bg: #f1f3f5;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.8;
    margin: 0;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

h1,
h2,
h3 {
    font-family: 'Poppins', 'Noto Sans KR', sans-serif;
    font-weight: 600;
    letter-spacing: -0.5px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

/* --- Header --- */
.main-header {
    text-align: center;
    padding: 4rem 1rem;
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.main-header h1 {
    font-size: 2.8rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.main-header .subtitle {
    font-size: 1.2rem;
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto;
}

.back-link {
    position: absolute;
    top: 20px;
    left: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.2s ease;
    background-color: transparent;
}

.back-link:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--primary-color);
    transform: translateX(-3px);
}


/* --- Intro Box --- */
.intro-box {
    background-color: var(--card-bg);
    padding: 2.5rem;
    border-radius: 12px;
    margin-bottom: 3rem;
    text-align: center;
    border: 1px solid var(--border-color);
}

.intro-box h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.intro-box h2 .fa-rocket {
    color: var(--primary-color);
    margin-right: 10px;
}

/* --- Lesson List --- */
.lesson-list h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
}

.lesson-list h2 .fa-list-ul {
    color: var(--primary-color);
    margin-right: 12px;
}

.lesson-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.8rem;
}

.lesson-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.lesson-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.07);
}

.lesson-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.lesson-card .lesson-number {
    background-color: var(--primary-color);
    color: #fff;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-right: 12px;
}

.lesson-card h3 {
    font-size: 1.25rem;
    margin: 0;
    line-height: 1.4;
}

.lesson-card p {
    color: #495057;
    font-size: 0.95rem;
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.go-to-lesson {
    font-weight: 700;
    color: var(--primary-color);
    align-self: flex-start;
}

.go-to-lesson .fa-arrow-right {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.lesson-card:hover .go-to-lesson .fa-arrow-right {
    transform: translateX(5px);
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 4rem;
    background-color: var(--footer-bg);
    color: #6c757d;
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .main-header h1 {
        font-size: 2.2rem;
    }

    .lesson-grid {
        grid-template-columns: 1fr;
    }
}