/* ===================================
   Baklol Nerd - Calm Academic Styling
   Color Palette:
   - Background: #000000, #1A1A1A
   - Content: #FFFFFF
   - Secondary: #8A8A8A
   - Borders: #E6E6E6
   =================================== */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #000000;
    color: #FFFFFF;
    line-height: 1.7;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

p {
    margin-bottom: 1rem;
    color: #FFFFFF;
}

a {
    color: #FFFFFF;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.7;
}

/* Header */
.header {
    background-color: #1A1A1A;
    border-bottom: 1px solid #E6E6E6;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.25rem;
    font-weight: 500;
    margin: 0;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-size: 0.9375rem;
    font-weight: 400;
    padding: 0.5rem 0;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.nav-link.active {
    border-bottom-color: #FFFFFF;
}

/* Profile Panel */
.profile-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background-color: #1A1A1A;
    border-left: 1px solid #E6E6E6;
    z-index: 200;
    transition: right 0.3s ease;
}

.profile-panel.active {
    right: 0;
}

.profile-panel-content {
    padding: 2rem;
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #E6E6E6;
}

.profile-header h2 {
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: #FFFFFF;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    opacity: 0.7;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.profile-label {
    font-size: 0.875rem;
    color: #8A8A8A;
    font-weight: 400;
}

.profile-value {
    font-size: 1.125rem;
    color: #FFFFFF;
    font-weight: 500;
}

/* Main Content */
.main-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0;
}

.hero-content {
    max-width: 600px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: #8A8A8A;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 0.875rem 2rem;
    font-size: 0.9375rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
    font-family: inherit;
    border-radius: 0;
}

.btn:hover {
    opacity: 0.8;
}

.btn-primary {
    background-color: #FFFFFF;
    color: #000000;
}

.btn-secondary {
    background-color: transparent;
    color: #FFFFFF;
    border: 1px solid #FFFFFF;
}

.btn-complete {
    background-color: #FFFFFF;
    color: #000000;
    width: 100%;
    max-width: 400px;
}

.btn-download {
    background-color: transparent;
    color: #FFFFFF;
    border: 1px solid #FFFFFF;
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
}

/* Chapter Overview Section */
.chapter-overview {
    margin-top: 4rem;
}

.section-header {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 500;
}

.chapter-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.chapter-item {
    background-color: #1A1A1A;
    padding: 1.5rem;
    border-bottom: 1px solid #E6E6E6;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.chapter-item:first-child {
    border-top: 1px solid #E6E6E6;
}

.chapter-item:hover {
    background-color: #252525;
}

.chapter-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.chapter-item-content {
    flex: 1;
}

.chapter-number {
    font-size: 0.875rem;
    color: #8A8A8A;
    margin-bottom: 0.25rem;
}

.chapter-name {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.chapter-description {
    font-size: 0.9375rem;
    color: #8A8A8A;
    margin-bottom: 0.75rem;
}

.chapter-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
}

.meta-item {
    color: #8A8A8A;
}

.chapter-status {
    font-size: 0.875rem;
    color: #8A8A8A;
    white-space: nowrap;
}

/* Chapter Header */
.chapter-header {
    padding: 2rem 0;
    border-bottom: 1px solid #E6E6E6;
    margin-bottom: 2rem;
}

.chapter-header-content {
    max-width: 900px;
}

.back-link {
    display: inline-block;
    font-size: 0.9375rem;
    color: #8A8A8A;
    margin-bottom: 1rem;
}

