:root {
    /* Neon Reaper Design System Tokens */
    --color-bg-primary: #020b14;
    /* Deep Midnight Blue */
    --color-bg-secondary: #051423;
    /* Darker Blue */
    --color-bg-tertiary: rgba(5, 20, 35, 0.8);
    /* Glassy Dark */

    --color-text-primary: #e0f2f1;
    /* Pale Cyan/White */
    --color-text-secondary: #80cbc4;
    /* Muted Cyan */

    --color-accent-primary: #00e676;
    /* Neon Emerald Green (Hatebreeder) */
    --color-accent-secondary: #00b0ff;
    /* Electric Blue (Reaper) */
    --color-accent-tertiary: #69f0ae;
    /* Light Green */

    --color-border: #1a237e;
    /* Deep Indigo Border */

    --font-heading: 'Cinzel', serif;
    /* Classical/Roman */
    --font-body: 'Lato', sans-serif;
    /* Clean/Modern */
    --font-mono: 'Cousine', monospace;

    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;

    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 15px rgba(0, 230, 118, 0.4);
    /* Green Glow */
    --shadow-glow-blue: 0 0 15px rgba(0, 176, 255, 0.4);
    /* Blue Glow */

    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;

    --glass-bg: rgba(2, 11, 20, 0.7);
    --glass-border: 1px solid rgba(0, 230, 118, 0.2);
    --glass-blur: blur(10px);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-primary);
    background-image:
        radial-gradient(circle at 10% 20%, rgba(0, 230, 118, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(0, 176, 255, 0.05) 0%, transparent 20%);
    color: var(--color-text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--color-text-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 230, 118, 0.3);
}

h1 {
    font-size: 4rem;
    margin-bottom: var(--spacing-md);
    color: var(--color-accent-primary);
}

h2 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-primary);
    border-bottom: 2px solid var(--color-accent-primary);
    display: inline-block;
    padding-bottom: 0.5rem;
    box-shadow: 0 2px 10px rgba(0, 230, 118, 0.2);
}

h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--color-accent-secondary);
}

p {
    margin-bottom: var(--spacing-md);
    color: var(--color-text-secondary);
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.section {
    padding: var(--spacing-xl) 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.alt-bg {
    background-color: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    background: rgba(2, 11, 20, 0.85);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--color-accent-primary);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-text-primary);
    font-weight: bold;
    text-shadow: 0 0 10px var(--color-accent-primary);
}

.text-gold {
    color: var(--color-accent-primary);
}

/* Kept class name but mapped to green */

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
}

.nav-links a {
    color: var(--color-text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-fast);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links a:hover {
    color: var(--color-accent-primary);
    text-shadow: 0 0 8px var(--color-accent-primary);
}

/* Hero Section */
.hero {
    height: 100vh;
    background: url('https://images.unsplash.com/photo-1534796636912-3b95b3ab5986?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80') no-repeat center center/cover;
    /* Starry Night / Nebula */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    margin-top: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(2, 11, 20, 0.6), var(--color-bg-primary));
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: var(--spacing-lg);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: 8px;
    box-shadow: var(--shadow-glow);
}

.highlight {
    color: var(--color-accent-primary);
    text-shadow: 0 0 20px var(--color-accent-primary);
}

/* Components: Buttons */
.cta-button,
.submit-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: transparent;
    color: var(--color-accent-primary);
    text-decoration: none;
    font-weight: bold;
    border: 2px solid var(--color-accent-primary);
    transition: var(--transition-normal);
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 2px;
    letter-spacing: 1px;
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.1);
}

.cta-button:hover,
.submit-button:hover {
    background: var(--color-accent-primary);
    color: var(--color-bg-primary);
    box-shadow: var(--shadow-glow);
}

/* Components: Cards */
.steps-grid,
.scrolls-grid,
.lab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.step-card,
.scroll-card,
.lab-card {
    background: var(--glass-bg);
    padding: var(--spacing-lg);
    border: 1px solid rgba(0, 176, 255, 0.2);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(5px);
}

.step-card:hover,
.scroll-card:hover,
.lab-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-accent-primary);
    box-shadow: var(--shadow-glow);
}

.step-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--color-accent-secondary), var(--color-accent-primary));
}

