:root {
    /* Core Colors - Inspired by Mockup */
    --bg-body: #05050A;
    /* Deepest black/blue */
    --bg-sidebar: #0B0F19;
    /* Slightly lighter dark */
    --accent-primary: #4F46E5;
    /* Bright Indigo/Blue */
    --accent-secondary: #7C3AED;
    /* Purple for gradients */
    --text-main: #FFFFFF;
    --text-sub: #94A3B8;

    /* Card Colors */
    --card-header-bg: #1E293B;
    /* Dark Blue Slate */
    --card-body-bg: #0F172A;
    /* Darker Slate */
    --card-border: #334155;

    /* Gradients */
    --btn-active-gradient: linear-gradient(90deg, #4f46e5 0%, #6366f1 100%);
    --card-header-gradient: linear-gradient(90deg, rgba(30, 41, 59, 1) 0%, rgba(15, 23, 42, 0) 100%);

    /* Typography */
    --font-family: 'Outfit', sans-serif;
}

[data-theme="light"] {
    --bg-body: #F1F5F9;
    --bg-sidebar: #FFFFFF;
    --accent-primary: #2563EB;
    --accent-secondary: #1D4ED8;
    --text-main: #0F172A;
    --text-sub: #475569;

    --card-header-bg: #E2E8F0;
    --card-body-bg: #FFFFFF;
    --card-border: #CBD5E1;

    --btn-active-gradient: linear-gradient(90deg, #2563EB 0%, #1D4ED8 100%);
    --card-header-gradient: linear-gradient(90deg, #E2E8F0 0%, #F8FAFC 100%);
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
}

/* Layout Grid */
.main-layout {
    display: flex;
    min-height: 100vh;
}

/* --- SIDEBAR --- */
.sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1000;
}

[data-theme="light"] .sidebar {
    border-right: 1px solid #E2E8F0;
}

.sidebar-header {
    margin-bottom: 40px;
}

.brand {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--text-main);
    letter-spacing: 0.5px;
}

.brand-sub {
    font-weight: 300;
    font-size: 1rem;
    color: var(--text-sub);
    margin-left: 5px;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
}

.nav-btn {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-sub);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: transparent;
}

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

[data-theme="light"] .nav-btn:hover {
    background: #F1F5F9;
}

