:root {
    --bg-gradient: radial-gradient(circle at 50% 50%, #1a1c29 0%, #0d0e15 100%);
    --bg-color: #0d0e15;
    --text-primary: #e2e8f0;
    --text-secondary: #8b949e;
    --accent: #00ff41;
    --accent-glow: 0 0 20px rgba(0, 255, 65, 0.4);
    --wifi-color: #3b82f6;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-gradient);
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#ping-graph-canvas {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 20vh;
    width: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.3;
}

.ping-monitor {
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-family: 'Fira Code', monospace;
    font-size: 1rem;
    color: var(--accent);
    z-index: 5;
    background: rgba(13, 14, 21, 0.7);
    padding: 10px 16px;
    border: 1px solid rgba(0, 255, 65, 0.2);
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.1);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.ping-stats {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

#matrix-canvas {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1;
    opacity: 0;
    transition: opacity 2s ease;
    pointer-events: none;
}

#matrix-canvas.active {
    opacity: 0.15;
}

#particles-container {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3.5rem;
    z-index: 10;
    padding: 2rem;
    position: relative;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    cursor: pointer;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.05));
}

.logo-container:active {
    transform: scale(0.95);
}

.server-node {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px;
    background: rgba(26, 28, 41, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(0,0,0,0.8);
    position: relative;
    transition: all 0.4s ease;
}

.server-rack {
    width: 60px;
    height: 16px;
    background: #0d0e15;
    border-radius: 4px;
    border: 1px solid #2a2d42;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 8px;
    gap: 5px;
    position: relative;
    overflow: hidden;
}

.server-rack::before {
    content: '';
    position: absolute;
    left: 4px;
    width: 25px;
    height: 60%;
    background: repeating-linear-gradient(90deg, transparent, transparent 2px, #2a2d42 2px, #2a2d42 4px);
    opacity: 0.5;
}

.led {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #333;
}

.led-active {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

.led-1 { animation: blinkLed 1.5s infinite; background: var(--wifi-color); }
.led-2 { animation: blinkLed 2.1s infinite 0.5s; background: var(--accent); }
.led-3 { animation: blinkLed 0.8s infinite 0.2s; background: #ff4757; }

@keyframes blinkLed {
    0%, 100% { opacity: 0.2; box-shadow: none; }
    50% { opacity: 1; box-shadow: 0 0 6px currentColor; }
}

.data-cable {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 20px;
    background: linear-gradient(to bottom, #2a2d42, transparent);
    border-radius: 2px;
}

.logo-container:hover .server-node {
    border-color: rgba(0, 255, 65, 0.3);
    box-shadow: 0 4px 25px rgba(0, 255, 65, 0.15), inset 0 0 15px rgba(0, 0, 0, 0.8);
}

.logo-container:hover .led-active {
    animation: blinkLed 0.1s infinite;
}

.title {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: 8px;
    color: var(--text-primary);
    cursor: default;
    transition: all 0.5s ease;
}

.title.hacked {
    font-family: 'Fira Code', monospace;
    color: var(--accent);
    text-shadow: var(--accent-glow);
    animation: glitch 0.3s infinite;
}

.terminal-text {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: var(--accent);
    opacity: 0.7;
    height: 1.2em;
}

.message-container {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fira Code', monospace;
    font-size: 1.7rem;
    color: var(--text-secondary);
}

.welcome-text {
    font-weight: 400;
}

.cursor {
    font-weight: 600;
    color: var(--accent);
    margin-left: 5px;
    animation: blink 1s step-end infinite;
}

.hint-text {
    position: absolute;
    bottom: -80px;
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.1);
    letter-spacing: 2px;
}

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

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

.binary-particle {
    position: absolute;
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    color: var(--accent);
    font-weight: bold;
    user-select: none;
    pointer-events: none;
}

@media (max-width: 600px) {
    .title { font-size: 2.5rem; letter-spacing: 6px; }
    .message-container { font-size: 1.3rem; }
    .router-icon { width: 70px; height: 70px; }
}
