@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;800;900&family=Quicksand:wght@400;600;700&display=swap');

:root {
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #ec4899;
    --accent: #10b981;
    --warning: #f59e0b;
    --bg: #f8fafc;
    --text: #1e293b;
    --border: #e2e8f0;
}

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

body {
    font-family: 'Nunito', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.8;
    padding: 2rem;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    padding: 4rem;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 2rem;
    padding: 0.5rem 1rem;
    background: #e0e7ff;
    border-radius: 12px;
    transition: background 0.3s ease;
}

.back-link:hover { background: #c7d2fe; }

header {
    border-bottom: 2px solid var(--border);
    padding-bottom: 2rem;
    margin-bottom: 3rem;
    text-align: center;
}

.lesson-badge {
    background: var(--primary);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 99px;
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    display: inline-block;
}

h1 { font-size: 3.5rem; color: #0f172a; margin-top: 1rem; letter-spacing: -1px; }
.intro-text { font-size: 1.25rem; color: #64748b; margin-top: 1rem; max-width: 800px; margin-left: auto; margin-right: auto; }

/* Overview Box */
.overview-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}
.overview-item {
    background: #f1f5f9;
    padding: 1.5rem;
    border-radius: 16px;
    border-left: 6px solid var(--primary);
}
.overview-item h4 { color: var(--primary); margin-bottom: 0.5rem; font-size: 1.1rem; }
.overview-item p, .overview-item ul { font-size: 0.95rem; color: #475569; }
.overview-item ul { padding-left: 1.2rem; }

/* Main Content Headings */
h2 { 
    font-size: 2rem; 
    color: var(--primary); 
    margin-top: 4rem; 
    margin-bottom: 2rem; 
    display: flex; 
    align-items: center; 
    gap: 1rem; 
    border-bottom: 2px solid var(--border);
    padding-bottom: 1rem;
}
h2 .time-tag {
    background: var(--secondary);
    color: white;
    font-size: 1rem;
    padding: 0.3rem 1rem;
    border-radius: 99px;
    font-weight: 700;
}

h3 { font-size: 1.5rem; color: #334155; margin-top: 2rem; margin-bottom: 1rem; font-weight: 700; }

p { margin-bottom: 1.5rem; font-size: 1.1rem; }
ul, ol { margin-bottom: 1.5rem; padding-left: 1.5rem; font-size: 1.1rem; }
li { margin-bottom: 0.8rem; }

/* Teacher Script Box */
.script-box {
    background: #eff6ff;
    border: 2px dashed #93c5fd;
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    position: relative;
}
.script-box::before {
    content: '🗣️ Lời dẫn Giáo viên';
    position: absolute;
    top: -12px;
    left: 20px;
    background: #eff6ff;
    padding: 0 10px;
    color: #2563eb;
    font-weight: 800;
    font-size: 0.9rem;
}
.script-box p { margin: 0; font-style: italic; color: #1e3a8a; }

/* Excel Simulation Table */
.excel-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-family: Arial, sans-serif;
    background: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.excel-table th, .excel-table td {
    border: 1px solid #cbd5e1;
    padding: 10px;
    text-align: center;
}
.excel-table th { background: #f1f5f9; color: #475569; font-weight: 600; }
.excel-table .col-header { width: 50px; background: #e2e8f0; }
.excel-table .active-cell { border: 2px solid #22c55e; background: #dcfce7; font-weight: bold; }

/* Action/Step Box */
.action-box {
    background: #fdf2f8;
    border-left: 6px solid var(--secondary);
    padding: 1.5rem;
    border-radius: 0 16px 16px 0;
    margin: 2rem 0;
}
.action-box h4 { color: #be185d; margin-bottom: 1rem; font-size: 1.2rem; }

/* Practice Zone */
.practice-zone {
    background: #ecfdf5;
    border-radius: 24px;
    padding: 3rem;
    margin-top: 5rem;
    border: 2px solid var(--accent);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.1);
}
.practice-zone h2 {
    border: none;
    color: #065f46;
    margin-top: 0;
    padding-bottom: 0;
}

.code-block { font-family: monospace; background: #1e293b; color: #38bdf8; padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 1.1rem; }
pre.code-block { display: block; padding: 1.2rem; border-radius: 12px; overflow-x: auto; white-space: pre-wrap; word-break: break-all; line-height: 1.5; }
.icon-text { display: inline-flex; align-items: center; gap: 8px; font-weight: bold; background: #f1f5f9; padding: 4px 8px; border-radius: 8px; border: 1px solid #cbd5e1; }

footer { text-align: center; margin-top: 6rem; color: #94a3b8; font-size: 1rem; border-top: 1px solid var(--border); padding-top: 2rem; }
