:root {
    --bg-color: #050000;
    --card-bg: rgba(20, 0, 0, 0.4);
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --accent-red: #ff0033;
    --dark-red: #660011;
    --glass-border: 1px solid rgba(255, 0, 51, 0.2);
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --nav-height: 100px;
    /* Increased to lower the nav */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    overflow: hidden;
    /* No scrolling for SPA feel */
    height: 100vh;
    width: 100vw;
}

/* Backgrounds */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMDAiIGhlaWdodD0iMjAwIj48ZmlsdGVyIGlkPSJmIj48ZmVUdXJYdWxlbmNlIHR5cGU9ImZyYWN0YWxOb2lzZSIgYmFzZUZyZXF1ZW5jeT0iMC42NSIgbnVtT2N0YXZlcz0iMyIgc3RpdGNoVGlsZXM9InN0aXRjaCIvPjwvZmlsdGVyPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbHRlcj0idXJsKCNmKSIgb3BhY2l0eT0iMC4wNSIvPjwvc3ZnPg==');
    pointer-events: none;
    z-index: -1;
    opacity: 0.4;
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(255, 0, 50, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 0, 50, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -2;
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
}

.red-glow-1,
.red-glow-2 {
    position: fixed;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 0, 51, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -3;
    pointer-events: none;
    animation: float 10s infinite ease-in-out;
}

.red-glow-1 {
    top: -200px;
    left: -100px;
}

.red-glow-2 {
    bottom: -200px;
    right: -100px;
    animation-delay: 5s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, -30px);
    }
}

/* Nav - Lowered */
.glass-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    position: fixed;
    top: 40px;
    /* Lowered position */
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    height: 60px;
    background: rgba(5, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border: var(--glass-border);
    border-radius: 30px;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--accent-red);
    text-shadow: 0 0 10px rgba(255, 0, 51, 0.5);
}

nav .nav-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0 1rem;
    cursor: pointer;
    font-family: var(--font-main);
    font-weight: 500;
    transition: all 0.3s;
}

nav .nav-btn:hover,
nav .nav-btn.active {
    color: var(--accent-red);
    text-shadow: 0 0 8px rgba(255, 0, 51, 0.4);
}

/* Book Container Main */
.book-container {
    position: relative;
    width: 100%;
    height: 100vh;
    padding-top: var(--nav-height);
    perspective: 1000px;
}

/* Page Transitions */
.page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding-top: 120px;
    /* Space for nav */
    padding-bottom: 2rem;
    overflow-y: auto;
    /* Allow internal scroll if content is long */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.page.active {
    opacity: 1;
    pointer-events: all;
    z-index: 10;
}

