:root {
    --purple-deep: #1a0b2e;
    --blue-electric: #00f2ff;
    --yellow-neon: #f9ff00;
    --purple-glow: rgba(138, 43, 226, 0.5);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

html {
    overflow-x: hidden;
    height: -webkit-fill-available;
}

body {
    background-color: var(--purple-deep);
    background-image: linear-gradient(rgba(26, 11, 46, 0.7), rgba(26, 11, 46, 0.7)), url('img/bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #fff;
    font-family: 'Rajdhani', sans-serif;
    overflow-x: hidden;
    overflow-y: auto; 
    min-height: 100vh;
    -webkit-overflow-scrolling: touch; 
}

body.no-scroll {
    overflow: hidden !important;
    height: 100vh !important;
    touch-action: none;
}

/* Glitch and Scanline Effects */
.glitch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1) 0px,
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 100;
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(18, 16, 16, 0) 50%,
        rgba(0, 0, 0, 0.25) 50%
    ),
    linear-gradient(
        90deg,
        rgba(255, 0, 0, 0.06),
        rgba(0, 255, 0, 0.02),
        rgba(0, 0, 255, 0.06)
    );
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    z-index: 101;
}

/* Premium Preloader Styles */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0512;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: clip-path 1.2s cubic-bezier(0.8, 0, 0.2, 1), opacity 0.8s ease;
}

.preloader.loaded {
    clip-path: circle(0% at 50% 50%);
    opacity: 0;
    pointer-events: none;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    transform: translateY(40px);
}

.logo-container {
    position: relative;
    width: 250px;
    height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-glow-backdrop {
    position: absolute;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(0, 242, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(20px);
    z-index: -1;
    animation: pulse-glow 4s infinite ease-in-out;
}

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

.havoc-o-svg {
    width: 220px;
    height: 220px;
    filter: drop-shadow(0 0 30px rgba(0, 242, 255, 0.6));
    animation: o-pulse 2s infinite ease-in-out;
    overflow: visible; /* Prevent boxy clipping of the glow */
}

.o-ring {
    fill: none;
    stroke: var(--blue-electric);
    stroke-width: 6;
    stroke-dasharray: 264;
    stroke-dashoffset: 264;
    stroke-linecap: round;
    animation: draw-ring 2s ease-out forwards;
}

.lightning-bolt-shape {
    fill: var(--yellow-neon); 
    stroke: rgba(0, 0, 0, 0.5);
    stroke-width: 1;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 15px var(--yellow-neon)) drop-shadow(0 0 30px rgba(249, 255, 0, 0.4));
    opacity: 0;
    transform-origin: center;
    transform: scale(0);
    animation: bolt-pop 0.4s 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, bolt-glow 1s infinite 0.7s;
}

@keyframes bolt-pop {
    0% { opacity: 0; transform: scale(0); }
    70% { opacity: 1; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

.logo-text {
    position: absolute;
    bottom: -30px;
    font-family: 'Orbitron', sans-serif;
    font-size: 3.8rem;
    font-weight: 900;
    letter-spacing: 15px;
    color: #fff;
    text-shadow: 0 0 25px var(--blue-electric);
    opacity: 0;
    transform: translateY(30px);
    display: flex;
    align-items: center;
    gap: 8px;
    animation: text-reveal 1s 1.5s ease-out forwards, text-glitch 3s infinite 2.5s;
}

.mini-o-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
}

.mini-o-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 12px var(--blue-electric));
    overflow: visible;
}

.mini-o-ring {
    fill: none;
    stroke: var(--blue-electric);
    stroke-width: 8;
}

.mini-bolt-shape {
    fill: var(--yellow-neon);
    stroke: rgba(0, 0, 0, 0.3);
    stroke-width: 2;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 5px var(--yellow-neon));
    opacity: 0;
    transform-origin: center;
    transform: scale(0);
    animation: bolt-pop 0.4s 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.loader-status {
    width: 350px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 0;
    animation: fadeInStatus 0.8s 1.8s ease-out forwards;
}

.status-text {
    font-size: 0.7rem;
    color: var(--blue-electric);
    letter-spacing: 3px;
    font-weight: 700;
    text-transform: uppercase;
}

.loading-bar {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.loading-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--blue-electric);
    box-shadow: 0 0 10px var(--blue-electric);
    animation: progress-fill 3s 2.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Preloader Animations */
@keyframes draw-ring {
    to { stroke-dashoffset: 0; }
}

@keyframes draw-bolt {
    to { stroke-dashoffset: 0; }
}

@keyframes o-pulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 20px var(--blue-electric)); }
    50% { transform: scale(1.05); filter: drop-shadow(0 0 35px var(--blue-electric)); }
}

@keyframes bolt-glow {
    0%, 100% { opacity: 1; filter: drop-shadow(0 0 10px var(--yellow-neon)); }
    50% { opacity: 0.7; filter: drop-shadow(0 0 20px var(--yellow-neon)); }
}