.chapter-title {
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.chapter-subtitle {
    font-size: 1.125rem;
    color: #8A8A8A;
    margin-bottom: 1.5rem;
}

.progress-indicator {
    margin-top: 1rem;
}

.progress-text {
    font-size: 0.9375rem;
    color: #8A8A8A;
}

/* Chapter Explanation */
.chapter-explanation {
    margin-bottom: 3rem;
}

.explanation-box {
    background-color: #1A1A1A;
    padding: 1.5rem;
    border: 1px solid #E6E6E6;
}

.explanation-box p {
    margin: 0;
    font-size: 0.9375rem;
    color: #8A8A8A;
}

/* Concept List */
.concept-list-section {
    margin-top: 2rem;
}

.concept-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.concept-item {
    background-color: #1A1A1A;
    padding: 1.5rem;
    border-bottom: 1px solid #E6E6E6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.concept-item:first-child {
    border-top: 1px solid #E6E6E6;
}

.concept-item.clickable {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.concept-item.clickable:hover {
    background-color: #252525;
}

.concept-item.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.concept-item-content {
    flex: 1;
}

.concept-number {
    font-size: 0.875rem;
    color: #8A8A8A;
    margin-bottom: 0.25rem;
}

.concept-name {
    font-size: 1.125rem;
    font-weight: 500;
}

.concept-status-badge {
    font-size: 0.875rem;
    padding: 0.25rem 0.75rem;
    border: 1px solid #E6E6E6;
    white-space: nowrap;
}

.concept-status-badge.not-started {
    color: #8A8A8A;
}

.concept-status-badge.in-progress {
    color: #FFFFFF;
    border-color: #FFFFFF;
}

.concept-status-badge.completed {
    color: #FFFFFF;
    background-color: #FFFFFF;
    color: #000000;
}

/* Concept Header */
.concept-header {
    padding: 2rem 0;
    border-bottom: 1px solid #E6E6E6;
    margin-bottom: 2rem;
}

.concept-header-content {
    max-width: 900px;
}

.concept-title {
    font-size: 1.75rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.concept-time {
    font-size: 0.9375rem;
    color: #8A8A8A;
}

/* Video Section */
.video-section {
    margin-bottom: 3rem;
}

.ad-container {
    background-color: #1A1A1A;
    border: 1px solid #E6E6E6;
    padding: 3rem 2rem;
    text-align: center;
}

.ad-content {
    max-width: 500px;
    margin: 0 auto;
}

.ad-label {
    font-size: 0.75rem;
    color: #8A8A8A;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.ad-placeholder {
    background-color: #000000;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    border: 1px solid #E6E6E6;
}

.ad-placeholder p {
    color: #8A8A8A;
    margin: 0;
}

.video-container {
    margin-bottom: 2rem;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    background-color: #000000;
    border: 1px solid #E6E6E6;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.ad-transparency {
    font-size: 0.75rem;
    color: #8A8A8A;
    margin-top: 0.5rem;
    text-align: center;
}

/* Notes Section */
.notes-section {
    margin-bottom: 3rem;
}

.notes-content {
    background-color: #1A1A1A;
    padding: 2rem;
    border: 1px solid #E6E6E6;
}

.section-heading {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #E6E6E6;
}

.notes-text h3 {
    font-size: 1.125rem;
    font-weight: 500;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.notes-text h3:first-child {
    margin-top: 0;
}

.notes-text p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.notes-text ul,
.notes-text ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.notes-text li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.notes-text strong {
    font-weight: 500;
}

/* Practice Section */
.practice-section {
    margin-bottom: 3rem;
}

.practice-content {
    background-color: #1A1A1A;
    padding: 2rem;
    border: 1px solid #E6E6E6;
}

.practice-intro {
    color: #8A8A8A;
    margin-bottom: 1.5rem;
}

.question-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.question-item {
    padding: 1rem;
    background-color: #000000;
    border: 1px solid #E6E6E6;
}

.question-number {
    font-size: 0.875rem;
    color: #8A8A8A;
    margin-bottom: 0.5rem;
}

.question-text {
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* Downloads Section */
.downloads-section {
    margin-bottom: 3rem;
}

.downloads-content {
    background-color: #1A1A1A;
    padding: 2rem;
    border: 1px solid #E6E6E6;
}

.downloads-intro {
    color: #8A8A8A;
    margin-bottom: 1.5rem;
}

.download-ad {
    margin-top: 1.5rem;
}

.download-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.download-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: #000000;
    border: 1px solid #E6E6E6;
}

.download-name {
    font-size: 1rem;
}

/* Completion Section */
.completion-section {
    margin-bottom: 3rem;
}

.completion-content {
    text-align: center;
    padding: 2rem;
    background-color: #1A1A1A;
    border: 1px solid #E6E6E6;
}

.completion-note {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #8A8A8A;
}

/* Next Concept Section */
.next-concept-section {
    margin-bottom: 3rem;
}

.next-concept-content {
    text-align: center;
    padding: 2rem;
    background-color: #1A1A1A;
    border: 1px solid #E6E6E6;
}

.completion-message {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    color: #FFFFFF;
}

.next-concept-content .back-link {
    display: inline-block;
    margin-top: 1rem;
}

/* Responsive Design - Mobile First */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .header-content {
        padding: 0 1rem;
    }

    .nav {
        gap: 1.5rem;
    }

    .main-content {
        padding: 1.5rem 1rem;
    }

    .hero {
        padding: 3rem 0;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .btn {
        width: 100%;
        max-width: 100%;
    }

    .chapter-item {
        padding: 1.25rem;
    }

    .chapter-item-header {
        flex-direction: column;
    }

    .concept-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.25rem;
    }

    .notes-content,
    .practice-content,
    .downloads-content,
    .completion-content,
    .next-concept-content {
        padding: 1.5rem;
    }

    .ad-container {
        padding: 2rem 1rem;
    }

    .profile-panel {
        max-width: 100%;
        right: -100%;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus States */
button:focus,
a:focus {
    outline: 2px solid #FFFFFF;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .header,
    .profile-panel,
    .hero-actions,
    .ad-container,
    .downloads-section,
    .completion-section {
        display: none;
    }

    body {
        background-color: white;
        color: black;
    }
}