/* Active State - The Button Look */
.nav-btn.active {
    background: var(--btn-active-gradient);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

[data-theme="light"] .sidebar-footer {
    border-top: 1px solid #E2E8F0;
}

/* --- MAIN CONTENT --- */
.app-container {
    margin-left: 280px;
    width: calc(100% - 280px);
    padding: 40px 60px;
    max-width: 1200px;
}

/* Header */
.main-header {
    text-align: center;
    background: var(--card-body-bg);
    border: 1px solid var(--card-border);
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

/* Top glow effect */
.main-header::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 100px;
    background: var(--accent-primary);
    filter: blur(80px);
    opacity: 0.3;
}

.main-header h1 {
    font-size: 1.8rem;
    margin: 10px 0;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.main-header h2 {
    font-size: 1rem;
    color: var(--text-sub);
    font-weight: 400;
}

/* Content Cards */
.card {
    background: var(--card-body-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    margin-bottom: 30px;
    overflow: hidden;
}

.card-header {
    background: var(--card-header-gradient);
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid var(--card-border);
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    font-size: 0.9rem;
}

[data-theme="light"] .step-number {
    background: rgba(0, 0, 0, 0.1);
    color: #0F172A;
}

.card-header h3 {
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 1px;
    color: var(--text-main);
    font-weight: 700;
}

.card-content {
    padding: 25px;
}

/* Dialogues and Text */
.dialogue {
    font-style: italic;
    font-size: 1.1rem;
    color: var(--text-main);
    border-left: 3px solid var(--accent-primary);
    padding-left: 15px;
    margin-bottom: 20px;
}

.bullet-list {
    list-style: none;
    padding: 0;
}

.bullet-list li {
    margin-bottom: 12px;
    padding-left: 20px;
    position: relative;
    color: var(--text-sub);
}

.bullet-list li strong {
    color: var(--text-main);
}

.bullet-list li::before {
    content: '•';
    color: var(--accent-primary);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Highlight Text */
.highlight {
    color: var(--accent-primary);
    font-weight: 700;
}

/* Objections */
.objection-block {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

[data-theme="light"] .objection-block {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
}

.objection-block h4 {
    color: var(--text-main);
    font-weight: 700;
    margin-bottom: 5px;
}

/* Theme Switcher Style */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #334155;
    transition: .4s;
    border-radius: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--accent-primary);
}

input:checked+.slider:before {
    transform: translateX(24px);
}

.icon-sun,
.icon-moon {
    font-size: 12px;
}

/* --- MOBILE --- */
/* --- MOBILE --- */
@media (max-width: 1024px) {
    .sidebar {
        display: none;
        /* Hide for now */
    }

    .app-container {
        margin-left: 0;
        width: 100%;
        padding: 15px;
        /* Reduced outer padding */
    }
}

@media (max-width: 600px) {
    .main-header {
        padding: 20px 15px;
    }

    .main-header h1 {
        font-size: 1.25rem;
        /* Much smaller to prevent awkward wrapping */
        line-height: 1.4;
        letter-spacing: 1px;
    }

    .main-header h2 {
        font-size: 0.9rem;
    }

    .card-header h3 {
        font-size: 0.9rem;
        /* Smaller card titles */
    }

    .script-block {
        font-size: 1rem;
        /* Slightly smaller text for readability on phone */
        padding: 12px 15px;
    }
}

/* --- CONTENT SPECIFIC STYLES --- */

/* Kernbegriffe & Spickzettel Grid */
.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.cheat-block {
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.2s;
}

[data-theme="light"] .cheat-block {
    background: #F8FAFC;
    border-color: #E2E8F0;
}

.cheat-block:hover {
    transform: translateY(-2px);
    border-color: var(--accent-primary);
}

.cheat-block h4 {
    color: var(--accent-primary);
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

[data-theme="light"] .cheat-block h4 {
    border-bottom: 1px solid #E2E8F0;
}

.cheat-block ul {
    list-style: none;
    padding: 0;
}

.cheat-block li {
    position: relative;
    padding-left: 0;
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: var(--text-main);
}

.cheat-block li::before {
    content: none;
    /* Reset default bullet */
}

/* Term Definitions */
.term-block {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 20px;
}

.term-block:last-child {
    margin-bottom: 0;
}

[data-theme="light"] .term-block {
    background: #F8FAFC;
    border-color: #E2E8F0;
}

.term-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.term-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--accent-primary);
    color: white;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.term-header h4 {
    font-size: 1.1rem;
    color: var(--text-main);
    margin: 0;
}

.term-question {
    font-size: 0.9rem;
    color: var(--text-sub);
    font-style: italic;
    display: block;
}

.term-body p {
    margin-bottom: 10px;
    color: var(--text-sub);
}

.term-body strong {
    color: var(--text-main);
}

.term-body ul {
    padding-left: 20px;
    margin-top: 10px;
}

.term-body li {
    margin-bottom: 5px;
    color: var(--text-sub);
}

.example {
    margin-top: 15px;
    padding: 15px;
    background: rgba(var(--accent-primary), 0.1);
    border-radius: 6px;
    border-left: 3px solid var(--accent-primary);
    font-size: 0.95rem;
}

/* Hints Section */
.hint-card .card-content {
    text-align: center;
    padding: 40px;
}

.hint-card h4 {
    color: var(--text-main);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.hint-card p {
    margin-bottom: 15px;
    color: var(--text-sub);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.success-wish {
    margin-top: 40px;
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--btn-active-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
}

/* --- TIMELINE & SCRIPT FLOW --- */
.timeline-container {
    position: relative;
    padding-left: 50px;
    margin-bottom: 60px;
}

.timeline-line {
    position: absolute;
    left: 24px;
    /* Center of the 50px marker area roughly */
    top: 20px;
    bottom: 20px;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-primary) 0%, rgba(255, 255, 255, 0.05) 100%);
    z-index: 0;
}

[data-theme="light"] .timeline-line {
    background: linear-gradient(180deg, var(--accent-primary) 0%, #E2E8F0 100%);
}

.timeline-step {
    position: relative;
    margin-bottom: 50px;
    z-index: 1;
}

.step-marker {
    position: absolute;
    left: -50px;
    top: 0;
    width: 50px;
    height: 50px;
    background: var(--card-body-bg);
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    font-weight: 800;
    font-size: 1.2rem;
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.3);
}

[data-theme="light"] .step-marker {
    background: #FFFFFF;
    color: var(--accent-primary);
}

.step-content {
    background: transparent;
    padding-left: 20px;
}

.step-title {
    color: var(--text-sub);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 2px;
    margin-bottom: 25px;
    margin-top: 12px;
    /* Align with marker */
    display: flex;
    align-items: center;
}

.step-title::after {
    content: '';
    flex-grow: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin-left: 15px;
}

[data-theme="light"] .step-title::after {
    background: #E2E8F0;
}

/* SCRIPT BUBBLES */
.script-bubble {
    padding: 18px 25px;
    border-radius: 12px;
    border-bottom-left-radius: 2px;
    background: var(--card-body-bg);
    border: 1px solid var(--card-border);
    margin-bottom: 20px;
    color: var(--text-main);
    font-size: 1.15rem;
    line-height: 1.6;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .script-bubble {
    background: #FFFFFF;
    border-color: #CBD5E1;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.script-bubble.agent {
    border-left: 4px solid var(--accent-primary);
}

.script-bubble.prospect {
    background: rgba(0, 0, 0, 0.3);
    border-left: 4px solid #F87171;
    /* Red for objection */
    border-radius: 12px;
    border-bottom-right-radius: 2px;
    border-bottom-left-radius: 12px;
    margin-left: auto;
    /* Push to right? Or just distinct style? Let's keep left but distinct */
    width: fit-content;
    color: #F87171;
    font-style: italic;
    opacity: 0.9;
}

[data-theme="light"] .script-bubble.prospect {
    background: #FEF2F2;
    border-color: #F87171;
}

.script-bubble strong {
    color: var(--accent-primary);
    font-weight: 700;
}

[data-theme="light"] .script-bubble strong {
    color: #1D4ED8;
}

.script-bubble.climax {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(0, 0, 0, 0) 100%);
    border-color: var(--accent-primary);
}

[data-theme="light"] .script-bubble.climax {
    background: linear-gradient(135deg, #EFF6FF 0%, #FFFFFF 100%);
}

.conversation-pair {
    margin-bottom: 30px;
    padding-left: 20px;
    border-left: 1px dashed rgba(255, 255, 255, 0.1);
}

/* INSTRUCTIONS */
.instruction-box {
    padding: 10px 20px;
    margin-bottom: 20px;
}

.instruction-box ul {
    list-style: none;
    padding: 0;
}

.instruction-box li {
    font-size: 0.95rem;
    color: var(--text-sub);
    margin-bottom: 8px;
    position: relative;
    padding-left: 15px;
}

.instruction-box li::before {
    content: 'i';
    position: absolute;
    left: 0;
    font-family: monospace;
    font-weight: bold;
    color: var(--text-sub);
    border-radius: 50%;
    border: 1px solid var(--text-sub);
    width: 16px;
    height: 16px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 3px;
}

/* Proposal Box New Style */
.proposal-box.new-style {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 25px;
    margin-top: 30px;
}

[data-theme="light"] .proposal-box.new-style {
    background: #F1F5F9;
}

.proposal-box h4 {
    margin-bottom: 15px;
    color: var(--text-sub);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* Mobile Adjustments for Timeline */
@media (max-width: 600px) {
    .timeline-container {
        padding-left: 0;
    }

    .timeline-line {
        display: none;
    }

    .step-marker {
        position: relative;
        left: 0;
        margin-bottom: 15px;
    }

    .step-content {
        padding-left: 0;
    }
}