:root {
    --primary-color: #2C3E50;
    /* Oreka Blue */
    --primary-dark: #1a252f;
    --secondary-color: #F5F7F5;
    /* Soft White */
    --accent-color: #D4A373;
    /* Earthy Gold for highlights */
    --text-main: #333333;
    /* Charcoal */
    --text-light: #666666;
    --bg-sidebar: #247467;
    --bg-sidebar-text: #ECF0F1;
    --border-radius: 12px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --font-main: 'Open Sans', sans-serif;
    --rouge-accent: #E74C3C;
    --vert-accent: #27AE60;
    --blanc: #FFFFFF;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--secondary-color);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    color: var(--bg-sidebar-text);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: width 0.3s ease;
}

.logo-area {
    padding: 24px;
    background-color: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-area h1 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.logo-area p {
    font-size: 0.9rem;
    opacity: 0.7;
}

.logo-img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.main-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
}

.nav-btn {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
    border-left: 4px solid transparent;
}

.nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
}

.nav-btn.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: var(--primary-color);
}

.session-list {
    margin-top: 8px;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: #FFFFFF;
}

.top-bar {
    height: 64px;
    border-bottom: 1px solid #E0E0E0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 32px;
    background-color: white;
}

.breadcrumbs {
    font-weight: 600;
    color: var(--text-light);
}

.user-status {
    display: flex;
    align-items: center;
    gap: 16px;
}

.points-display {
    background-color: var(--secondary-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 6px;
}

.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

/* Content Styling */
h2 {
    color: var(--primary-dark);
    margin-bottom: 24px;
    font-size: 2rem;
}

h3 {
    color: var(--text-main);
    margin: 32px 0 16px;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
    display: inline-block;
}

h4 {
    color: var(--primary-dark);
    margin: 20px 0 12px;
    font-size: 1.2rem;
}

p {
    line-height: 1.7;
    margin-bottom: 16px;
    color: var(--text-main);
}

ul,
ol {
    margin-bottom: 16px;
    padding-left: 24px;
    line-height: 1.6;
}

li {
    margin-bottom: 8px;
}

.highlight-box {
    background-color: var(--secondary-color);
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    border-radius: 0 8px 8px 0;
    margin: 24px 0;
}

.card {
    background: white;
    border: 1px solid #E0E0E0;
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.card-title {
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--primary-dark);
}

/* Audio Buttons */
.tts-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.tts-btn {
    background: linear-gradient(135deg, var(--rouge-accent), var(--vert-accent));
    color: var(--blanc);
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    cursor: pointer;
}

.tts-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tts-rewind-btn {
    background: transparent;
    border: 2px solid var(--rouge-accent);
    color: var(--rouge-accent);
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.tts-rewind-btn:hover {
    background: var(--rouge-accent);
    color: var(--blanc);
}

.tts-rewind-btn:disabled {
    border-color: var(--rouge-accent);
    color: var(--rouge-accent);
    background: transparent;
    opacity: 0.5;
    cursor: not-allowed;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Tabs */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid #E0E0E0;
    padding-bottom: 1px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-light);
    transition: all 0.2s;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gamification */
.checklist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    padding: 12px;
    border-radius: 8px;
    transition: background 0.2s;
}

.checklist-item:hover {
    background-color: var(--secondary-color);
}

.checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: background 0.2s;
}

.checklist-item.checked .checkbox {
    background-color: var(--primary-color);
}

.checklist-item.checked span {
    text-decoration: line-through;
    opacity: 0.6;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-dark);
    margin-right: 16px;
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 900;
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        height: auto;
        overflow: auto;
    }

    .app-container {
        flex-direction: column;
        height: auto;
        overflow: auto;
    }

    .menu-toggle {
        display: block;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        height: 100vh;
        z-index: 1000;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    }

    .sidebar.active {
        left: 0;
    }

    .main-nav {
        display: block;
    }

    .main-content {
        height: auto;
        overflow: visible;
        width: 100%;
    }

    .top-bar {
        padding: 0 16px;
    }

    .content-area {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .content-area {
        padding: 16px;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.2rem;
    }

    .card-header-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .user-status {
        gap: 8px;
    }

    .points-display {
        font-size: 0.85rem;
        padding: 4px 8px;
    }

    .breadcrumbs {
        font-size: 0.9rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 150px;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .highlight-box {
        padding: 15px;
    }
}