/* ========================================
   MISAKA NETWORK - Futuristic ISP Theme
   ======================================== */

:root {
    --primary-color: #00d4ff;
    --primary-glow: rgba(0, 212, 255, 0.5);
    --secondary-color: #0099cc;
    --accent-color: #66e5ff;
    --bg-dark: #0a0a12;
    --bg-medium: #12121f;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --grid-color: rgba(0, 212, 255, 0.08);
    --electric-color: #00ffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Rajdhani', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
}

/* ========================================
   BACKGROUND EFFECTS
   ======================================== */

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

/* Animated Grid */
.grid {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridMove 20s linear infinite;
    transform: perspective(500px) rotateX(60deg);
    transform-origin: center center;
}

@keyframes gridMove {
    0% {
        transform: perspective(500px) rotateX(60deg) translateY(0);
    }

    100% {
        transform: perspective(500px) rotateX(60deg) translateY(60px);
    }
}

/* Floating Particles */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-glow), 0 0 20px var(--primary-glow);
    animation: float 8s ease-in-out infinite;
    opacity: 0.6;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) translateX(0);
        opacity: 0.6;
    }

    25% {
        transform: translateY(-30px) translateX(10px);
        opacity: 1;
    }

    50% {
        transform: translateY(-50px) translateX(-10px);
        opacity: 0.8;
    }

    75% {
        transform: translateY(-20px) translateX(15px);
        opacity: 0.6;
    }
}

/* Electric Arcs */
.electric-arcs {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.arc {
    position: absolute;
    stroke: var(--electric-color);
    stroke-width: 2;
    fill: none;
    filter: drop-shadow(0 0 5px var(--electric-color)) drop-shadow(0 0 10px var(--primary-color));
    opacity: 0;
    animation: arcFlash 3s ease-in-out infinite;
}

@keyframes arcFlash {

    0%,
    90%,
    100% {
        opacity: 0;
    }

    92%,
    95% {
        opacity: 1;
    }

    93%,
    94% {
        opacity: 0.5;
    }
}

/* Pulse Rings */
.pulse-rings {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pulse-rings::before,
.pulse-rings::after {
    content: '';
    position: absolute;
    border: 1px solid var(--primary-color);
    border-radius: 50%;
    opacity: 0;
    animation: pulse 4s ease-out infinite;
}

.pulse-rings::before {
    width: 300px;
    height: 300px;
    animation-delay: 0s;
}

.pulse-rings::after {
    width: 300px;
    height: 300px;
    animation-delay: 2s;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* Scan Line Effect */
.scan-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--primary-glow) 20%,
            var(--primary-color) 50%,
            var(--primary-glow) 80%,
            transparent 100%);
    animation: scan 6s linear infinite;
    opacity: 0.5;
}

@keyframes scan {
    0% {
        top: -2px;
    }

    100% {
        top: 100%;
    }
}

/* Noise Overlay */
.noise {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
}

/* ========================================
   MAIN CONTENT
   ======================================== */

.main-content {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.logo-container {
    text-align: center;
    position: relative;
}

/* Status Indicator */
.status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.dot {
    width: 10px;
    height: 10px;
    background: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ff88, 0 0 20px #00ff88;
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.status-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 4px;
    color: #00ff88;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

/* Main Title */
.title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.title-main {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(60px, 15vw, 150px);
    font-weight: 900;
    letter-spacing: 20px;
    background: linear-gradient(180deg,
            #ffffff 0%,
            var(--primary-color) 50%,
            var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 30px var(--primary-glow));
    animation: titleGlow 3s ease-in-out infinite alternate;
    position: relative;
}

.title-main::before {
    content: 'MISAKA';
    position: absolute;
    left: 0;
    top: 0;
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.1) 0%,
            transparent 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: translateY(-2px);
}

.title-sub {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(30px, 6vw, 60px);
    font-weight: 500;
    letter-spacing: 30px;
    color: var(--text-secondary);
    text-shadow: 0 0 20px var(--primary-glow);
    animation: subtitleFlicker 5s ease-in-out infinite;
    margin-left: 30px;
}

@keyframes titleGlow {
    0% {
        filter: drop-shadow(0 0 30px var(--primary-glow));
    }

    100% {
        filter: drop-shadow(0 0 50px var(--primary-glow)) drop-shadow(0 0 80px rgba(0, 212, 255, 0.3));
    }
}

@keyframes subtitleFlicker {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }

    52% {
        opacity: 0.8;
    }

    54% {
        opacity: 1;
    }
}

/* Network ID */
.network-id {
    margin-top: 40px;
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    letter-spacing: 3px;
    opacity: 0.6;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.id-label {
    color: var(--text-secondary);
}

.id-value {
    color: var(--primary-color);
    font-weight: 700;
    text-shadow: 0 0 10px var(--primary-glow);
    animation: idChange 10s step-end infinite;
}

/* ========================================
   DECORATIVE ELEMENTS
   ======================================== */

.corner-decor {
    position: fixed;
    width: 100px;
    height: 100px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    pointer-events: none;
}

.corner-decor.top-left {
    top: 30px;
    left: 30px;
    border-right: none;
    border-bottom: none;
}

.corner-decor.top-right {
    top: 30px;
    right: 30px;
    border-left: none;
    border-bottom: none;
}

.corner-decor.bottom-left {
    bottom: 30px;
    left: 30px;
    border-right: none;
    border-top: none;
}

.corner-decor.bottom-right {
    bottom: 30px;
    right: 30px;
    border-left: none;
    border-top: none;
}

.corner-decor::before {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-glow);
}

.top-left::before {
    top: -5px;
    left: -5px;
}

.top-right::before {
    top: -5px;
    right: -5px;
}

.bottom-left::before {
    bottom: -5px;
    left: -5px;
}

.bottom-right::before {
    bottom: -5px;
    right: -5px;
}

/* Connection Lines SVG */
.connection-lines {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 5;
}

.conn-line {
    stroke: var(--primary-color);
    stroke-width: 0.5;
    opacity: 0.3;
    stroke-dasharray: 5, 5;
    animation: dashMove 2s linear infinite;
}

@keyframes dashMove {
    0% {
        stroke-dashoffset: 0;
    }

    100% {
        stroke-dashoffset: 10;
    }
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .title-main {
        letter-spacing: 10px;
    }

    .title-sub {
        letter-spacing: 15px;
        margin-left: 15px;
    }

    .corner-decor {
        width: 50px;
        height: 50px;
    }

    .corner-decor.top-left,
    .corner-decor.top-right {
        top: 15px;
    }

    .corner-decor.bottom-left,
    .corner-decor.bottom-right {
        bottom: 15px;
    }

    .corner-decor.top-left,
    .corner-decor.bottom-left {
        left: 15px;
    }

    .corner-decor.top-right,
    .corner-decor.bottom-right {
        right: 15px;
    }
}