/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    cursor: none;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0b0b0f;
    color: #e5e5e5;
    overflow: hidden;
}

body.loaded #home {
    opacity: 1;
    transform: translateY(0);
}

/* Home Section */
#home {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

/* Background Video */
#bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: -3;
    filter: brightness(0.15);
}

/* Custom Cursor */
.cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    pointer-events: none;
    background: rgba(122, 162, 255, 0.6);
    box-shadow: 0 0 20px rgba(122, 162, 255, 0.8);
    transform: translate(-50%, -50%);
    z-index: 9999;
    transition: width 0.08s ease, height 0.08s ease, box-shadow 0.08s ease;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 10;
    perspective: 1000px;
}

/* Sections */
section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Home Content */
.home-content {
    transform: translateY(-200px);
}

.home-content h1 {
    font-size: 3.5rem;
    letter-spacing: 3px;
    position: relative;
    display: inline-block;
}

/* Glitch effect */
.glitch {
    position: relative;
    animation: flicker 3s infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.glitch::before {
    color: #ff3333;
    z-index: -1;
}

.glitch::after {
    color: #3333ff;
    z-index: -1;
}

.glitch:hover::before {
    opacity: 0.8;
    animation: glitch-r 0.3s infinite;
}

.glitch:hover::after {
    opacity: 0.8;
    animation: glitch-b 0.3s infinite;
}

.glitch.beat-glitch::before {
    opacity: 0.8;
    animation: glitch-r 0.15s infinite;
}

.glitch.beat-glitch::after {
    opacity: 0.8;
    animation: glitch-b 0.15s infinite;
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

@keyframes glitch-r {
    0% { transform: translate(0); }
    20% { transform: translate(-3px, 2px); }
    40% { transform: translate(3px, -2px); }
    60% { transform: translate(-2px, -1px); }
    80% { transform: translate(2px, 1px); }
    100% { transform: translate(0); }
}

@keyframes glitch-b {
    0% { transform: translate(0); }
    20% { transform: translate(3px, -2px); }
    40% { transform: translate(-3px, 2px); }
    60% { transform: translate(2px, 1px); }
    80% { transform: translate(-2px, -1px); }
    100% { transform: translate(0); }
}

/* Typing Intro */
.typing-subtitle {
    font-size: 1.1rem;
    color: #8a96b8;
    margin-top: 10px;
    height: 1.5em;
    font-family: 'Consolas', 'Courier New', monospace;
    letter-spacing: 1px;
}

.typing-subtitle .typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    background: #7aa2ff;
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: blink-cursor 0.7s step-end infinite;
}

@keyframes blink-cursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Links */
.links {
    margin-top: 25px;
    perspective: 1000px;
}

.links a {
    display: inline-block;
    margin: 0 10px;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    color: #fff;
    text-decoration: none;
    transition: transform 0.5s;
    transform-style: preserve-3d;
    position: relative;
    background: linear-gradient(#7aa2ff, #5a80cc);
    text-shadow: 0 6px 10px rgba(0,0,0,0.6);
    transform: rotateX(70deg) rotateZ(30deg);
    letter-spacing: 3px;
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 600;
}

.links a::before {
    content: "";
    width: 100%;
    height: 12px;
    background-color: #4a6dad;
    position: absolute;
    bottom: 0;
    right: 0;
    transform: rotateX(90deg);
    transform-origin: bottom;
}

.links a::after {
    content: "";
    width: 12px;
    height: 100%;
    background-color: #8bb4ff;
    position: absolute;
    top: 0;
    right: 0;
    transform: rotateY(-90deg);
    transform-origin: right;
}

.links a:hover {
    transform: rotateX(30deg) rotateZ(0);
}

/* Loader */
#loader {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, #1a1a24 0, #050509 60%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 10000;
}

.loader-ring {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid rgba(122, 162, 255, 0.2);
    border-top-color: #7aa2ff;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 20px rgba(122, 162, 255, 0.6);
}

.loader-text {
    margin-top: 18px;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #b5b5ff;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader-fade-out {
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
}

/* Volume Controls */
#volume-slider {
    width: 120px;
    cursor: pointer;
}