@keyframes text-reveal {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes text-glitch {
    0%, 100% { text-shadow: 0 0 20px var(--blue-electric); }
    92% { text-shadow: 0 0 20px var(--blue-electric); transform: translate(0); }
    94% { text-shadow: 2px 0 var(--yellow-neon), -2px 0 var(--blue-electric); transform: translate(2px, -1px); }
    96% { text-shadow: -2px 0 var(--yellow-neon), 2px 0 var(--blue-electric); transform: translate(-2px, 1px); }
    98% { text-shadow: 2px 0 var(--blue-electric); transform: translate(1px, -1px); }
}

@keyframes fadeInStatus {
    to { opacity: 1; }
}

@keyframes progress-fill {
    0% { width: 0%; }
    30% { width: 45%; }
    60% { width: 60%; }
    100% { width: 100%; }
}

@keyframes strike-flash {
    0% { background: #0a0512; }
    50% { background: rgba(255, 255, 255, 0.1); }
    100% { background: #0a0512; }
}

/* Navigation */
header {
    padding: 1.5rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.glass-nav {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8), 
                inset 0 0 15px rgba(0, 242, 255, 0.1);
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: 2px;
    color: #fff;
    text-shadow: 0 0 10px var(--blue-electric);
    text-decoration: none;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.logo span {
    color: var(--yellow-neon);
    text-shadow: 0 0 10px var(--yellow-neon);
}

/* Nav O Bolt */
.nav-o-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    min-width: 24px;
    vertical-align: middle;
    margin: 0 5px;
    position: relative;
}

.nav-o-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
    display: block;
}

.nav-o-ring {
    fill: none !important;
    stroke: var(--blue-electric);
    stroke-width: 10;
}

.nav-bolt-shape {
    fill: var(--yellow-neon);
    filter: drop-shadow(0 0 5px var(--yellow-neon));
}

/* Hero O Bolt */
.hero-o-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 5rem;
    height: 5rem;
    vertical-align: middle;
    margin: 0 5px;
}

.hero-o-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
    filter: drop-shadow(0 0 20px var(--blue-electric));
}

.hero-o-ring {
    fill: none;
    stroke: #fff;
    stroke-width: 8;
    filter: drop-shadow(0 0 10px var(--blue-electric));
}

.hero-bolt-shape {
    fill: var(--yellow-neon);
    filter: drop-shadow(0 0 15px var(--yellow-neon));
}

@media (max-width: 768px) {
    .hero-o-wrapper {
        width: 2.5rem;
        height: 2.5rem;
    }
}

.glass-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.glass-nav ul li a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
}

.glass-nav ul li a:hover, 
.glass-nav ul li a.active {
    color: var(--blue-electric);
    text-shadow: 0 0 8px var(--blue-electric);
}

.glass-nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--blue-electric);
    box-shadow: 0 0 10px var(--blue-electric);
    transition: width 0.3s ease;
}

.glass-nav ul li a:hover::after,
.glass-nav ul li a.active::after {
    width: 100%;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 120px;
}

.hero-content {
    max-width: 1000px;
    animation: fadeIn 1.5s ease-out;
}

.main-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 6rem;
    font-weight: 900;
    line-height: 0.9;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.line1 {
    color: #fff;
    text-shadow: -2px -2px 0 var(--blue-electric), 
                 2px -2px 0 var(--blue-electric), 
                 -2px 2px 0 var(--blue-electric), 
                 2px 2px 0 var(--blue-electric),
                 0 0 20px var(--blue-electric);
}

.line2 {
    color: transparent;
    -webkit-text-stroke: 2px var(--yellow-neon);
    filter: drop-shadow(0 0 15px var(--yellow-neon));
    letter-spacing: 5px;
}

.hero-tagline {
    font-size: 1.5rem;
    letter-spacing: 8px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 3rem;
    text-transform: uppercase;
    font-weight: 300;
}

/* Join Button */
.neon-btn {
    background: transparent;
    border: 2px solid var(--yellow-neon);
    padding: 1.5rem 4rem;
    color: var(--yellow-neon);
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 15px rgba(249, 255, 0, 0.2),
                inset 0 0 15px rgba(249, 255, 0, 0.1);
}

.btn-text {
    display: block;
    letter-spacing: 3px;
}

.btn-subtext {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 1px;
    margin-top: 5px;
    opacity: 0.8;
}

.neon-btn:hover {
    background: var(--yellow-neon);
    color: #000;
    box-shadow: 0 0 40px var(--yellow-neon);
    transform: scale(1.05);
}

.neon-btn:active {
    transform: scale(0.95);
}

/* Server Connect Box */
.server-connect-box {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    animation: fadeIn 2s ease-out;
}

.connect-label {
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 700;
}

.ip-display {
    background: rgba(0, 242, 255, 0.03);
    border: 1px solid rgba(0, 242, 255, 0.2);
    padding: 1rem 2rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(0, 242, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
}

.ip-display:hover {
    border-color: var(--blue-electric);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 242, 255, 0.15), inset 0 0 20px rgba(0, 242, 255, 0.1);
}

