/**
 * Boomfection - Neon Effects & Animations
 * Virus & Explosion themed visual enhancements
 * @copyright reDim GmbH | @link https://www.redim.de | @contact team@redim.de
 */

/* ============================================================================
   NEON COLOR PALETTE
   ============================================================================ */

:root {
    --neon-pink: #ff00ff;
    --neon-cyan: #00ffff;
    --neon-green: #00ff88;
    --neon-yellow: #ffff00;
    --neon-orange: #ff8800;
    --neon-red: #ff0044;
    --neon-purple: #aa00ff;
    --neon-blue: #0088ff;
}

/* ============================================================================
   BACKGROUND
   ============================================================================ */

body {
    background: radial-gradient(ellipse at center, #1a0a2e 0%, #0d0015 50%, #000000 100%) !important;
}

body.game-page {
    overflow: hidden;
}

/* Animated Nebula Blobs */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(255, 0, 128, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(0, 255, 255, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 40% 40%, rgba(170, 0, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(0, 255, 136, 0.08) 0%, transparent 40%);
    animation: nebulaMove 20s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: -3;
}

@keyframes nebulaMove {
    0% {
        transform: scale(1) translate(0, 0);
        filter: blur(60px);
    }
    50% {
        transform: scale(1.1) translate(30px, -20px);
        filter: blur(80px);
    }
    100% {
        transform: scale(1) translate(-20px, 30px);
        filter: blur(60px);
    }
}

/* Hex Grid Pattern */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%2300ffff' fill-opacity='0.03'%3E%3Cpath d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9zM0 15l12.98-7.5V0h-2v6.35L0 12.69v2.3zm0 18.5L12.98 41v8h-2v-6.85L0 35.81v-2.3zM15 0v7.5L27.99 15H28v-2.31h-.01L17 6.35V0h-2zm0 49v-8l12.99-7.5H28v2.31h-.01L17 42.15V49h-2z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
    animation: gridPulse 4s ease-in-out infinite;
    pointer-events: none;
    z-index: -2;
}

@keyframes gridPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Floating Energy Rings */
.energy-ring {
    position: fixed;
    border-radius: 50%;
    border: 2px solid;
    opacity: 0;
    pointer-events: none;
    z-index: -1;
    animation: energyRing 8s ease-out infinite;
}

@keyframes energyRing {
    0% {
        transform: scale(0);
        opacity: 0.8;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* Scanlines (subtle) */
.scanlines {
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 2px,
        rgba(0, 255, 255, 0.015) 2px,
        rgba(0, 255, 255, 0.015) 4px
    );
    pointer-events: none;
    z-index: 9998;
    animation: scanlineMove 10s linear infinite;
}

@keyframes scanlineMove {
    0% { transform: translateY(0); }
    100% { transform: translateY(4px); }
}

/* Glowing Orbs Container */
.glow-orbs {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.4;
    animation: orbFloat 15s ease-in-out infinite;
}

@keyframes orbFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(50px, -30px) scale(1.2);
    }
    50% {
        transform: translate(-30px, 50px) scale(0.8);
    }
    75% {
        transform: translate(-50px, -20px) scale(1.1);
    }
}

/* ============================================================================
   VIRUS PARTICLES
   ============================================================================ */

.virus-particles,
.glow-orbs,
.matrix-rain,
.biohazard-container,
.scanlines {
    transition: opacity 0.5s ease;
}

.virus-particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.virus-particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.6;
    animation: floatVirus linear infinite;
    filter: blur(1px);
}

@keyframes floatVirus {
    0% {
        transform: translateY(100vh) rotate(0deg) scale(1);
        opacity: 0;
    }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% {
        transform: translateY(-100px) rotate(360deg) scale(0.5);
        opacity: 0;
    }
}

/* ============================================================================
   CONNECTION STATUS - rechts unten
   ============================================================================ */

.connection-status {
    top: auto !important;
    bottom: 16px !important;
    right: 16px !important;
}

.connection-status.connected {
    background: rgba(0, 255, 136, 0.15) !important;
    border: 1px solid var(--neon-green) !important;
    color: var(--neon-green) !important;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
    text-shadow: 0 0 5px var(--neon-green);
}

.connection-status.disconnected {
    background: rgba(255, 0, 68, 0.15) !important;
    border: 1px solid var(--neon-red) !important;
    color: var(--neon-red) !important;
    box-shadow: 0 0 10px rgba(255, 0, 68, 0.4);
}

.connection-status.connecting {
    background: rgba(255, 255, 0, 0.15) !important;
    border: 1px solid var(--neon-yellow) !important;
    color: var(--neon-yellow) !important;
    box-shadow: 0 0 10px rgba(255, 255, 0, 0.4);
}

/* Connection status dot indicator */
.connection-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.connection-status.connected .connection-dot {
    background: var(--neon-green);
    box-shadow: 0 0 6px var(--neon-green);
    animation: connDotPulse 2s ease-in-out infinite;
}

.connection-status.disconnected .connection-dot {
    background: var(--neon-red);
    box-shadow: 0 0 6px var(--neon-red);
}

.connection-status.connecting .connection-dot {
    background: var(--neon-yellow);
    box-shadow: 0 0 6px var(--neon-yellow);
    animation: connDotPulse 1s ease-in-out infinite;
}

@keyframes connDotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

/* Reconnect countdown */
.connection-countdown {
    font-size: 0.65rem;
    opacity: 0.7;
    margin-left: 4px;
}

/* ============================================================================
   NEON TITLE
   ============================================================================ */

.panel-header h1 {
    font-size: 2.8rem !important;
    font-weight: 900 !important;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #fff !important;
    text-shadow:
        0 0 5px #fff,
        0 0 10px #fff,
        0 0 20px var(--neon-cyan),
        0 0 40px var(--neon-cyan),
        0 0 60px var(--neon-pink);
    animation: neonPulse 2s ease-in-out infinite;
}