/* 3D Nav Buttons */
.nav-ctrl-btn {
    position: relative;
    background: linear-gradient(#7aa2ff, #5a80cc);
    border: none;
    border-radius: 3px;
    color: #fff;
    padding: 5px 10px;
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    transition: transform 0.5s;
    transform-style: preserve-3d;
    text-shadow: 0 3px 6px rgba(0,0,0,0.5);
    transform: rotateX(70deg) rotateZ(30deg);
    letter-spacing: 1px;
}

.nav-ctrl-btn::before {
    content: "";
    width: 100%;
    height: 8px;
    background-color: #4a6dad;
    position: absolute;
    bottom: 0;
    right: 0;
    transform: rotateX(90deg);
    transform-origin: bottom;
}

.nav-ctrl-btn::after {
    content: "";
    width: 8px;
    height: 100%;
    background-color: #8bb4ff;
    position: absolute;
    top: 0;
    right: 0;
    transform: rotateY(-90deg);
    transform-origin: right;
}

.nav-ctrl-btn:hover {
    transform: rotateX(30deg) rotateZ(0);
}

/* Feedback button styling */
.feedback-btn {
    position: relative;
    background: linear-gradient(#7aa2ff, #5a80cc);
    border: none;
    border-radius: 3px;
    color: #fff;
    padding: 8px 14px;
    font-family: inherit;
    font-size: 0.8rem;
    cursor: pointer;
    transition: transform 0.5s;
    transform-style: preserve-3d;
    text-shadow: 0 4px 8px rgba(0,0,0,0.5);
    transform: rotateX(70deg) rotateZ(30deg);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
}

.feedback-btn::before {
    content: "";
    width: 100%;
    height: 10px;
    background-color: #4a6dad;
    position: absolute;
    bottom: 0;
    right: 0;
    transform: rotateX(90deg);
    transform-origin: bottom;
}

.feedback-btn::after {
    content: "";
    width: 10px;
    height: 100%;
    background-color: #8bb4ff;
    position: absolute;
    top: 0;
    right: 0;
    transform: rotateY(-90deg);
    transform-origin: right;
}

.feedback-btn:hover {
    transform: rotateX(30deg) rotateZ(0);
}

/* Discord Status Widget */
.discord-widget {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    border: 1px solid rgba(122, 162, 255, 0.3);
    border-radius: 30px;
    background: rgba(122, 162, 255, 0.08);
    transition: all 0.3s ease, transform 0.15s ease;
    text-decoration: none;
    color: #cbd5ff;
    font-size: 0.85rem;
    transform-style: preserve-3d;
    perspective: 500px;
}

.discord-widget:hover {
    border-color: #7aa2ff;
    background: rgba(122, 162, 255, 0.15);
    box-shadow: 0 0 12px rgba(122, 162, 255, 0.2);
}

.discord-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #3ba55d;
    box-shadow: 0 0 8px #3ba55d;
    animation: pulse-dot 2s ease infinite;
}

.discord-dot.dnd {
    background: #ed4245;
    box-shadow: 0 0 8px #ed4245;
}

.discord-dot.idle {
    background: #faa61a;
    box-shadow: 0 0 8px #faa61a;
}

.discord-dot.offline {
    background: #747f8d;
    box-shadow: 0 0 8px #747f8d;
    animation: none;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.3); }
}

.discord-count {
    font-weight: 600;
    color: #7aa2ff;
}

.discord-label {
    color: #8a96b8;
}

/* Bottom Status Bar */
.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 30px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(122, 162, 255, 0.15);
    z-index: 10;
    font-size: 0.75rem;
    color: #8a96b8;
}

.bar-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.bar-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.bar-item .bar-num {
    font-weight: 600;
    color: #7aa2ff;
    font-variant-numeric: tabular-nums;
}

.bar-item .online-dot {
    color: #3ba55d;
    font-size: 0.5rem;
    animation: pulse-dot 2s ease infinite;
}

