:root {
    --bg-color: #0a0a0a;
    --text-color: #e0e0e0;
    --accent-color: #ffd700;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-bg: #1a1a1a;
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Playfair Display', serif;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    line-height: 1.6;
}

.content-wrapper {
    width: 100%;
    max-width: 900px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* Header & Typography */
header {
    text-align: center;
    margin-bottom: 1rem;
    animation: fadeInDown 1s ease-out;
}

h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin: 0;
    background: linear-gradient(45deg, #fff, var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
    text-align: center;
}

h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    color: #eee;
}

h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-top: 1.2rem;
    margin-bottom: 0.5rem;
    color: #ddd;
}

p,
li {
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
    text-align: justify;
    color: #ccc;
    line-height: 1.7;
}

/* Video Placeholder */
.video-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--card-bg);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

/* Theory Section */
.theory-section {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    margin-bottom: 3rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    animation: fadeInUp 1s ease-out 0.4s backwards;
}

/* Interactive Text */
.interactive-term {
    color: var(--accent-color);
    cursor: help;
    border-bottom: 1px dotted var(--accent-color);
    transition: all 0.3s ease;
    position: relative;
}

.interactive-term:hover {
    background-color: rgba(255, 215, 0, 0.1);
    border-bottom-style: solid;
}

/* Knowledge Graph Popover */
#knowledge-graph {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 350px;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
}

#knowledge-graph.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.kg-header {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}

.kg-content {
    font-size: 0.95rem;
    color: #ddd;
    line-height: 1.5;
}

.kg-source {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: #888;
    font-style: italic;
}

/* Buttons */
.buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.6s backwards;
}

.btn {
    background: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    background: var(--accent-color);
    color: var(--bg-color);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
    transform: translateY(-2px);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .content-wrapper {
        padding: 1rem;
    }

    .theory-section {
        padding: 1.5rem;
    }

    #knowledge-graph {
        bottom: 0;
        right: 0;
        width: 100%;
        border-radius: 16px 16px 0 0;
        border-bottom: none;
        transform: translateY(100%);
        max-height: 50vh;
        overflow-y: auto;
    }

    #knowledge-graph.active {
        transform: translateY(0);
    }
}