@keyframes neonPulse {
    0%, 100% {
        text-shadow:
            0 0 5px #fff,
            0 0 10px #fff,
            0 0 20px var(--neon-cyan),
            0 0 40px var(--neon-cyan);
    }
    50% {
        text-shadow:
            0 0 5px #fff,
            0 0 15px #fff,
            0 0 30px var(--neon-cyan),
            0 0 60px var(--neon-pink),
            0 0 80px var(--neon-pink);
    }
}

.panel-header .subtitle {
    color: var(--neon-pink) !important;
    text-shadow: 0 0 10px var(--neon-pink);
    font-weight: 500;
    letter-spacing: 2px;
}

/* ============================================================================
   NEON PANELS
   ============================================================================ */

.panel {
    background: rgba(10, 5, 20, 0.95) !important;
    border: 2px solid var(--neon-cyan) !important;
    box-shadow:
        0 0 15px rgba(0, 255, 255, 0.3),
        0 0 30px rgba(255, 0, 255, 0.15),
        inset 0 0 30px rgba(0, 255, 255, 0.03) !important;
}

/* ============================================================================
   NEON BUTTONS
   ============================================================================ */

.btn-primary {
    background: linear-gradient(135deg, var(--neon-orange) 0%, #cc5500 100%) !important;
    border: none !important;
    color: #fff !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 15px rgba(255, 136, 0, 0.5);
    transition: all 0.3s ease !important;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 0 20px rgba(255, 136, 0, 0.6),
        0 0 40px rgba(255, 136, 0, 0.3);
}

.btn-secondary {
    background: rgba(0, 30, 50, 0.8) !important;
    border: 2px solid var(--neon-cyan) !important;
    color: var(--neon-cyan) !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
    transition: all 0.3s ease !important;
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(0, 255, 255, 0.1) !important;
    box-shadow:
        0 0 15px rgba(0, 255, 255, 0.4),
        0 0 30px rgba(0, 255, 255, 0.2);
    text-shadow: 0 0 10px var(--neon-cyan);
}

.btn-ghost {
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: rgba(255, 255, 255, 0.7) !important;
    transition: all 0.3s ease !important;
}

.btn-ghost:hover:not(:disabled) {
    border-color: var(--neon-green) !important;
    color: var(--neon-green) !important;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
    text-shadow: 0 0 5px var(--neon-green);
}

/* ============================================================================
   NEON FORM INPUTS
   ============================================================================ */

.form-control {
    background: rgba(0, 10, 20, 0.8) !important;
    border: 1px solid rgba(0, 255, 255, 0.3) !important;
    color: #fff !important;
    transition: all 0.3s ease !important;
}

.form-control:focus {
    border-color: var(--neon-cyan) !important;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.4) !important;
    outline: none !important;
}

.form-control::placeholder {
    color: rgba(0, 255, 255, 0.4) !important;
}

.form-group label {
    color: var(--neon-cyan) !important;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
    text-transform: uppercase;
    font-size: 0.75rem !important;
    letter-spacing: 1px;
}

/* ============================================================================
   NEON COLOR PICKER
   ============================================================================ */

.color-option {
    box-shadow: 0 0 8px currentColor;
    transition: all 0.3s ease !important;
}

.color-option:hover {
    transform: scale(1.15);
    box-shadow: 0 0 15px currentColor, 0 0 25px currentColor;
}

.color-option.selected {
    border-color: #fff !important;
    box-shadow: 0 0 10px currentColor, 0 0 20px currentColor, 0 0 30px #fff;
}

/* ============================================================================
   NEON GAME CODE
   ============================================================================ */

.game-code {
    background: rgba(0, 10, 20, 0.8) !important;
    border: 2px solid var(--neon-green) !important;
    color: var(--neon-green) !important;
    text-shadow:
        0 0 5px var(--neon-green),
        0 0 10px var(--neon-green),
        0 0 20px var(--neon-green);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
    animation: codeGlow 2s ease-in-out infinite alternate;
}

@keyframes codeGlow {
    from { box-shadow: 0 0 10px rgba(0, 255, 136, 0.3); }
    to { box-shadow: 0 0 25px rgba(0, 255, 136, 0.5); }
}

/* ============================================================================
   NEON PLAYER LIST
   ============================================================================ */

.player-item {
    background: rgba(0, 10, 20, 0.6) !important;
    border: 1px solid rgba(0, 255, 255, 0.2) !important;
    transition: all 0.3s ease !important;
}

.player-item:hover {
    background: rgba(0, 20, 40, 0.8) !important;
    border-color: var(--neon-cyan) !important;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

.player-item.current {
    border-color: var(--neon-pink) !important;
    background: rgba(255, 0, 128, 0.1) !important;
    box-shadow: 0 0 15px rgba(255, 0, 128, 0.3);
}

.player-color {
    box-shadow: 0 0 8px currentColor;
}

.player-badge {
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple)) !important;
    box-shadow: 0 0 10px var(--neon-pink);
}

/* ============================================================================
   NEON TURN INDICATOR
   ============================================================================ */

.turn-indicator {
    background: rgba(0, 10, 20, 0.8) !important;
    border: 2px solid var(--neon-purple) !important;
    box-shadow: 0 0 15px rgba(170, 0, 255, 0.3);
}

.turn-indicator.my-turn {
    border-color: var(--neon-green) !important;
    background: rgba(0, 255, 136, 0.1) !important;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
    animation: myTurnPulse 1.5s ease-in-out infinite;
}

@keyframes myTurnPulse {
    0%, 100% { box-shadow: 0 0 15px rgba(0, 255, 136, 0.3); }
    50% { box-shadow: 0 0 30px rgba(0, 255, 136, 0.6); }
}