.page-title {
    font-size: 3rem;
    margin-bottom: 2rem;
    font-family: var(--font-heading);
    background: linear-gradient(to right, #fff, #999);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}


/* Hero (Restored) */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    max-width: 1200px;
    padding: 0 2rem;
}

.hero-text {
    text-align: center;
    margin-bottom: 3rem;
}

.glitch {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 5rem;
    color: white;
    text-transform: uppercase;
    position: relative;
    letter-spacing: 2px;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 red;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 blue;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(10px, 9999px, 30px, 0);
    }

    100% {
        clip: rect(80px, 9999px, 100px, 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(90px, 9999px, 100px, 0);
    }

    100% {
        clip: rect(5px, 9999px, 40px, 0);
    }
}

.subtitle {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.highlight {
    color: var(--accent-red);
    text-shadow: 0 0 10px rgba(255, 0, 51, 0.4);
}

.typing-container {
    font-family: monospace;
    font-size: 1.2rem;
    min-height: 1.5rem;
    margin-bottom: 1.5rem;
}

.cursor {
    width: 2px;
    background: var(--accent-red);
    animation: blink 1s infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

/* Content Grids for Other Pages */
.content-grid {
    display: grid;
    gap: 2rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.about-layout {
    grid-template-columns: 300px 1fr;
    gap: 2rem;
}

@media (max-width: 900px) {
    .about-layout {
        grid-template-columns: 1fr;
    }
    
    .music-main-content {
        flex-direction: column;
    }
    
    .playlist-sidebar {
        width: 100%;
    }
}

.skills-layout {
    grid-template-columns: 2fr 1fr;
    align-items: start;
}

.grid-col {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.grid-col-wide {
    width: 100%;
}

@media (max-width: 900px) {
    .skills-layout {
        grid-template-columns: 1fr;
    }
}

/* Widgets */
.widget {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s;
}

.widget:hover {
    transform: translateY(-5px);
    border-color: var(--accent-red);
}

.widget-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.widget-header i {
    color: var(--accent-red);
}

/* Widget Specifics */
.bio-widget {
    text-align: center;
}

.mini-stats {
    display: flex;
    justify-content: space-around;
    margin: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 0;
}

.stat-label {
    font-size: 0.7rem;
    color: #888;
}

.stat-value {
    font-weight: 700;
    color: var(--accent-red);
}

.role-desc {
    margin-top: 1rem;
    color: #888;
    font-size: 0.9rem;
}

.time-widget {
    text-align: center;
}

.clock {
    font-size: 3rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: white;
}

.loc {
    color: var(--accent-red);
    font-family: monospace;
}

.visited-list-styled {
    list-style: none;
    text-align: left;
}

.visited-list-styled li {
    margin-bottom: 0.5rem;
    color: #ccc;
}

.visited-list-styled li i {
    color: var(--accent-red);
    margin-right: 0.5rem;
}

/* Music */
.music-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    margin-bottom: 1rem;
}

.album-art {
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--accent-red);
}

.spinning {
    animation: spin 4s infinite linear;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.music-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}

.music-controls button {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
}

.music-controls .main-play {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-red);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    box-shadow: 0 0 10px rgba(255, 0, 51, 0.5);
}

/* Quotes */
.q-text {
    font-style: italic;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.q-author {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: right;
}

.quote-progress {
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    width: 100%;
    margin-top: auto;
}

.progress-bar {
    height: 100%;
    background: var(--accent-red);
    width: 0%;
    transition: width 0.1s linear;
}

/* Music Player with Playlist */
.music-player-container {
    flex: 1;
}

.music-main-content {
    display: flex;
    gap: 2rem;
}

.music-player-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.album-art.large {
    width: 120px;
    height: 120px;
}

.playlist-sidebar {
    width: 250px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.playlist-header {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.playlist-tracks {
    list-style: none;
}

.playlist-tracks li {
    padding: 0.75rem;
    cursor: pointer;
    border-radius: 4px;
    margin-bottom: 0.25rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.playlist-tracks li:hover {
    background: rgba(255, 0, 51, 0.1);
}

.playlist-tracks li.active {
    background: rgba(255, 0, 51, 0.2);
    border-left: 3px solid var(--accent-red);
}

.playlist-tracks li .track-number {
    color: var(--text-secondary);
    font-size: 0.8rem;
    width: 20px;
}

.playlist-tracks li .track-name {
    flex: 1;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.playlist-tracks li.no-tracks {
    color: var(--text-secondary);
    font-style: italic;
    cursor: default;
}

.playlist-tracks li.no-tracks:hover {
    background: transparent;
}

/* Inspiration Page Layout */
.inspiration-layout {
    grid-template-columns: 1fr;
    max-width: 800px;
}

.grid-col-centered {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

.centered-widget {
    width: 100%;
    max-width: 500px;
    text-align: center;
}

/* Status */
.status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    font-family: monospace;
    margin-bottom: 0.8rem;
}

.bar-container {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 10px;
    border-radius: 3px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--accent-red);
    width: 30%;
    animation: loadBar 3s infinite ease-in-out;
}

/* Feed */
.terminal-feed {
    font-family: monospace;
    font-size: 0.8rem;
    color: #aaa;
}

.chk {
    color: #0f0;
}

/* Buttons & Pills */
.btn {
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: var(--font-main);
    transition: 0.3s;
}

.btn-primary {
    background: var(--accent-red);
    color: white;
    box-shadow: 0 0 15px rgba(255, 0, 51, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.skill-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.central-flex {
    display: flex;
    flex-wrap: wrap;
    justify-content: start;
    gap: 1rem;
}

.central-card {
    max-width: 500px;
    width: 100%;
    text-align: center;
    margin: 0 auto;
    padding: 3rem;
}

.card-icon {
    font-size: 2rem;
    color: var(--accent-red);
    margin-bottom: 1rem;
}

.discord-tag {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.footer-note {
    color: #888;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .glitch {
        font-size: 3rem;
    }

    .glass-nav {
        top: 20px;
        width: 95%;
    }

    .page {
        padding-top: 100px;
    }
}