* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", sans-serif;
}

body {
    background: #ffffff;
    color: #222;
}

/* ========================= */
/* Top Bar */
/* ========================= */

.topbar {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid #e5e5e5;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
}

.chapter-title {
    font-weight: 600;
    font-size: 16px;
}

/* Progress bar container */
.progress-container {
    width: 20%;
    height: 6px;
    background: #eee;
    border-radius: 5px;
    overflow: hidden;
}

/* Progress bar itself */
.progress-bar {
    height: 100%;
    width: 0%; /* start empty */
    background: red; /* initial color */
    box-shadow: 0 0 8px rgba(255,0,0,0.6); /* glow */
    border-radius: 5px;
    transition: width 0.2s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.toggle-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

/* ========================= */
/* Layout */
/* ========================= */

.layout {
    display: flex;
    height: calc(100vh - 60px); /* full screen minus topbar */
    overflow: hidden; /* important */
}

/* Sidebar */
.sidebar {
    width: 220px;
    padding: 20px;
    border-right: 1px solid #eee;
    overflow-y: auto;   /* separate scroll */
    height: 100%;
    transition: all 0.3s ease;
}

.sidebar h3 {
    font-size: 14px;
    margin-bottom: 15px;
    color: #555;
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    margin-bottom: 10px;
}

.sidebar a {
    text-decoration: none;
    color: #333;
    font-size: 14px;
}

.sidebar a:hover {
    color: #000;
}

/* Content */

.content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;   /* separate scroll */
    height: 100%;
}

/* Cards */

.card {
    margin-bottom: 25px;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 6px;
    background: #fff;
}

.card h2 {
    margin-bottom: 10px;
    font-size: 18px;
}

/* Flowchart */

.flow-box {
    padding: 10px;
    border: 1px solid #ccc;
    text-align: center;
    margin: 5px 0;
}

.flow-arrow {
    text-align: center;
    font-size: 18px;
}
/* ========================= */
/* Table Styling */
/* ========================= */

table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 14px;
    background: #ffffff;
}

/* All Cells */
th,
td {
    border: 1px solid #eaeaea;
    padding: 12px 10px;
    text-align: center;
}

/* Header Row 1 */
table tr:first-child th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 13px;
}

/* Header Row 2 */
table tr:nth-child(2) th {
    background: #fcfcfc;
    font-weight: 500;
}

/* Body Row */
td {
    background: #ffffff;
}

/* Hover Effect (optional but nice for students) */
tr:hover td {
    background: #fafafa;
}

/* Make merged header look centered properly */
th[colspan] {
    text-align: center;
}

/* Responsive Scroll (important for mobile) */
.table-container {
    overflow-x: auto;
}
/* Smooth transition */
.sidebar {
    width: 220px;
    padding: 20px;
    border-right: 1px solid #eee;
    transition: all 0.3s ease;
}

/* Hidden state */
.sidebar.hidden {
    width: 0;
    padding: 0;
    overflow: hidden;
    border: none;
}

/* Content auto expand */
.content {
    flex: 1;
    padding: 30px;
    transition: all 0.3s ease;
}

/* Sidebar links */
.sidebar a {
    display: block;
    padding: 8px 10px;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: all 0.2s ease;
}

/* Hover effect */
.sidebar a:hover {
    background-color: #f2f2f2;
    color: #000;
    padding-left: 14px; /* slight movement */
}

/* Active / clicked state (optional but recommended) */
.sidebar a:hover {
    background-color: #f5f5f5;
    border-left: 3px solid #111;
    padding-left: 11px;
}