/**
 * Proxmox Gravity Chat - Styles
 * 
 * Responsives Layout mit Zero-G, Vortex und Earthquake visuellen Effekten
 */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    overflow: hidden;
    transition: background 0.5s ease;
}

/* Zero-G Hintergrund-Effekt */
body.zero-g-active {
    background: linear-gradient(135deg, #2d1b4e 0%, #1a0a2e 50%, #0d0621 100%);
    animation: cosmicPulse 2s ease-in-out infinite;
}

@keyframes cosmicPulse {

    0%,
    100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.2);
    }
}

/* Vortex Hintergrund-Effekt */
body.vortex-active {
    background: linear-gradient(135deg, #1a0a2e 0%, #0d0621 50%, #000 100%);
}

body.vortex-active::after {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(147, 51, 234, 0.8) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    animation: vortexPulse 0.5s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes vortexPulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0.5;
    }
}

/* Earthquake Hintergrund-Effekt */
body.earthquake-active {
    animation: shake 0.1s linear infinite;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px) translateY(2px);
    }

    50% {
        transform: translateX(5px) translateY(-2px);
    }

    75% {
        transform: translateX(-3px) translateY(1px);
    }
}

/* Score-Anzeige */
#score-display {
    position: fixed;
    top: 15px;
    right: 20px;
    z-index: 101;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

#score-value {
    color: #f39c12;
    font-size: 22px;
}

/* Eingabebereich */
#input-area {
    position: fixed;
    top: 0;
    left: 0;
    right: 150px;
    z-index: 100;
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#username {
    width: 120px;
    padding: 12px 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

#username:focus {
    border-color: #00d4ff;
    background: rgba(0, 212, 255, 0.1);
}

#message-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

#message-input:focus {
    border-color: #00d4ff;
    background: rgba(0, 212, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

#message-input::placeholder,
#username::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

#send-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
}

#send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 212, 255, 0.6);
}

#send-btn:active {
    transform: translateY(0);
}

/* Vortex Button */
#vortex-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.4);
    user-select: none;
}

#vortex-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(155, 89, 182, 0.6);
}

#vortex-btn:active,
#vortex-btn.active {
    background: linear-gradient(135deg, #8e44ad 0%, #6c3483 100%);
    transform: scale(0.95);
    box-shadow: 0 2px 10px rgba(155, 89, 182, 0.8);
}

/* Zero-G Indikator */
#zero-g-indicator {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    z-index: 99;
    padding: 15px 30px;
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    border-radius: 50px;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 5px 30px rgba(155, 89, 182, 0.6);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

#zero-g-indicator.active {
    transform: translateX(-50%) scale(1);
    opacity: 1;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateX(-50%) scale(1) translateY(0);
    }

    50% {
        transform: translateX(-50%) scale(1) translateY(-10px);
    }
}

#zero-g-timer {
    margin-top: 5px;
    font-size: 14px;
    opacity: 0.8;
}

/* Vortex Indikator */
#vortex-indicator {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    z-index: 99;
    padding: 15px 30px;
    background: linear-gradient(135deg, #6c3483 0%, #4a235a 100%);
    border-radius: 50px;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 5px 30px rgba(108, 52, 131, 0.8);
    opacity: 0;
    transition: all 0.3s ease;
}

#vortex-indicator.active {
    transform: translateX(-50%) scale(1);
    opacity: 1;
}

/* Earthquake Indikator */
#earthquake-indicator {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    z-index: 99;
    padding: 15px 30px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border-radius: 50px;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 5px 30px rgba(231, 76, 60, 0.8);
    opacity: 0;
    transition: all 0.3s ease;
}

#earthquake-indicator.active {
    transform: translateX(-50%) scale(1);
    opacity: 1;
}

/* Canvas Container */
#canvas-container {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

#canvas-container canvas {
    display: block;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    #input-area {
        flex-wrap: wrap;
        padding: 10px;
        gap: 8px;
        right: 0;
    }

    #score-display {
        top: auto;
        bottom: 10px;
        right: 10px;
        font-size: 14px;
        padding: 8px 15px;
    }

    #username {
        width: 100%;
    }

    #message-input {
        flex: 1;
        min-width: 0;
    }

    #vortex-btn,
    #send-btn {
        padding: 12px 15px;
        font-size: 14px;
    }
}

/* Sterne-Hintergrund für Zero-G */
body.zero-g-active::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(2px 2px at 20px 30px, #fff, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(2px 2px at 160px 120px, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(1px 1px at 230px 80px, #fff, transparent),
        radial-gradient(2px 2px at 300px 150px, rgba(255, 255, 255, 0.7), transparent);
    background-size: 350px 200px;
    animation: starsMove 20s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes starsMove {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(200px);
    }
}
