:root {
    /* Primary Gradients */
    --gradient-main: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-architecture: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);

    /* Core Colors */
    --color-primary: #667eea;
    --color-secondary: #764ba2;
    --color-dark: #343a40;
    --color-text: #333;
    --color-white: #ffffff;

    /* UI Backgrounds */
    --color-light-bg: #f8f9fa;
    --color-border-light: #e9ecef;
    --color-highlight-bg: #fff3cd;

    /* Code Block Colors */
    --code-bg: #282c34;
    --code-text: #abb2bf;
    --code-keyword: #c678dd;
    --code-type: #e5c07b;
    --code-function: #61afef;
    --code-string: #98c379;
    --code-comment: #5c6370;

    /* Accent Colors */
    --color-success: #28a745;

    /* Shadows */
    --shadow-main: 0 20px 60px rgba(0, 0, 0, 0.3);
    --shadow-btn: 0 5px 15px rgba(102, 126, 234, 0.3);
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
}

/* BODY */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--gradient-main);
    color: var(--color-text);
    line-height: 1.6;
    padding: 20px;
}

/* CONTAINER */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--color-white);
    border-radius: 20px;
    box-shadow: var(--shadow-main);
    overflow: hidden;
}

/* HEADER */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: var(--color-white);
    padding: 40px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Animated background particles */
header::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: particles 20s linear infinite;
    opacity: 0.3;
}

@keyframes particles {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(50px, 50px);
    }
}

/* Glowing orbs */
header::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent);
    border-radius: 50%;
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-30px);
    }
}

header h1 {
    font-size: 3.2em;
    margin-bottom: 15px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
    font-weight: 700;
    letter-spacing: -1px;
    animation: fadeInUp 0.8s ease-out;
}

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

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

header h1::before {
    content: '🚀';
    display: inline-block;
    margin-right: 15px;
    animation: rocket 2s ease-in-out infinite;
}

@keyframes rocket {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

header p {
    font-size: 1.3em;
    opacity: 0.95;
    position: relative;
    z-index: 1;
    font-weight: 300;
    letter-spacing: 0.5px;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.github-btn {
    padding: 16px 32px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    text-decoration: none;
    margin-top: 35px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.github-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.github-btn:hover::before {
    left: 100%;
}

.github-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.github-btn:active {
    transform: translateY(-1px);
}

.github-btn img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
    transition: transform 0.3s;
}

.github-btn:hover img {
    transform: rotate(360deg);
}

/* Responsive */
@media (max-width: 768px) {
    header {
        padding: 60px 20px;
    }

    header h1 {
        font-size: 2.2em;
    }

    header p {
        font-size: 1.1em;
    }

    .github-btn {
        padding: 14px 28px;
        font-size: 0.95em;
    }
}

/* NAV */
.nav {
    background: var(--color-light-bg);
    padding: 20px;
    border-bottom: 2px solid var(--color-border-light);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.nav-btn {
    padding: 10px 20px;
    background: var(--color-white);
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.nav-btn:hover,
.nav-btn.active {
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-btn);
}

/* CONTENT */
.content {
    padding: 40px;
}

/* FILE SECTIONS */
.file-section {
    display: none;
    animation: fadeIn 0.5s;
}

.file-section.active {
    display: block;
}

/* ANIMATION */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* HEADINGS */
h2 {
    color: var(--color-primary);
    margin-bottom: 20px;
    font-size: 2em;
    border-left: 5px solid var(--color-secondary);
    padding-left: 15px;
}

h3 {
    color: var(--color-secondary);
    margin-bottom: 15px;
    font-size: 1.5em;
}

/* CODE BLOCK */
.code-block {
    background: var(--code-bg);
    color: var(--code-text);
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 15px 0;
    border-left: 4px solid var(--color-primary);
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.5;
}

.keyword {
    color: var(--code-keyword);
}

.type {
    color: var(--code-type);
}

.function {
    color: var(--code-function);
}

.string {
    color: var(--code-string);
}

.comment {
    color: var(--code-comment);
    font-style: italic;
}

/* EXPLANATION */
.explanation {
    background: var(--color-light-bg);
    padding: 20px;
    border-radius: 10px;
    margin: 15px 0;
    border-left: 4px solid var(--color-success);
}

.explanation h4 {
    color: var(--color-success);
    margin-bottom: 10px;
}

.highlight {
    background: var(--color-highlight-bg);
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
}

/* ARCHITECTURE */
.architecture {
    background: var(--gradient-architecture);
    color: var(--color-white);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

/* FLOW DIAGRAM */
.flow-diagram {
    background: var(--color-white);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: center;
}

.flow-box {
    display: inline-block;
    background: var(--color-primary);
    color: var(--color-white);
    padding: 15px 25px;
    margin: 10px;
    border-radius: 10px;
    font-weight: 600;
}

.arrow {
    color: var(--color-primary);
    font-size: 2em;
    display: block;
}

/* LISTS */
ul {
    margin-left: 20px;
    margin-top: 10px;
}

li {
    margin: 8px 0;
}

/* FEATURE GRID */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.feature-card {
    background: var(--gradient-main);
    color: var(--color-white);
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--shadow-card);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card h4 {
    margin-bottom: 10px;
    font-size: 1.3em;
}

/* FOOTER */
footer {
    background: var(--color-dark);
    color: var(--color-white);
    text-align: center;
    padding: 20px;
}