/* Drone Station */
.drone-controls {
    background: var(--glass-bg);
    padding: var(--spacing-lg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(5px);
}

.tuning-selector {
    margin-bottom: var(--spacing-lg);
}

.tuning-select {
    padding: 0.5rem 1rem;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    border: 1px solid var(--color-accent-secondary);
    border-radius: 4px;
    color: var(--color-text-primary);
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.drone-display {
    background: rgba(0, 0, 0, 0.6);
    color: var(--color-accent-primary);
    font-family: var(--font-mono);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    border: 1px solid var(--color-accent-primary);
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    border-radius: 4px;
    box-shadow: inset 0 0 10px rgba(0, 230, 118, 0.2);
}

.drone-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    justify-content: center;
    margin-bottom: var(--spacing-lg);
}

.drone-btn {
    padding: 1rem;
    background: rgba(0, 176, 255, 0.1);
    color: var(--color-text-primary);
    border: 1px solid var(--color-accent-secondary);
    cursor: pointer;
    font-family: var(--font-heading);
    transition: var(--transition-fast);
    min-width: 150px;
    border-radius: 4px;
}

.drone-btn:hover {
    background: var(--color-accent-secondary);
    color: var(--color-bg-primary);
    box-shadow: var(--shadow-glow-blue);
}

.drone-btn.active {
    background: var(--color-accent-primary);
    color: var(--color-bg-primary);
    border-color: var(--color-accent-primary);
    box-shadow: var(--shadow-glow);
}

.stop-btn {
    background: transparent;
    border-color: #ff5252;
    color: #ff5252;
}

.stop-btn:hover {
    background: #ff5252;
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 82, 82, 0.4);
}

/* The Oracle (Wisdom Engine) */
.oracle-box {
    text-align: center;
    padding: var(--spacing-xl);
    background: linear-gradient(135deg, rgba(2, 11, 20, 0.9) 0%, rgba(5, 20, 35, 0.9) 100%);
    border: 1px solid var(--color-accent-primary);
    margin-top: var(--spacing-lg);
    border-radius: 8px;
    box-shadow: var(--shadow-glow);
    position: relative;
    overflow: hidden;
}

.oracle-box::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 230, 118, 0.05) 0%, transparent 70%);
    animation: pulse 10s infinite;
    pointer-events: none;
}

#oracle-text {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    font-style: italic;
    margin-bottom: var(--spacing-lg);
    min-height: 3rem;
    color: var(--color-text-primary);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

/* Daily Ritual */
.ritual-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.ritual-item {
    display: flex;
    align-items: center;
    background: var(--glass-bg);
    padding: var(--spacing-md);
    border-left: 4px solid var(--color-accent-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-card);
    border-radius: 0 4px 4px 0;
}

.ritual-item:hover {
    background: rgba(0, 176, 255, 0.1);
    border-left-color: var(--color-accent-primary);
    padding-left: 1.5rem;
    box-shadow: var(--shadow-glow-blue);
}

.ritual-item .time {
    font-family: var(--font-mono);
    color: var(--color-accent-primary);
    font-weight: bold;
    margin-right: var(--spacing-lg);
    min-width: 100px;
}

.ritual-item h4 {
    margin: 0;
    color: var(--color-text-primary);
    font-size: 1.1rem;
}

.ritual-item p {
    margin: 0;
    font-size: 0.9rem;
}

/* The Armory (Tabs) */
.tabs-container {
    margin-top: var(--spacing-lg);
    border: 1px solid var(--color-border);
    background: var(--glass-bg);
    border-radius: 8px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.tabs-nav {
    display: flex;
    border-bottom: 1px solid var(--color-border);
    background: rgba(0, 0, 0, 0.3);
    overflow-x: auto;
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition-fast);
    border-right: 1px solid var(--color-border);
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--color-accent-primary);
    background: rgba(0, 230, 118, 0.05);
    text-shadow: 0 0 5px var(--color-accent-primary);
}

.tab-btn.active {
    color: var(--color-accent-primary);
    background: rgba(0, 230, 118, 0.1);
    box-shadow: inset 0 3px 0 var(--color-accent-primary);
}

