:root {
    --bg-color: #1a0b2e;
    /* Deep Purple */
    --text-color: #e0d4fc;
    --primary-color: #764abc;
    /* Purple */
    --secondary-color: #43cbff;
    /* Cyan/Blue */
    --accent-color: #ff0080;
    /* Magenta */
    --line-color: rgba(118, 74, 188, 0.3);
    --font-main: 'Rajdhani', sans-serif;
    --font-mono: 'Source Code Pro', monospace;
}

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

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

.presentation-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Digital Grid Background */
.digital-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(var(--line-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--line-color) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
}

.digital-grid::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, var(--bg-color) 80%);
}

/* Slide Styles */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    z-index: 1;
    transform: translateY(20px);
}

.slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
    transform: translateY(0);
}

/* Hierarchy Node Styling */
.hierarchy-node {
    background: linear-gradient(135deg, rgba(118, 74, 188, 0.2), rgba(67, 203, 255, 0.1));
    border: 2px solid var(--primary-color);
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 30px rgba(118, 74, 188, 0.3);
    position: relative;
}

.root-node::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 20px;
    background: var(--primary-color);
}

.node-icon {
    margin-bottom: 1rem;
    color: var(--secondary-color);
    filter: drop-shadow(0 0 10px var(--secondary-color));
}

/* Typography */
h1 {
    font-size: 5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
    text-transform: uppercase;
    background: linear-gradient(to right, var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 2px;
}

.section-header h1 {
    font-size: 6rem;
}

h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
    color: var(--text-color);
    text-align: center;
    font-weight: 500;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

p {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    line-height: 1.6;
    max-width: 900px;
    margin-bottom: 1.5rem;
    color: #b8b0cc;
    text-align: center;
}

.subtitle {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 3rem;
    font-family: var(--font-mono);
}

/* Code Blocks */
pre {
    background-color: #2d1b4e;
    padding: 1.5rem;
    border-left: 4px solid var(--secondary-color);
    border-radius: 8px;
    max-width: 1000px;
    width: 100%;
    overflow-x: auto;
    margin-top: 1.5rem;
    font-family: var(--font-mono);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

code {
    font-family: var(--font-mono);
    font-size: 1.2rem;
}

/* Lists and Trees */
ul {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    line-height: 1.8;
    color: var(--text-color);
    max-width: 900px;
    list-style: none;
}

li {
    margin-bottom: 1rem;
    padding-left: 2rem;
    position: relative;
}

li::before {
    content: '├─';
    color: var(--secondary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

li:last-child::before {
    content: '└─';
}

/* Tree Structure Visualization */
.tree-structure {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tree-item {
    background: rgba(118, 74, 188, 0.2);
    padding: 1rem 2rem;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 1.4rem;
    color: var(--secondary-color);
}

.tree-connector {
    width: 2px;
    height: 20px;
    background: var(--primary-color);
}

/* Hierarchy Tree Diagram */
.hierarchy-tree {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 2rem;
}

.h-node {
    padding: 1rem 2rem;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-weight: bold;
    min-width: 150px;
    text-align: center;
}

.h-node.root {
    background: var(--primary-color);
    color: white;
}

.h-node.child {
    background: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
}

.h-lines {
    display: flex;
    justify-content: space-between;
    width: 200px;
    height: 30px;
    position: relative;
}

.h-lines::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 15px;
    background: var(--text-color);
}

.h-lines::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 25%;
    /* Adjust based on children count */
    right: 25%;
    height: 2px;
    background: var(--text-color);
}

.h-children {
    display: flex;
    gap: 2rem;
    position: relative;
}

.h-children .h-node::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    width: 2px;
    height: 15px;
    background: var(--text-color);
}

/* Components */
.danger {
    color: #ff5555;
}

.section-number {
    font-size: 12rem;
    font-weight: 700;
    position: absolute;
    right: 0;
    bottom: 0;
    opacity: 0.05;
    color: white;
    line-height: 1;
}

/* Controls */
.controls {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    z-index: 10;
    background: rgba(26, 11, 46, 0.9);
    padding: 0.8rem 2rem;
    border: 1px solid var(--primary-color);
    border-radius: 50px;
    box-shadow: 0 0 20px rgba(118, 74, 188, 0.4);
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--secondary-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    color: white;
    transform: scale(1.2);
}

.progress-container {
    width: 300px;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.3s ease;
}

.slide-number {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    font-family: var(--font-mono);
    color: var(--secondary-color);
    font-size: 1.2rem;
    background: rgba(26, 11, 46, 0.8);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--secondary-color);
}

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

    h2 {
        font-size: 2rem;
    }

    p,
    ul {
        font-size: 1.1rem;
    }

    .hierarchy-node {
        padding: 1.5rem;
        width: 95%;
    }

    .progress-container {
        width: 100px;
    }
}