/* --- UI & CHAOS --- */
#internet-chaos {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    font-family: monospace;
    background: #111;
    color: #eee;
}

.chaos-marquee {
    position: absolute;
    top: 5%;
    width: 100%;
    font-size: 24px;
    color: #ff4444;
    opacity: 0.8;
    text-shadow: 1px 1px 3px black;
}

.popup.chaos-box {
    position: absolute;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    border: 1px solid #f00;
    font-size: 12px;
    border-radius: 4px;
    animation: floatChaos 6s ease-in-out infinite;
    max-width: 180px;
    text-align: center;
}

@keyframes floatChaos {

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

    50% {
        transform: translateY(-6px);
    }
}

#ui-container {
    position: fixed;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 10px;
    z-index: 100;
    text-align: right;
}

#powerBarContainer {
    width: 200px;
    height: 15px;
    background: #ddd;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

#powerBar {
    width: 0%;
    height: 100%;
    background: #007bff;
    transition: width 0.2s linear;
}

#powerIcons {
    font-size: 24px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

#shield-ui {
    font-size: 18px;
    color: #00a2ff;
    margin-top: 5px;
    font-weight: bold;
}

.power.active {
    animation: glitch 0.15s infinite;
    display: inline-block;
}

@keyframes glitch {
    0% {
        transform: translate(2px, 0) scale(1.4);
    }

    50% {
        transform: translate(-2px, 0) scale(1.4);
    }

    100% {
        transform: translate(0, 2px) scale(1.4);
    }
}

/* --- CURSEUR & BOUCLIER ORBITAL --- */
#fakeCursor {
    position: absolute;
    width: 15px;
    height: 15px;
    background: red;
    border-radius: 50%;
    pointer-events: none;
    z-index: 101;
    border: 2px solid black;
    transform: translate(-50%, -50%);
}

#shield {
    position: absolute;
    width: 50px;
    height: 50px;
    border: 3px solid #00f2ff;
    border-radius: 50%;
    pointer-events: none;
    z-index: 100;
    display: none;
    box-shadow: 0 0 15px #00f2ff;
    transform: translate(-50%, -50%);
}

.shield-orbit {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    animation: orbitRotate 1.5s linear infinite;
}

.orbit-icon {
    position: absolute;
    font-size: 16px;
    top: 50%;
    left: 50%;
}

.orbit-icon:nth-child(1) {
    transform: translate(-50%, -50%) translateY(-35px);
}

.orbit-icon:nth-child(2) {
    transform: translate(-50%, -50%) rotate(120deg) translateY(-35px);
}

.orbit-icon:nth-child(3) {
    transform: translate(-50%, -50%) rotate(240deg) translateY(-35px);
}

@keyframes orbitRotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* --- ALERTES --- */
#power-alert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 120px;
    z-index: 300;
    pointer-events: none;
    display: none;
    filter: drop-shadow(0 0 20px rgba(255, 0, 0, 0.8));
}

.zoom-in-out {
    display: block !important;
    animation: megaShake 1.5s ease-in-out forwards;
}

@keyframes megaShake {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }

    15% {
        transform: translate(-52%, -48%) scale(1.2);
        opacity: 1;
    }

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

#snail {
    position: absolute;
    font-size: 50px;
    z-index: 50;
    pointer-events: none;
}

#danger-border {
    position: fixed;
    inset: 0;
    border: 0px solid red;
    pointer-events: none;
    z-index: 99;
    transition: border-width 5s linear;
}

#danger-border.active {
    border-width: 200px;
    border-color: rgba(255, 0, 0, 0.5);
}

#startScreen,
#gameOver {
    position: fixed;
    inset: 0;
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 200;
}

#gameOver {
    background: rgba(0, 0, 0, 0.9);
    color: white;
    display: none;
}

button {
    padding: 15px 30px;
    font-size: 20px;
    cursor: pointer;
}

.salt {
    position: absolute;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, white, transparent);
    border-radius: 50%;
    z-index: 10;
    pointer-events: none;
}