.ip-display code {
    font-family: 'Orbitron', sans-serif;
    color: #fff;
    font-size: 1rem;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.copy-btn {
    background: var(--blue-electric);
    border: none;
    color: #000;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    box-shadow: 0 0 10px var(--blue-electric);
}

.copy-btn:hover {
    background: var(--yellow-neon);
    box-shadow: 0 0 20px var(--yellow-neon);
    transform: scale(1.1);
}

.copy-success-msg {
    position: absolute;
    top: -40px;
    background: var(--yellow-neon);
    color: #000;
    padding: 5px 15px;
    border-radius: 4px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 0.7rem;
    letter-spacing: 1px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

.copy-success-msg.show {
    opacity: 1;
    transform: translateY(0);
}

.domain-label {
    font-size: 0.8rem;
    color: var(--yellow-neon);
    opacity: 0.7;
    font-weight: 500;
    letter-spacing: 1px;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    padding: 5rem 10%;
    margin-bottom: 5rem;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.glass-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6),
                inset 0 0 20px rgba(255, 255, 255, 0.05);
}

.neon-line {
    width: 40px;
    height: 4px;
    background: var(--blue-electric);
    margin-bottom: 1rem;
    box-shadow: 0 0 10px var(--blue-electric);
}

.card-header h2 {
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 2px;
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.player-list {
    list-style: none;
}

.player-list li {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.rank { color: var(--yellow-neon); font-weight: 700; }
.name { flex: 1; margin-left: 1rem; font-weight: 500; }
.score { color: var(--blue-electric); }

.feed-item {
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 2px solid var(--purple-glow);
}

.time {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    display: block;
    margin-bottom: 0.3rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 30px;
    height: 3px;
    background: var(--blue-electric);
    box-shadow: 0 0 10px var(--blue-electric);
    transition: all 0.3s ease;
    border-radius: 3px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    header {
        padding: 1rem 5%;
    }

    .glass-nav {
        padding: 0.7rem 1.2rem;
    }

    .menu-toggle {
        display: flex;
    }

    .glass-nav ul {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        height: 100vh;
        background: rgba(10, 5, 18, 0.98);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        padding: 120px 40px;
        transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        border-left: 1px solid var(--blue-electric);
        gap: 2rem;
        z-index: 1000;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
    }

    .glass-nav ul.active {
        right: 0;
    }

    .glass-nav ul li a {
        font-size: 1.4rem;
        display: block;
        padding: 12px 0;
        font-family: 'Orbitron', sans-serif;
        color: #fff;
    }

    .glass-nav ul li a.active {
        color: var(--yellow-neon);
        text-shadow: 0 0 10px var(--yellow-neon);
    }

    /* Hamburger Animation to X */
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
        background: var(--yellow-neon);
    }
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
        background: var(--yellow-neon);
    }

    .main-title { 
        font-size: 2.8rem; 
    }
    
    .line1 {
        font-size: 2.8rem;
        letter-spacing: 2px;
    }

    .line2 {
        font-size: 1.1rem;
        letter-spacing: 2px;
    }

    .hero-tagline { 
        font-size: 0.8rem; 
        letter-spacing: 3px; 
        margin-bottom: 2rem;
    }

    .neon-btn {
        padding: 1.2rem 2rem;
        width: 100%;
        font-size: 1rem;
    }

    .server-connect-box {
        width: 100%;
    }

    .ip-display {
        width: 100%;
        padding: 1rem;
        justify-content: center;
        gap: 1rem;
    }

    .ip-display code {
        font-size: 0.85rem;
    }

    .info-grid { 
        grid-template-columns: 1fr; 
        padding: 2rem 1rem; 
        gap: 1.5rem;
    }

    .hero {
        padding-top: 100px;
        height: auto;
        min-height: 100vh;
    }

    /* Preloader Mobile Adjustments */
    .logo-container {
        width: 160px;
        height: 160px;
    }

    .havoc-o-svg {
        width: 140px;
        height: 140px;
    }

    .logo-text {
        font-size: 2rem;
        letter-spacing: 5px;
        bottom: -20px;
    }

    .mini-o-wrapper {
        width: 25px;
        height: 25px;
    }

    .loader-status {
        width: 250px;
    }

    .hero-o-wrapper {
        width: 2.2rem;
        height: 2.2rem;
        margin: 0 2px;
    }
}

/* Footer Watermark */
.cyber-footer {
    padding: 3rem 5% 2rem;
    background: linear-gradient(to top, rgba(10, 5, 18, 0.9), transparent);
    text-align: center;
    position: relative;
    z-index: 10;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.watermark {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
}

.watermark a {
    color: var(--blue-electric);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    text-shadow: 0 0 5px rgba(0, 242, 255, 0.2);
}

.watermark a:hover {
    color: var(--yellow-neon);
    text-shadow: 0 0 10px var(--yellow-neon);
}

.footer-line {
    width: 60px;
    height: 2px;
    background: var(--blue-electric);
    box-shadow: 0 0 10px var(--blue-electric);
    margin-bottom: 10px;
    opacity: 0.5;
}