.turn-indicator .label {
    color: var(--neon-cyan) !important;
    text-shadow: 0 0 5px var(--neon-cyan);
}

/* ============================================================================
   VIRUS TYPE PICKER
   ============================================================================ */

.virus-option {
    background: rgba(0, 10, 20, 0.6) !important;
    border: 2px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.3s ease !important;
}

.virus-option:hover {
    border-color: var(--neon-cyan) !important;
    background: rgba(0, 255, 255, 0.1) !important;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
    transform: translateY(-2px);
}

.virus-option.selected {
    border-color: var(--neon-pink) !important;
    background: rgba(255, 0, 255, 0.1) !important;
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.3);
}

.virus-option.selected .virus-name {
    color: var(--neon-pink) !important;
    text-shadow: 0 0 5px var(--neon-pink);
}

/* ============================================================================
   GAME LIST
   ============================================================================ */

.game-list-item {
    background: rgba(0, 10, 20, 0.6) !important;
    border: 1px solid rgba(0, 255, 255, 0.2) !important;
    transition: all 0.3s ease !important;
}

.game-list-item:hover {
    border-color: var(--neon-cyan) !important;
    background: rgba(0, 255, 255, 0.05) !important;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

.game-list-item .join-btn {
    background: linear-gradient(135deg, var(--neon-green), #00aa66) !important;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.game-list-item .join-btn:hover {
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
}

/* ============================================================================
   WINNER OVERLAY
   ============================================================================ */

.winner-overlay {
    background: radial-gradient(ellipse at center, rgba(20, 0, 40, 0.95) 0%, rgba(0, 0, 0, 0.98) 100%) !important;
}

.winner-content h1 {
    color: #fff !important;
    text-shadow:
        0 0 10px #fff,
        0 0 20px var(--neon-cyan),
        0 0 40px var(--neon-cyan),
        0 0 60px var(--neon-pink);
}

.winner-content .winner-name {
    text-shadow: 0 0 20px currentColor, 0 0 40px currentColor;
}

/* ============================================================================
   CHAT
   ============================================================================ */

.chat-container {
    background: rgba(0, 5, 15, 0.9) !important;
    border: 1px solid rgba(0, 255, 255, 0.3) !important;
}

.chat-message.system {
    color: var(--neon-green) !important;
    text-shadow: 0 0 5px rgba(0, 255, 136, 0.5);
}

.chat-input-container button {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue)) !important;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

/* ============================================================================
   TOOLTIP
   ============================================================================ */

.tooltip {
    background: rgba(0, 5, 15, 0.95) !important;
    border: 1px solid var(--neon-cyan) !important;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.tooltip-title {
    color: var(--neon-cyan) !important;
    text-shadow: 0 0 5px var(--neon-cyan);
}

/* ============================================================================
   ROUND INDICATOR
   ============================================================================ */

.round-indicator {
    background: rgba(0, 5, 15, 0.9) !important;
    border: 1px solid var(--neon-purple) !important;
    color: var(--neon-purple) !important;
    text-shadow: 0 0 5px var(--neon-purple);
    box-shadow: 0 0 10px rgba(170, 0, 255, 0.2);
}

/* ============================================================================
   EXPLOSION EFFECTS
   ============================================================================ */

.explosion-effect {
    position: fixed;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--neon-yellow) 0%, var(--neon-orange) 30%, var(--neon-red) 60%, transparent 100%);
    animation: explosion 0.6s ease-out forwards;
    pointer-events: none;
    z-index: 9000;
}

@keyframes explosion {
    0% { transform: scale(0); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.8; }
    100% { transform: scale(2); opacity: 0; }
}

.shockwave {
    position: fixed;
    border-radius: 50%;
    border: 3px solid var(--neon-cyan);
    animation: shockwave 0.8s ease-out forwards;
    pointer-events: none;
    z-index: 8999;
}

@keyframes shockwave {
    0% { width: 0; height: 0; opacity: 1; }
    100% { width: 200px; height: 200px; margin-left: -100px; margin-top: -100px; opacity: 0; }
}

/* ============================================================================
   SCROLLBAR
   ============================================================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 10, 20, 0.5);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--neon-cyan), var(--neon-purple));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--neon-pink), var(--neon-cyan));
}

/* ============================================================================
   VIRUS CELLS (with spikes)
   ============================================================================ */

.virus-cell {
    position: absolute;
    pointer-events: none;
    animation: floatVirus linear infinite;
}

.virus-cell svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 5px currentColor);
}

/* ============================================================================
   MATRIX RAIN
   ============================================================================ */

.matrix-rain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
    opacity: 0.4;
}

.matrix-column {
    position: absolute;
    top: -100%;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.2;
    color: var(--neon-green);
    text-shadow: 0 0 10px var(--neon-green);
    writing-mode: vertical-rl;
    white-space: nowrap;
    animation: matrixFall linear infinite;
}

@keyframes matrixFall {
    0% { transform: translateY(0); }
    100% { transform: translateY(200vh); }
}

/* ============================================================================
   GLITCH EFFECT
   ============================================================================ */

.glitch-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9997;
    opacity: 0;
    background: transparent;
}

.glitch-overlay.active {
    animation: glitchFlash 0.3s ease-out;
}

@keyframes glitchFlash {
    0% { opacity: 0; }
    10% {
        opacity: 1;
        background: linear-gradient(90deg, transparent 0%, rgba(255,0,255,0.1) 50%, transparent 100%);
        transform: translateX(-5px);
    }
    20% {
        background: linear-gradient(90deg, transparent 0%, rgba(0,255,255,0.1) 50%, transparent 100%);
        transform: translateX(5px);
    }
    30% {
        opacity: 0.8;
        transform: translateX(-3px) skewX(2deg);
    }
    40% {
        transform: translateX(3px) skewX(-2deg);
    }
    50% { opacity: 0; transform: none; }
    100% { opacity: 0; }
}