.tab-content {
    display: none;
    padding: var(--spacing-lg);
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

.code-block {
    background: rgba(0, 0, 0, 0.8);
    padding: var(--spacing-md);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-accent-primary);
    display: inline-block;
    margin-bottom: var(--spacing-md);
    text-align: left;
    max-width: 100%;
    overflow-x: auto;
    border-radius: 4px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.code-block pre {
    font-family: var(--font-mono);
    color: var(--color-accent-tertiary);
    font-size: 0.9rem;
}

/* Fretboard Visual */
.fretboard-visual {
    display: inline-block;
    background: rgba(0, 0, 0, 0.9);
    padding: var(--spacing-md);
    border: 1px solid var(--color-border);
    margin-bottom: var(--spacing-md);
    font-family: monospace;
    overflow-x: auto;
    border-radius: 4px;
    box-shadow: var(--shadow-card);
}

.string {
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--color-text-secondary);
    padding: 0.2rem 0;
}

.note {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    border-radius: 50%;
    background: var(--color-bg-secondary);
    color: var(--color-text-secondary);
    font-size: 0.8rem;
    margin: 0 2px;
    cursor: pointer;
    transition: transform 0.1s;
    border: 1px solid var(--color-text-secondary);
}

.note:active {
    transform: scale(0.9);
}

.note.root {
    background: var(--color-accent-primary);
    color: var(--color-bg-primary);
    box-shadow: 0 0 10px var(--color-accent-primary);
    border-color: var(--color-accent-primary);
}

/* Academy (Zen Dojo) Styles */
.scroll-card {
    background: var(--glass-bg);
    border-color: var(--color-accent-secondary);
}

.scroll-card h3 {
    color: var(--color-accent-secondary);
}

.scroll-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
    color: var(--color-accent-primary);
    text-shadow: 0 0 10px var(--color-accent-primary);
}

/* Science Lab Styles */
.lab-card {
    background: var(--glass-bg);
    border-color: var(--color-accent-primary);
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.1);
}

.lab-card h3 {
    color: var(--color-accent-primary);
}

.string-line {
    height: 2px;
    background: var(--color-text-secondary);
    position: relative;
    margin: 3rem 0;
}

.node-point {
    position: absolute;
    top: -10px;
    width: 20px;
    height: 20px;
    background: var(--color-accent-primary);
    border-radius: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-bg-primary);
    box-shadow: 0 0 10px var(--color-accent-primary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    overflow-y: auto;
}

.modal-content {
    background-color: var(--color-bg-secondary);
    color: var(--color-text-primary);
    margin: 5% auto;
    padding: var(--spacing-xl);
    border: 1px solid var(--color-accent-primary);
    width: 90%;
    max-width: 800px;
    font-family: var(--font-heading);
    position: relative;
    box-shadow: var(--shadow-glow);
    border-radius: 8px;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--color-text-secondary);
}

.close-modal:hover {
    color: var(--color-accent-primary);
    text-shadow: 0 0 10px var(--color-accent-primary);
}

/* Contact Form */
.contact-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.contact-form input {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    border-radius: 4px;
}

.contact-form input:focus {
    outline: none;
    border-color: var(--color-accent-primary);
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.2);
}

footer {
    text-align: center;
    padding: var(--spacing-lg);
    background: var(--color-bg-secondary);
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--color-border);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 0.5;
    }
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
    }

    .navbar {
        justify-content: center;
    }

    .logo {
        font-size: 1.2rem;
    }
}

/* Metronome and Tuner Styles */
.metronome-controls, .tuner-controls {
    margin-top: var(--spacing-lg);
    text-align: center;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: 8px;
    padding: var(--spacing-lg);
}

.metronome-display, .tuner-display {
    margin-bottom: var(--spacing-md);
}

#tempo, #tuner-note {
    font-size: 1.5rem;
    color: var(--color-accent-primary);
    margin-right: var(--spacing-md);
}

#tempo-slider {
    width: 100%;
    max-width: 300px;
}

#tuner-select {
    margin-top: var(--spacing-md);
    padding: 0.5rem;
    background: var(--color-bg-tertiary);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
    border-radius: 4px;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--color-accent-primary);
    color: var(--color-bg-primary);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    transition: var(--transition-fast);
    z-index: 1000;
}

.back-to-top:hover {
    background: var(--color-accent-secondary);
}