:root {
    --bg-color: #0d0d0d;
    --sidebar-bg: #141414;
    --accent-color: #ffb400;
    --text-color: #e0e0e0;
    --text-muted: #a0a0a0;
    --card-bg: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.1);
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
}

/* Sidebar Navigation */
#sidebar {
    position: fixed;
    width: 250px;
    height: 100vh;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    padding: 2rem 1rem;
    z-index: 1000;
}

.nav-header h1 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--accent-color);
    margin-bottom: 3rem;
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
}

.nav-links li {
    margin-bottom: 0.5rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    display: block;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-color);
    background: var(--card-bg);
    transform: translateX(5px);
}

.nav-links a.active {
    border-left: 3px solid var(--accent-color);
}

.nav-divider {
    height: 1px;
    background: var(--border-color);
    margin: 1.5rem 0.5rem;
}

.btn-return {
    border: 1px solid var(--accent-color) !important;
    color: var(--accent-color) !important;
    margin-bottom: 0.5rem;
    font-weight: 600;
    text-align: center;
}

.btn-return:hover {
    background: var(--accent-color) !important;
    color: #000 !important;
}

/* Main Content Area */
main {
    margin-left: 250px;
    width: calc(100% - 250px);
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* Hero Section */
#hero {
    position: relative;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    filter: brightness(0.6);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--bg-color));
}

.hero-text {
    text-align: center;
    z-index: 1;
}

.hero-text h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    margin: 1rem 0;
    color: #fff;
}

.subtitle {
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--accent-color);
    font-weight: 600;
}

.tagline {
    font-size: 1.2rem;
    font-style: italic;
    color: var(--text-muted);
}

/* Modules General */
.module {
    padding: 4rem 0;
    border-bottom: 1px solid var(--border-color);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #fff;
}

.lead {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

h3 {
    font-family: var(--font-heading);
    color: var(--accent-color);
    margin: 2rem 0 1rem;
    font-size: 1.8rem;
}

/* Cards & Components */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    margin: 2rem 0;
}

.myth-card h3 {
    margin-top: 0;
}

.truth {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

.objective-box {
    background: linear-gradient(45deg, rgba(255, 180, 0, 0.1), transparent);
    border-left: 4px solid var(--accent-color);
    padding: 2rem;
    border-radius: 0 12px 12px 0;
}

/* Grid Layouts */
.grid-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.grid-content.inverse {
    direction: rtl;
}

.grid-content.inverse>* {
    direction: ltr;
}

.content-img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.full-width {
    margin-top: 3rem;
}

/* Exposure Triangle */
.exposure-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.exposure-card {
    text-align: center;
    padding: 2rem 1.5rem;
}

.exposure-card .icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.exposure-card h3 {
    font-size: 1.2rem;
    margin: 1rem 0;
}

.formula {
    font-size: 0.9rem;
    color: var(--accent-color);
    margin: 1rem 0;
}

.rule {
    font-size: 0.85rem;
    text-align: left;
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 8px;
}

.infographic-box {
    margin-top: 4rem;
    text-align: center;
}

.infographic-img {
    max-width: 100%;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

/* Composition */
.composition-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.comp-item {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
}

.comp-guide-img {
    width: 100%;
    margin-top: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* Light & Atmosphere */
.light-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.warning-box {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 3rem;
}

.warning-box h3 {
    color: #ff4444;
    margin-top: 0;
}

.tip-box {
    background: rgba(255, 180, 0, 0.05);
    border: 1px dashed var(--accent-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
    font-size: 0.9rem;
}

/* Exercises */
.exercise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.exercise-card {
    background: #1a1a1a;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.exercise-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-5px);
}

.exercise-card h4 {
    color: var(--accent-color);
    margin-bottom: 0.8rem;
}

/* Errors & Conclusion */
.error-list li {
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 2px solid #ff4444;
}

#conclusion {
    text-align: center;
    padding: 8rem 0;
    background: linear-gradient(to top, #1a1400, var(--bg-color));
}

#conclusion h2 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    margin-bottom: 2rem;
}

.final-call {
    font-size: 1.5rem;
    margin-top: 2rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1024px) {
    body {
        flex-direction: column;
    }

    #sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 1.5rem;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-header h1 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
        text-align: center;
    }

    .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    .nav-links li {
        margin-bottom: 0;
    }

    .nav-links a {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }

    .nav-divider,
    .sidebar-chat {
        display: none;
    }

    main {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .grid-content {
        grid-template-columns: 1fr;
    }

    .exposure-grid,
    .composition-grid,
    .light-grid {
        grid-template-columns: 1fr;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

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

/* Sidebar Chat Styles (Desktop Only) */
.sidebar-chat {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0.5rem;
    height: 300px;
}

.chat-title {
    font-size: 0.85rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.chat-box {
    flex-grow: 1;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 10px;
    font-size: 0.85rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 1px solid var(--border-color);
}

.chat-msg {
    padding: 8px 12px;
    border-radius: 12px;
    max-width: 90%;
    line-height: 1.4;
}

.chat-msg.ai {
    background: var(--card-bg);
    color: var(--text-color);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.chat-msg.user {
    background: var(--accent-color);
    color: #000;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.chat-input-container {
    display: flex;
    gap: 5px;
}

#guide-chat-input {
    flex-grow: 1;
    background: var(--sidebar-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px;
    color: #fff;
    font-size: 0.8rem;
}

#guide-chat-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

#guide-chat-send {
    background: var(--accent-color);
    border: none;
    border-radius: 4px;
    padding: 0 12px;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.75rem;
    transition: var(--transition);
}

#guide-chat-send:hover {
    filter: brightness(1.2);
}