.bar-sep {
    width: 1px;
    height: 14px;
    background: rgba(122, 162, 255, 0.2);
}

/* Page Transition Overlay */
.page-transition {
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    opacity: 0;
}

.page-transition.active {
    pointer-events: all;
}

.page-transition canvas {
    width: 100%;
    height: 100%;
}

/* Notification Toast */
.toast-container {
    position: fixed;
    top: 80px;
    right: 30px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: rgba(10, 12, 20, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(122, 162, 255, 0.25);
    border-radius: 10px;
    font-size: 0.8rem;
    color: #cbd5ff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    animation: toast-in 0.4s ease, toast-out 0.4s ease 4.6s forwards;
    white-space: nowrap;
}

.toast-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3ba55d;
    box-shadow: 0 0 6px #3ba55d;
    flex-shrink: 0;
}

.toast-text strong {
    color: #7aa2ff;
}

@keyframes toast-in {
    from { transform: translateX(100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toast-out {
    from { opacity: 1; }
    to { opacity: 0; transform: translateY(-10px); }
}

/* Audio Waveform Visualizer */
.nav-visualizer {
    display: flex;
    align-items: center;
    height: 28px;
    gap: 2px;
}

.nav-visualizer canvas {
    height: 28px;
    width: 80px;
}

/* Decrypt text effect */
.decrypt-char {
    display: inline-block;
    min-width: 0.3em;
}

/* Chat Wall */
.chat-input-container {
    position: fixed;
    bottom: 45px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 11;
    display: flex;
    gap: 8px;
    opacity: 0.4;
    transition: opacity 0.3s;
    perspective: 1000px;
}

.chat-input-container:hover,
.chat-input-container:focus-within {
    opacity: 1;
}

.chat-input {
    background: rgba(10, 12, 20, 0.8);
    border: 1px solid rgba(122, 162, 255, 0.3);
    border-radius: 20px;
    padding: 6px 16px;
    color: #cbd5ff;
    font-family: inherit;
    font-size: 0.8rem;
    outline: none;
    width: 240px;
    backdrop-filter: blur(8px);
    cursor: text;
}

.chat-input:focus {
    border-color: #7aa2ff;
    box-shadow: 0 0 10px rgba(122, 162, 255, 0.15);
}

.chat-input::placeholder {
    color: #5a6480;
}

.chat-send {
    position: relative;
    background: linear-gradient(#7aa2ff, #5a80cc);
    border: none;
    border-radius: 3px;
    padding: 8px 16px;
    color: #fff;
    font-family: inherit;
    font-size: 0.8rem;
    cursor: pointer;
    transition: transform 0.5s;
    transform-style: preserve-3d;
    text-shadow: 0 3px 6px rgba(0,0,0,0.5);
    transform: rotateX(70deg) rotateZ(30deg);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
}

.chat-send::before {
    content: "";
    width: 100%;
    height: 8px;
    background-color: #4a6dad;
    position: absolute;
    bottom: 0;
    right: 0;
    transform: rotateX(90deg);
    transform-origin: bottom;
}

.chat-send::after {
    content: "";
    width: 8px;
    height: 100%;
    background-color: #8bb4ff;
    position: absolute;
    top: 0;
    right: 0;
    transform: rotateY(-90deg);
    transform-origin: right;
}

.chat-send:hover {
    transform: rotateX(30deg) rotateZ(0);
}

.chat-bubble {
    position: fixed;
    white-space: nowrap;
    font-size: 0.9rem;
    color: rgba(200, 215, 255, 0.7);
    text-shadow: 0 0 8px rgba(122, 162, 255, 0.3);
    pointer-events: none;
    z-index: 5;
    font-family: 'Segoe UI', sans-serif;
}

/* Key hints */
.key-hints {
    position: fixed;
    bottom: 75px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.55rem;
    color: rgba(138, 150, 184, 0.2);
    z-index: 5;
    pointer-events: none;
    letter-spacing: 1px;
    white-space: nowrap;
}

/* Boss Key Overlay */
.boss-overlay { display:none; position:fixed; inset:0; z-index:99999; background:#fff; font-family:Calibri,sans-serif; color:#333; overflow:auto; cursor:default; }
.boss-overlay.active { display:block; }
.boss-toolbar { background:#217346; padding:4px 12px; display:flex; gap:10px; color:white; font-size:12px; align-items:center; }
.boss-formula { background:#f1f1f1; border-bottom:1px solid #d4d4d4; padding:3px 8px; font-size:12px; display:flex; gap:8px; align-items:center; }
.boss-table { border-collapse:collapse; width:100%; font-size:12px; }
.boss-table th { background:#f1f1f1; border:1px solid #d4d4d4; padding:2px 20px; font-weight:normal; text-align:center; position:sticky; top:0; }
.boss-table td { border:1px solid #e0e0e0; padding:2px 8px; min-width:80px; height:20px; }
.boss-table td:first-child { background:#f8f8f8; text-align:center; width:30px; min-width:30px; color:#666; }
.boss-table .selected { background:#d6e4f0; outline:2px solid #217346; }

/* DJ Mode Overlay */
.dj-overlay { display:none; position:fixed; inset:0; z-index:9998; background:rgba(0,0,0,0.88); backdrop-filter:blur(12px); flex-direction:column; align-items:center; justify-content:center; gap:25px; }
.dj-overlay.active { display:flex; }
.dj-disc { width:180px; height:180px; border-radius:50%; background:radial-gradient(circle,#333 20%,#111 21%,#222 50%,#111 80%,#333 100%); border:3px solid #7aa2ff; box-shadow:0 0 40px rgba(122,162,255,0.3); cursor:grab; position:relative; }
.dj-disc::after { content:''; position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); width:18px; height:18px; background:#7aa2ff; border-radius:50%; box-shadow:0 0 10px #7aa2ff; }
.dj-disc.spinning { animation:disc-spin 2s linear infinite; }
@keyframes disc-spin { to { transform:rotate(360deg); } }
.dj-controls { display:flex; gap:30px; }
.dj-ctrl { display:flex; flex-direction:column; align-items:center; gap:6px; color:#8a96b8; font-size:0.7rem; }
.dj-ctrl input[type="range"] { width:110px; cursor:pointer; }
.dj-val { color:#7aa2ff; font-weight:600; font-size:0.75rem; }

/* Time Bomb */
.bomb-display { display:none; position:fixed; inset:0; z-index:9997; align-items:center; justify-content:center; pointer-events:none; }
.bomb-display.active { display:flex; }
.bomb-number { font-size:14rem; font-weight:900; color:#ff3333; text-shadow:0 0 60px rgba(255,50,50,0.8),0 0 120px rgba(255,50,50,0.4); animation:bomb-pulse 1s ease infinite; }
@keyframes bomb-pulse { 0%,100% { transform:scale(1); } 50% { transform:scale(1.08); } }

/* Voice Indicator */
.voice-indicator { position:fixed; top:60px; left:20px; z-index:100; display:none; align-items:center; gap:6px; padding:6px 12px; background:rgba(10,12,20,0.8); border:1px solid rgba(255,80,80,0.4); border-radius:20px; font-size:0.7rem; color:#ff6666; backdrop-filter:blur(8px); }
.voice-indicator.active { display:flex; }
.voice-dot { width:8px; height:8px; border-radius:50%; background:#ff4444; box-shadow:0 0 8px #ff4444; animation:pulse-dot 1s ease infinite; }

/* Multiplayer Cursors */
.multi-cursor { position:fixed; width:12px; height:12px; border-radius:50%; pointer-events:none; z-index:9990; transition:left 0.4s linear,top 0.4s linear; }
.multi-cursor::after { content:'visitor'; position:absolute; top:14px; left:6px; font-size:0.55rem; color:inherit; white-space:nowrap; opacity:0.6; }

/* Destruction Canvas */
.destruction-canvas { position:fixed; inset:0; z-index:9996; pointer-events:none; display:none; }
.destruction-canvas.active { display:block; pointer-events:all; cursor:crosshair; }