.glitch-line {
    position: fixed;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan);
    pointer-events: none;
    z-index: 9998;
    animation: glitchLine 0.1s ease-out forwards;
}

@keyframes glitchLine {
    0% { opacity: 1; transform: scaleX(0); }
    50% { transform: scaleX(1); }
    100% { opacity: 0; transform: scaleX(1); }
}

/* ============================================================================
   CLICK EXPLOSION
   ============================================================================ */

.click-particle {
    position: fixed;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9000;
    animation: clickExplode 0.8s ease-out forwards;
}

@keyframes clickExplode {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

/* ============================================================================
   DNA HELIX
   ============================================================================ */

.dna-container {
    position: fixed;
    pointer-events: none;
    z-index: -1;
    perspective: 1000px;
}

.dna-helix {
    position: relative;
    transform-style: preserve-3d;
    animation: dnaRotate 10s linear infinite;
}

.dna-node {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    box-shadow: 0 0 10px currentColor;
}

.dna-link {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-pink));
    transform-origin: left center;
    box-shadow: 0 0 5px var(--neon-purple);
}

@keyframes dnaRotate {
    from { transform: rotateY(0deg); }
    to { transform: rotateY(360deg); }
}

/* ============================================================================
   LIGHTNING / ELECTRIC BOLTS
   ============================================================================ */

.lightning {
    position: fixed;
    pointer-events: none;
    z-index: 9996;
    opacity: 0;
}

.lightning.flash {
    animation: lightningFlash 0.2s ease-out;
}

@keyframes lightningFlash {
    0% { opacity: 0; }
    10% { opacity: 1; }
    20% { opacity: 0.3; }
    30% { opacity: 1; }
    40% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

.lightning svg {
    filter: drop-shadow(0 0 10px var(--neon-cyan)) drop-shadow(0 0 20px var(--neon-blue));
}

/* ============================================================================
   TYPEWRITER EFFECT
   ============================================================================ */

.typewriter {
    overflow: hidden;
    border-right: 3px solid var(--neon-cyan);
    white-space: nowrap;
    animation: typewriterCursor 0.7s step-end infinite;
}

@keyframes typewriterCursor {
    0%, 100% { border-color: var(--neon-cyan); }
    50% { border-color: transparent; }
}

/* ============================================================================
   BIOHAZARD SYMBOLS
   ============================================================================ */

.biohazard-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.biohazard-symbol {
    position: absolute;
    opacity: 0.08;
    animation: biohazardFloat 20s ease-in-out infinite;
}

.biohazard-symbol svg {
    width: 100%;
    height: 100%;
    fill: var(--neon-orange);
    filter: drop-shadow(0 0 10px var(--neon-orange));
    animation: biohazardSpin 30s linear infinite;
}

@keyframes biohazardFloat {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(20px, -30px); }
    50% { transform: translate(-20px, 20px); }
    75% { transform: translate(30px, 10px); }
}

@keyframes biohazardSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================================================
   REDUCED MOTION
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
    .virus-particles, .matrix-rain, .dna-container, .biohazard-container { display: none; }
}

/* ============================================================================
   MODAL OVERLAY
   ============================================================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.hidden {
    display: none;
}

.modal-content {
    background: linear-gradient(145deg, rgba(26, 10, 46, 0.95), rgba(13, 0, 21, 0.95));
    border: 1px solid rgba(170, 0, 255, 0.4);
    border-radius: 16px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    box-shadow:
        0 0 40px rgba(170, 0, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.modal-content h3 {
    color: var(--neon-pink);
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    text-shadow: 0 0 20px var(--neon-pink);
}

.modal-content p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
}

/* ============================================================================
   TOAST NOTIFICATIONS
   ============================================================================ */

.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10000;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 12px;
    background: rgba(26, 10, 46, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    pointer-events: auto;
    min-width: 250px;
    max-width: 400px;
}

.toast-info {
    border-color: rgba(0, 255, 255, 0.4);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
}

.toast-success {
    border-color: rgba(0, 255, 136, 0.4);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
}

.toast-error {
    border-color: rgba(255, 0, 68, 0.4);
    box-shadow: 0 0 20px rgba(255, 0, 68, 0.2);
}

.toast-icon {
    font-size: 1.25rem;
}

.toast-text {
    color: #fff;
    font-size: 0.95rem;
    flex: 1;
}

.toast-close {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.15s;
    margin-left: auto;
}

.toast-close:hover {
    color: #fff;
}

/* Warning toast type */
.toast-warning {
    border-color: rgba(255, 200, 50, 0.4);
    box-shadow: 0 0 20px rgba(255, 200, 50, 0.2);
}

/* Toast progress bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 12px 12px;
    animation: toastProgress var(--toast-duration, 4s) linear forwards;
}

.toast-info .toast-progress { background: rgba(0, 255, 255, 0.6); }
.toast-success .toast-progress { background: rgba(0, 255, 136, 0.6); }
.toast-error .toast-progress { background: rgba(255, 0, 68, 0.6); }
.toast-warning .toast-progress { background: rgba(255, 200, 50, 0.6); }

@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

/* Ensure toast has relative positioning for progress bar */
.toast {
    position: relative;
    overflow: hidden;
}

/* Slide-in animation (replaces simple opacity) */
.toast.animate-slide-in {
    animation: toastSlideIn 0.3s ease-out;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-fade-out {
    animation: fadeOutRight 0.3s ease forwards;
}

@keyframes fadeOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(50px);
    }
}

/* ============================================================================
   LOADING SPINNER
   ============================================================================ */

.loading-spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto;
    border: 3px solid rgba(170, 0, 255, 0.2);
    border-top-color: var(--neon-pink);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ============================================================================
   BUTTON DANGER VARIANT
   ============================================================================ */

.btn-danger {
    background: linear-gradient(135deg, rgba(255, 0, 68, 0.3), rgba(200, 0, 50, 0.2));
    border: 1px solid rgba(255, 0, 68, 0.6);
    color: #ff4466;
}

.btn-danger:hover {
    background: linear-gradient(135deg, rgba(255, 0, 68, 0.5), rgba(200, 0, 50, 0.4));
    box-shadow: 0 0 25px rgba(255, 0, 68, 0.4);
    color: #fff;
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-1 {
    flex: 1;
}

.animate-scale-in {
    animation: scaleIn 0.25s ease;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-slide-in {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============================================================================
   CHAT REACTIONS
   @copyright reDim GmbH | @link https://www.redim.de | @contact team@redim.de
   ============================================================================ */

.chat-message {
    position: relative;
}

.chat-reactions {
    display: none;
    position: absolute;
    right: 4px;
    top: -2px;
    gap: 2px;
    background: rgba(20, 20, 30, 0.95);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 12px;
    padding: 2px 4px;
    z-index: 5;
}

.chat-message:hover .chat-reactions {
    display: inline-flex;
}

.reaction-btn {
    cursor: pointer;
    font-size: 14px;
    padding: 1px 3px;
    border-radius: 6px;
    transition: transform 0.15s ease, background 0.15s ease;
    user-select: none;
}

.reaction-btn:hover {
    transform: scale(1.3);
    background: rgba(255, 255, 255, 0.1);
}

.reaction-badges {
    display: inline-flex;
    gap: 4px;
    margin-left: 6px;
    vertical-align: middle;
}

.reaction-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 1px 5px;
    cursor: default;
}

.reaction-badge .reaction-count {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

/* ============================================================================
   FIELD PREVIEW (TOOLTIP)
   ============================================================================ */

.tooltip-row.tooltip-preview {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.tooltip-preview .tooltip-value {
    color: var(--neon-green);
    font-weight: 600;
}

.tooltip-preview .tooltip-value.explosion {
    color: var(--neon-red);
    font-weight: 700;
    text-shadow: 0 0 6px rgba(255, 0, 68, 0.6);
}

/* ============================================================================
   THEME TOGGLE
   ============================================================================ */

.theme-toggle {
    position: fixed;
    top: 12px;
    right: 60px;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    background: rgba(30, 30, 40, 0.7);
    backdrop-filter: blur(8px);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 10000;
    transition: background 0.3s ease, transform 0.2s ease, border-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.theme-toggle:hover {
    background: rgba(50, 50, 60, 0.9);
    transform: scale(1.1);
    border-color: rgba(0, 255, 255, 0.4);
}

/* ============================================================================
   LIGHT THEME OVERRIDES
   ============================================================================ */

[data-theme="light"] {
    --bg-primary: #f0f0f5;
    --bg-secondary: #e0e0e8;
    --text-primary: #1a1a2e;
    --text-secondary: #444;
    --border-color: rgba(0, 0, 0, 0.1);
    --card-bg: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] body {
    background: var(--bg-primary) !important;
    color: var(--text-primary);
}

[data-theme="light"] body::before {
    background:
        radial-gradient(circle at 20% 80%, rgba(255, 0, 128, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(0, 128, 255, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 40% 40%, rgba(170, 0, 255, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(0, 200, 100, 0.04) 0%, transparent 40%);
}

[data-theme="light"] body::after {
    opacity: 0.15;
}

[data-theme="light"] .panel,
[data-theme="light"] .section-card,
[data-theme="light"] .landing-card {
    background: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="light"] .panel-header h1,
[data-theme="light"] .panel-header h2,
[data-theme="light"] .panel-header h3,
[data-theme="light"] .landing-card h3 {
    color: var(--text-primary);
}

[data-theme="light"] .subtitle,
[data-theme="light"] .form-hint,
[data-theme="light"] .stat-label {
    color: var(--text-secondary);
}

[data-theme="light"] .form-control {
    background: rgba(0, 0, 0, 0.04);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="light"] .btn-ghost {
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="light"] .btn-ghost:hover {
    background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .chat-message {
    color: var(--text-primary);
}

[data-theme="light"] .chat-message.system .text {
    color: var(--text-secondary);
}

[data-theme="light"] .chat-reactions {
    background: rgba(240, 240, 245, 0.95);
    border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .reaction-badge {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .reaction-badge .reaction-count {
    color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .tooltip {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--border-color);
    color: var(--text-primary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .tooltip-label {
    color: var(--text-secondary);
}

[data-theme="light"] .winner-overlay {
    background: rgba(240, 240, 245, 0.95);
}

[data-theme="light"] .winner-content h1 {
    color: var(--text-primary);
}

[data-theme="light"] .theme-toggle {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 100, 200, 0.4);
}

[data-theme="light"] .connection-status {
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="light"] .sound-controls .btn-sound {
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-primary);
}

[data-theme="light"] .scanlines {
    display: none;
}

/* Rematch Button */
.btn-rematch {
    margin-top: 12px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 8px rgba(0, 255, 136, 0.3); }
    50% { box-shadow: 0 0 20px rgba(0, 255, 136, 0.6); }
}

/* ============================================================================
   SEASONAL THEMES
   @copyright reDim GmbH | @link https://www.redim.de | @contact team@redim.de
   ============================================================================ */

.season-winter { --season-accent: #88ddff; --season-particles: #ffffff; }
.season-spring { --season-accent: #88ff88; --season-particles: #ffccee; }
.season-summer { --season-accent: #ffcc00; --season-particles: #ff8800; }
.season-autumn { --season-accent: #ff8844; --season-particles: #aa4400; }

.season-winter .landing-title .title-glow,
.season-spring .landing-title .title-glow,
.season-summer .landing-title .title-glow,
.season-autumn .landing-title .title-glow {
    color: var(--season-accent);
    text-shadow: 0 0 20px var(--season-accent), 0 0 40px var(--season-accent);
}

/* ============================================================================
   PING BADGE
   @copyright reDim GmbH | @link https://www.redim.de | @contact team@redim.de
   ============================================================================ */

.ping-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    font-size: 0.75rem;
    border-radius: 3px;
    background: rgba(0, 255, 136, 0.15);
    color: var(--neon-green);
    font-family: monospace;
}

/* ============================================================================
   KILL FEED ANIMATION
   @copyright reDim GmbH | @link https://www.redim.de | @contact team@redim.de
   ============================================================================ */

@keyframes slideInLeft {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ============================================================================
   SITE FOOTER
   @copyright reDim GmbH | @link https://www.redim.de | @contact team@redim.de
   ============================================================================ */

.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 20px;
    background: rgba(10, 10, 20, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    z-index: 100;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
}

.site-footer a:hover {
    color: #00ff88;
}

.footer-divider {
    margin: 0 8px;
    color: rgba(255, 255, 255, 0.2);
}

/* ============================================================================
   LEGAL PAGES (Impressum, Datenschutz)
   @copyright reDim GmbH | @link https://www.redim.de | @contact team@redim.de
   ============================================================================ */

.legal-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 70px 30px 80px;
    color: #e2e8f0;
}

.legal-container h1 {
    color: #00ff88;
    margin-bottom: 24px;
}

.legal-container h2 {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-top: 24px;
}

.legal-content p {
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.7;
}

.legal-content a {
    color: #00ff88;
}

.legal-content ul {
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.7;
    padding-left: 20px;
}

.legal-content ul li {
    margin-bottom: 4px;
}

/* ============================================================================
   AUTH HEADER & LOGIN/REGISTER MODALS
   @copyright reDim GmbH | @link https://www.redim.de | @contact team@redim.de
   ============================================================================ */

/* Auth Header */
.auth-header {
    position: fixed;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(10, 5, 20, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    padding: 6px 16px;
}
.auth-state { display: flex; align-items: center; gap: 4px; }
.auth-link {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}
.auth-link:hover { color: #00ff88; }
.auth-divider { color: rgba(255,255,255,0.2); font-size: 0.85rem; }

.auth-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    transition: border-color 0.2s;
}
.auth-user-info:hover { border-color: rgba(0,255,136,0.3); }

.auth-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0,255,136,0.2);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #00ff88;
    font-weight: bold;
}

.auth-username { color: #e2e8f0; font-size: 0.85rem; }
.auth-dropdown-arrow { color: rgba(255,255,255,0.4); font-size: 0.7rem; }

.auth-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    background: rgba(20,10,40,0.95);
    border: 1px solid rgba(0,255,136,0.2);
    border-radius: 8px;
    min-width: 160px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.auth-dropdown-item {
    display: block;
    width: 100%;
    padding: 10px 16px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.85rem;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s;
}
.auth-dropdown-item:hover { background: rgba(0,255,136,0.1); color: #00ff88; }
.auth-logout { color: rgba(255,100,100,0.7); }
.auth-logout:hover { background: rgba(255,0,0,0.1); color: #ff4444; }

/* Nav Links (in auth header) */
.auth-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-right: 12px;
}
.auth-nav-link {
    color: rgba(255,255,255,0.5);
    font-size: 0.82rem;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}
.auth-nav-link:hover { color: #00ff88; background: rgba(0,255,136,0.08); }

/* Language Toggle */
.auth-lang-toggle {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.5);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    cursor: pointer;
    margin-right: 8px;
    letter-spacing: 0.5px;
    transition: all 0.2s;
}
.auth-lang-toggle:hover {
    color: #00ff88;
    border-color: rgba(0,255,136,0.3);
    background: rgba(0,255,136,0.08);
}

/* Breadcrumb */
.breadcrumb {
    position: fixed;
    top: 46px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
}
.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.75rem;
}
.breadcrumb-item { color: rgba(255,255,255,0.35); }
.breadcrumb-item + .breadcrumb-item::before {
    content: '>';
    margin: 0 6px;
    color: rgba(255,255,255,0.2);
}
.breadcrumb-item a {
    color: rgba(255,255,255,0.45);
    text-decoration: none;
    transition: color 0.2s;
}
.breadcrumb-item a:hover { color: #00ff88; }
.breadcrumb-item[aria-current="page"] { color: rgba(0,255,136,0.6); }

/* Password Strength Indicator */
.pw-strength { margin-top: 6px; }
.pw-strength-bar {
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
}
.pw-strength-fill {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: width 0.3s, background 0.3s;
}
.pw-strength-fill.pw-weak { background: #ff4444; }
.pw-strength-fill.pw-medium { background: #ffaa00; }
.pw-strength-fill.pw-strong { background: #00cc6a; }
.pw-strength-fill.pw-excellent { background: #00ff88; }
.pw-strength-label {
    font-size: 0.7rem;
    margin-top: 2px;
    display: block;
}
.pw-strength-label.pw-weak { color: #ff4444; }
.pw-strength-label.pw-medium { color: #ffaa00; }
.pw-strength-label.pw-strong { color: #00cc6a; }
.pw-strength-label.pw-excellent { color: #00ff88; }

/* Impersonation Banner */
.impersonation-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 8px 16px;
    background: rgba(255, 80, 0, 0.9);
    color: #fff;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
}
.impersonation-banner a {
    color: #fff;
    text-decoration: underline;
}

/* Auth Modal Forms */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.modal-card {
    background: rgba(20,10,40,0.95);
    border: 1px solid rgba(0,255,136,0.3);
    border-radius: 12px;
    padding: 24px 28px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 0 30px rgba(0,255,136,0.1);
}
.modal-title {
    color: #00ff88;
    font-size: 1.3rem;
    margin-bottom: 16px;
}
.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.auth-form .form-group { margin-bottom: 12px; }
.auth-form label {
    display: block;
    color: rgba(255,255,255,0.6);
    font-size: 0.8rem;
    margin-bottom: 4px;
}
.auth-form .form-control {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    color: #e2e8f0;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.auth-form .form-control:focus { border-color: rgba(0,255,136,0.5); }

.auth-form-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: -4px;
}
.auth-link-small {
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    font-size: 0.75rem;
    cursor: pointer;
}
.auth-link-small:hover { color: #00ff88; }

.password-strength {
    font-size: 0.75rem;
    margin-top: 4px;
    height: 16px;
}

/* ============================================================================
   AUTH MODAL FEEDBACK
   @copyright reDim GmbH | @link https://www.redim.de | @contact team@redim.de
   ============================================================================ */

/* Field-level validation error */
.auth-form .form-control.field-error {
    border-color: rgba(255, 0, 68, 0.6) !important;
    box-shadow: 0 0 8px rgba(255, 0, 68, 0.2);
}

.auth-form .field-error-text {
    display: block;
    color: var(--neon-red, #ff0044);
    font-size: 0.72rem;
    margin-top: 3px;
    min-height: 0;
    animation: fieldErrorIn 0.2s ease;
}

@keyframes fieldErrorIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Modal shake on error */
.modal-card.modal-shake {
    animation: modalShake 0.3s ease;
}

@keyframes modalShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-5px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
}

/* Button loading spinner */
.btn .btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btnSpin 0.6s linear infinite;
    margin-right: 6px;
    vertical-align: middle;
    flex-shrink: 0;
}

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

/* Disabled submit until fields filled */
.btn-primary.btn-submit-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Success checkmark overlay */
.auth-success-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 255, 136, 0.1);
    border-radius: 12px;
    animation: successFadeIn 0.3s ease;
    z-index: 10;
}

.auth-success-check {
    font-size: 3rem;
    color: var(--neon-green, #00ff88);
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.6);
    animation: successPop 0.4s ease;
}

@keyframes successFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes successPop {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* Modal card needs position:relative for success overlay */
.modal-card {
    position: relative;
}

/* ============================================================================
   AD SLOTS
   ============================================================================ */

.ad-slot {
    max-width: 900px;
    margin: 12px auto;
    text-align: center;
    min-height: 90px;
}

/* ============================================================================
   ENHANCED BUTTON STATES (active, focus-visible)
   @copyright reDim GmbH | @link https://www.redim.de | @contact team@redim.de
   ============================================================================ */

.btn-primary:active:not(:disabled) {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 0 8px rgba(255, 136, 0, 0.3);
    transition-duration: 0.05s;
}

.btn-primary:focus-visible {
    outline: 2px solid var(--neon-orange);
    outline-offset: 3px;
    box-shadow: 0 0 20px rgba(255, 136, 0, 0.5), 0 0 0 4px rgba(255, 136, 0, 0.15);
}

.btn-secondary:active:not(:disabled) {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 0 5px rgba(0, 255, 255, 0.2);
    transition-duration: 0.05s;
}

.btn-secondary:focus-visible {
    outline: 2px solid var(--neon-cyan);
    outline-offset: 3px;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.4), 0 0 0 4px rgba(0, 255, 255, 0.1);
}

.btn-ghost:active:not(:disabled) {
    transform: translateY(1px) scale(0.98);
    transition-duration: 0.05s;
}

.btn-ghost:focus-visible {
    outline: 2px solid var(--neon-green);
    outline-offset: 3px;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3), 0 0 0 4px rgba(0, 255, 136, 0.1);
}

.btn-sm:active:not(:disabled) {
    transform: translateY(1px) scale(0.97);
    transition-duration: 0.05s;
}

.btn-danger:active:not(:disabled) {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 0 8px rgba(255, 0, 68, 0.3);
    transition-duration: 0.05s;
}

.btn-danger:focus-visible {
    outline: 2px solid var(--neon-red);
    outline-offset: 3px;
    box-shadow: 0 0 15px rgba(255, 0, 68, 0.4), 0 0 0 4px rgba(255, 0, 68, 0.1);
}

/* ============================================================================
   ENHANCED FORM INPUTS
   ============================================================================ */

.form-control:focus {
    border-color: var(--neon-cyan) !important;
    box-shadow:
        0 0 10px rgba(0, 255, 255, 0.3),
        0 0 20px rgba(0, 255, 255, 0.1),
        inset 0 0 8px rgba(0, 255, 255, 0.05) !important;
    outline: none !important;
}

.form-control::placeholder {
    color: rgba(0, 255, 255, 0.3) !important;
    transition: color 0.2s ease;
}

.form-control:focus::placeholder {
    color: rgba(0, 255, 255, 0.15) !important;
}

/* ============================================================================
   ENHANCED CARD HOVER EFFECTS
   ============================================================================ */

.dashboard-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 255, 136, 0.2);
    box-shadow:
        0 0 20px rgba(0, 255, 136, 0.15),
        0 8px 32px rgba(0, 0, 0, 0.3);
}

.settings-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 255, 136, 0.2);
    box-shadow:
        0 0 15px rgba(0, 255, 136, 0.1),
        0 6px 24px rgba(0, 0, 0, 0.25);
}

/* ============================================================================
   ACHIEVEMENT POPUP
   ============================================================================ */

.achievement-popup {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(40, 30, 10, 0.95), rgba(60, 45, 10, 0.9));
    border: 2px solid #ffd700;
    border-radius: 10px;
    box-shadow:
        0 0 15px rgba(255, 215, 0, 0.4),
        0 0 30px rgba(255, 215, 0, 0.15),
        0 4px 20px rgba(0, 0, 0, 0.5);
    animation: achievementSlideIn 0.4s ease-out forwards;
    min-width: 280px;
    max-width: 380px;
}

.achievement-popup-out {
    animation: achievementSlideOut 0.5s ease-in forwards;
}

.achievement-popup-icon {
    font-size: 2rem;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.3), transparent);
    border-radius: 50%;
    animation: achievementGlow 2s ease-in-out infinite;
}

.achievement-popup-content {
    flex: 1;
    min-width: 0;
}

.achievement-popup-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #ffd700;
    font-weight: 700;
    margin-bottom: 2px;
}

.achievement-popup-name {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.achievement-popup-desc {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@keyframes achievementSlideIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes achievementSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

@keyframes achievementGlow {
    0%, 100% {
        box-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    }
}

/* ============================================================================
   DAILY REWARD WIDGET
   ============================================================================ */

.daily-reward-widget {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    margin: 16px auto;
    max-width: 520px;
    background: rgba(10, 10, 30, 0.8);
    border: 1px solid rgba(0, 255, 136, 0.15);
    border-radius: 12px;
    backdrop-filter: blur(8px);
}

.daily-reward-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--neon-green);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.daily-reward-days {
    display: flex;
    flex-direction: row;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.daily-reward-day {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.daily-reward-day.claimed {
    background: rgba(0, 255, 136, 0.25);
    border-color: var(--neon-green);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.daily-reward-day.today {
    border-color: var(--neon-green);
    animation: dailyRewardPulse 1.5s ease-in-out infinite;
}

.daily-reward-day.future {
    border-color: rgba(255, 255, 255, 0.1);
    opacity: 0.5;
}

.daily-reward-day-num {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.daily-reward-day-xp {
    font-size: 8px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1;
    margin-top: 2px;
}

.daily-reward-check {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--neon-green);
    color: #000;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.daily-reward-streak {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.daily-reward-claim-btn {
    padding: 8px 24px;
    border: none;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--neon-green), #00cc6a);
    color: #000;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.daily-reward-claim-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
}

.daily-reward-claim-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.daily-reward-claim-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 70%
    );
    animation: dailyRewardShine 3s ease-in-out infinite;
}

.daily-reward-claimed-msg {
    font-size: 12px;
    color: rgba(0, 255, 136, 0.6);
    font-style: italic;
}

.daily-reward-xp-notif {
    font-size: 18px;
    font-weight: 700;
    color: var(--neon-green);
    animation: dailyRewardXpFloat 2s ease-out forwards;
}

.daily-reward-loading {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

@keyframes dailyRewardPulse {
    0%, 100% { box-shadow: 0 0 5px rgba(0, 255, 136, 0.2); }
    50% { box-shadow: 0 0 20px rgba(0, 255, 136, 0.6); border-color: #00ff88; }
}

@keyframes dailyRewardShine {
    0% { transform: translateX(-100%) rotate(45deg); }
    30%, 100% { transform: translateX(100%) rotate(45deg); }
}

@keyframes dailyRewardXpFloat {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-30px); }
}

/* ============================================================================
   QUICK-MATCH BUTTON
   ============================================================================ */

.btn-quick-match {
    background: linear-gradient(135deg, var(--neon-green), #00cc6a);
    color: #000;
    font-weight: 700;
    border: none;
    padding: 10px 28px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-quick-match:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(0, 255, 136, 0.5);
}

.btn-quick-match:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* ============================================================================
   REMATCH BUTTON (game-over overlay)
   ============================================================================ */

.btn-rematch {
    background: linear-gradient(135deg, var(--neon-green), #00cc6a) !important;
    color: #000 !important;
    font-weight: 700;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-rematch:hover:not(:disabled) {
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
    transform: scale(1.05);
}

.btn-rematch:disabled {
    opacity: 0.5;
    cursor: wait;
}

/* ============================================================================
   MOBILE AUTH HEADER
   @copyright reDim GmbH | @link https://www.redim.de | @contact team@redim.de
   ============================================================================ */

@media (max-width: 768px) {
    .auth-header {
        padding: 4px 10px;
        gap: 4px;
        top: 4px;
        border-radius: 16px;
        max-width: calc(100vw - 16px);
    }

    .auth-nav {
        gap: 2px;
        margin-right: 6px;
    }

    .auth-nav-link {
        font-size: 0.7rem;
        padding: 2px 4px;
    }

    .auth-username {
        font-size: 0.75rem;
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .auth-avatar {
        width: 22px;
        height: 22px;
        font-size: 0.6rem;
    }

    .auth-link {
        font-size: 0.75rem;
        padding: 2px 6px;
    }

    .auth-divider {
        font-size: 0.7rem;
    }

    .auth-lang-toggle {
        font-size: 0.6rem;
        padding: 1px 4px;
    }
}

@media (max-width: 480px) {
    .auth-header {
        padding: 3px 8px;
        gap: 2px;
    }

    .auth-nav {
        display: none; /* Hide nav links on very small screens, accessible via dropdown */
    }

    .auth-username {
        max-width: 60px;
    }
}

/* MOBILE PORTRAIT NEON FIXES */
@media (max-width: 480px) {
    .panel-header h1 { font-size: 1.6rem !important; line-height: 1.1 !important; }
    .connection-status { font-size: 0.6rem !important; padding: 3px 6px !important; }
    .panel { box-shadow: 0 0 8px rgba(0,255,255,0.2), inset 0 0 10px rgba(0,255,255,0.02) !important; }
}
