body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: 'Orbitron', sans-serif;
    background: radial-gradient(ellipse at center, #0a0a1a 0%, #000000 70%) !important;
    color: #fff !important;
}

body {
    background: radial-gradient(ellipse at center, #0a0a1a 0%, #000000 70%);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    padding: 20px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="50" height="50" patternUnits="userSpaceOnUse"><path d="M 50 0 L 0 0 0 50" fill="none" stroke="%23001144" stroke-width="1" opacity="0.3"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    pointer-events: none;
    z-index: -1;
}

#main-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.menu-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
    transform: perspective(1000px) rotateX(15deg);
    transition: transform 0.5s ease, opacity 0.5s ease;
    opacity: 1;
}

.menu-container.hidden {
    opacity: 0;
    pointer-events: none;
    position: absolute; /* Remove from layout */
}

.menu-container:hover {
    transform: perspective(1000px) rotateX(0deg);
}

.title {
    font-size: 4.5rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-shadow: 
        0 0 5px #0077ff,
        0 0 10px #0077ff,
        0 0 20px #0077ff,
        0 0 40px #0055cc,
        0 0 80px #0055cc;
    animation: title-flicker 3s infinite alternate;
    position: relative;
}

.title::after {
    content: attr(data-text);
    position: absolute;
    left: 2px;
    top: 2px;
    color: rgba(0, 255, 255, 0.3);
    z-index: -1;
    animation: glitch 0.3s infinite linear alternate-reverse;
}

@keyframes title-flicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% {
        text-shadow:
            0 0 4px #fff,
            0 0 11px #fff,
            0 0 19px #fff,
            0 0 40px #0077ff,
            0 0 80px #0077ff,
            0 0 90px #0077ff,
            0 0 100px #0055cc,
            0 0 150px #0055cc;
    }
    20%, 24%, 55% {       
        text-shadow: none;
    }
}

@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); }
}

/* --- Screen Shake and Boss Effects --- */
.screen-shake {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

body.insurrection-active::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    box-shadow: inset 0 0 150px 50px rgba(100, 0, 0, 0.7);
    animation: pulse-vignette 3s infinite alternate;
}

@keyframes pulse-vignette {
    from { box-shadow: inset 0 0 150px 50px rgba(100, 0, 0, 0.7); }
    to { box-shadow: inset 0 0 200px 75px rgba(150, 0, 0, 0.8); }
}

.phase4-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20000;
    transition: opacity 1.5s ease-in-out;
}

.phase4-dialogue-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ddd;
    font-size: 2rem;
    font-family: 'Orbitron', sans-serif;
    width: 80%;
    max-width: 800px;
    text-align: center;
    text-shadow: 0 0 10px #aaa;
    z-index: 20001;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.laser-warning {
    position: fixed;
    background: linear-gradient(90deg, transparent, rgba(255, 0, 0, 0.5), transparent);
    height: 10px;
    z-index: 10001;
    transform-origin: 0 50%;
    animation: laser-warn-anim 1.5s ease-out forwards;
}

@keyframes laser-warn-anim {
    0% { width: 0%; opacity: 0; }
    50% { width: 100%; opacity: 1; }
    100% { width: 100%; opacity: 0; }
}

.laser-beam {
    position: fixed;
    background: linear-gradient(90deg, transparent, #fff, #ff8888, #fff, transparent);
    height: 15px;
    box-shadow: 0 0 20px #ff0000, 0 0 40px #ff0000, 0 0 60px #ffffff;
    z-index: 10001;
    transform-origin: 0 50%;
    animation: laser-fire-anim 0.2s ease-out forwards;
}

@keyframes laser-fire-anim {
    from { opacity: 1; }
    to { opacity: 0; }
}

.expanding-ring {
    position: fixed;
    border: 40px solid #ff4400;
    border-radius: 50%;
    box-shadow: 0 0 20px #ff4400, inset 0 0 15px #ff4400, 0 0 50px #ff8800;
    z-index: 10001;
    pointer-events: none;
    transform: translate(-50%, -50%);
    animation: ring-expand 4s linear forwards;
}

@keyframes ring-expand {
    from {
        width: 0;
        height: 0;
        opacity: 1;
    }
    to {
        width: 300vw;
        height: 300vw;
        opacity: 0;
    }
}

.click-burst-particle {
    position: fixed;
    width: 8px;
    height: 8px;
    background-color: #ffc400;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10001;
    animation: click-burst 0.5s ease-out forwards;
    box-shadow: 0 0 10px #ffc400;
}

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

/* --- Hacker Lobby --- */
#hacker-chat-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 80%;
    max-width: 600px;
    height: 40vh;
    overflow-y: auto;
    padding-right: 10px;
}

#hacker-chat-list li {
    background: rgba(10, 10, 30, 0.8);
    border: 2px solid #00aaff;
    padding: 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
}

#hacker-chat-list li:hover {
    background-color: #00aaff;
    color: #0a0a1a;
    transform: scale(1.05);
    box-shadow: 0 0 15px #00aaff;
}
/* --- End Hacker Lobby --- */

/* --- Hacker Stats Panel --- */
#hacker-stats-panel {
    position: fixed;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, rgba(20, 0, 0, 0.95), rgba(40, 0, 0, 0.9));
    border: 2px solid #ff0000;
    border-radius: 12px;
    padding: 15px 20px;
    z-index: 1500;
    color: #ff0000;
    font-family: 'Orbitron', sans-serif;
    min-width: 250px;
    box-shadow: 
        0 0 25px rgba(255, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

#hacker-stats-panel.hidden {
    display: none;
}

#hacker-stats-panel h3 {
    margin: 0 0 15px 0;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: hacker-glow 2s ease-in-out infinite alternate;
}

@keyframes hacker-glow {
    0% { text-shadow: 0 0 5px #ff0000; }
    100% { text-shadow: 0 0 15px #ff0000, 0 0 25px #ff0000; }
}

.hacker-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.hacker-stat label {
    color: #ffcccc;
    font-weight: bold;
}

#hacker-exp-bar, #system-corruption-bar {
    width: 120px;
    height: 15px;
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid #ff0000;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

#hacker-exp-fill, #system-corruption-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff0000, #ff6600);
    border-radius: 8px;
    transition: width 1s ease;
    position: relative;
    overflow: hidden;
}

#hacker-exp-fill::after, #system-corruption-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: stat-shine 2s infinite;
}

@keyframes stat-shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.active-viruses {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 0, 0, 0.3);
}

#virus-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.virus-indicator {
    background: rgba(255, 0, 0, 0.3);
    border: 1px solid #ff0000;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.7rem;
    color: #fff;
    animation: virus-pulse 1.5s infinite;
}

@keyframes virus-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* --- Hacker Abilities Styling --- */
.admin-button.hacker-ability {
    background: linear-gradient(135deg, rgba(20, 0, 0, 0.6), rgba(40, 0, 0, 0.4));
    border-color: #ff0000;
    color: #ff0000;
}

.admin-button.hacker-ability:not(:disabled):hover {
    background: linear-gradient(135deg, #ff0000, #ff4d4d);
    color: #fff;
    box-shadow: 0 0 25px rgba(255, 0, 0, 0.8);
}

/* --- Level Up Notification --- */
.level-up-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.95), rgba(255, 165, 0, 0.9));
    border: 3px solid #ffd700;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    color: #000;
    font-family: 'Orbitron', sans-serif;
    z-index: 5000;
    box-shadow: 
        0 0 50px rgba(255, 215, 0, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    animation: level-up-appear 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.level-up-notification.fade-out {
    animation: level-up-fade 1s ease-out forwards;
}

@keyframes level-up-appear {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.3) rotateZ(-180deg);
        filter: blur(10px);
    }
    60% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1) rotateZ(10deg);
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotateZ(0deg);
        filter: blur(0px);
    }
}

@keyframes level-up-fade {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8) translateY(-50px);
    }
}

.level-up-notification h3 {
    margin: 0 0 10px 0;
    font-size: 2rem;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    animation: level-text-glow 1s ease-in-out infinite alternate;
}

@keyframes level-text-glow {
    0% { text-shadow: 0 0 10px rgba(255, 215, 0, 0.8); }
    100% { text-shadow: 0 0 20px rgba(255, 215, 0, 1), 0 0 30px rgba(255, 165, 0, 0.8); }
}

.level-up-notification p {
    margin: 5px 0;
    font-size: 1.2rem;
    font-weight: bold;
}

/* --- Boss Fight UI --- */
#boss-container {
    position: fixed;
    top: 80px; /* Lowered to make space for reputation bar */
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 800px;
    background-color: rgba(0,0,0,0.5);
    border: 2px solid #ff0000;
    border-radius: 10px;
    padding: 10px 20px;
    z-index: 1500;
    display: flex;
    flex-direction: column;
    gap: 5px;
    box-shadow: 0 0 20px #ff0000;
}

#boss-container.hidden {
    display: none;
}

#boss-name {
    font-size: 1.2rem;
    color: #ff0000;
    text-transform: uppercase;
    text-shadow: 0 0 10px #ff0000;
    text-align: left;
}

#boss-hp-bar {
    width: 100%;
    height: 30px;
    background-color: rgba(255, 0, 0, 0.2);
    border: 1px solid #ff0000;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
}

#boss-hp-fill {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #ff0000, #ff4d4d);
    border-radius: 5px;
    transition: width 0.5s ease-in-out;
}

#boss-hp-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-weight: bold;
    text-shadow: 1px 1px 2px #000;
}

#glitch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3000;
    background: url(https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExZDV4dW5idjhmbW53eGU5enNwdXg2ZnJ2cm44ZHlxd3c5NXQ3ZHczZSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/l2JJEBceb0p1i2e08/giphy.gif);
    opacity: 0.1;
}

#glitch-overlay.hidden {
    display: none;
}

#boss-fight-actions.hidden {
    display: none;
}
/* --- End Boss Fight UI --- */

@keyframes flicker {
  0%, 18%, 22%, 25%, 53%, 57%, 100% {
    text-shadow:
      0 0 4px #fff,
      0 0 11px #fff,
      0 0 19px #fff,
      0 0 40px #0077ff,
      0 0 80px #0077ff,
      0 0 90px #0077ff,
      0 0 100px #0055cc,
      0 0 150px #0055cc;
  }
  20%, 24%, 55% {       
    text-shadow: none;
  }
}

/* --- We See You Boss Styles --- */
@keyframes float-ban {
    0% { 
        top: -80px; 
        left: 10%; 
        transform: rotate(0deg) scale(1);
    }
    25% { 
        top: 25vh; 
        left: 70%; 
        transform: rotate(90deg) scale(1.1);
    }
    50% { 
        top: 60vh; 
        left: 30%; 
        transform: rotate(180deg) scale(0.9);
    }
    75% { 
        top: 35vh; 
        left: 80%; 
        transform: rotate(270deg) scale(1.05);
    }
    100% { 
        top: -80px; 
        left: 10%; 
        transform: rotate(360deg) scale(1);
    }
}

@keyframes float-mute {
    0% { 
        top: 100vh; 
        right: 10%; 
        transform: rotate(0deg) scale(1);
    }
    25% { 
        top: 55vh; 
        right: 60%; 
        transform: rotate(-90deg) scale(1.2);
    }
    50% { 
        top: 25vh; 
        right: 35%; 
        transform: rotate(-180deg) scale(0.8);
    }
    75% { 
        top: 45vh; 
        right: 75%; 
        transform: rotate(-270deg) scale(1.1);
    }
    100% { 
        top: 100vh; 
        right: 10%; 
        transform: rotate(-360deg) scale(1);
    }
}

@keyframes wesee-particle {
    0% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.5) rotate(180deg);
    }
    100% {
        opacity: 0;
        transform: scale(0.5) rotate(360deg) translateY(-50px);
    }
}

.floating-action-btn:hover {
    transform: scale(1.3) !important;
    box-shadow: 0 0 40px currentColor !important;
    z-index: 2600;
}

.spam-highlight {
    animation: spam-pulse 0.5s ease-in-out infinite alternate;
    border: 3px solid #ff0066 !important;
    background: rgba(255, 0, 102, 0.3) !important;
}

@keyframes spam-pulse {
    0% {
        box-shadow: 0 0 10px #ff0066;
        border-color: #ff0066;
    }
    100% {
        box-shadow: 0 0 25px #ff0066, 0 0 35px #ff0066;
        border-color: #ff3399;
    }
}

.shake-effect {
    animation: shake-violent 0.2s ease-in-out infinite;
    border: 3px solid #ff4400 !important;
    background: rgba(255, 68, 0, 0.3) !important;
}

@keyframes shake-violent {
    0%, 100% { transform: translateX(0) translateY(0) rotate(0deg); }
    10% { transform: translateX(-5px) translateY(-3px) rotate(-1deg); }
    20% { transform: translateX(5px) translateY(3px) rotate(1deg); }
    30% { transform: translateX(-3px) translateY(-5px) rotate(-2deg); }
    40% { transform: translateX(3px) translateY(5px) rotate(2deg); }
    50% { transform: translateX(-7px) translateY(-2px) rotate(-1deg); }
    60% { transform: translateX(7px) translateY(2px) rotate(1deg); }
    70% { transform: translateX(-4px) translateY(-4px) rotate(-2deg); }
    80% { transform: translateX(4px) translateY(4px) rotate(2deg); }
    90% { transform: translateX(-2px) translateY(-1px) rotate(-1deg); }
}

.button-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

button {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    padding: 15px 40px;
    min-width: 300px;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.3), 
        rgba(0, 119, 255, 0.1));
    color: #00aaff;
    border: 3px solid #00aaff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 
        0 0 15px rgba(0, 170, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    transform: perspective(1000px) rotateX(0deg) translateZ(0);
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(0, 170, 255, 0.4), 
        transparent);
    transition: left 0.6s ease;
}

button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00aaff, transparent);
    transition: all 0.4s ease;
    transform: translateX(-50%);
}

button:hover::before {
    left: 100%;
}

button:hover::after {
    width: 100%;
}

button:hover {
    background: linear-gradient(135deg, #00aaff, #0099ff);
    color: #0a0a1a;
    box-shadow: 
        0 0 40px rgba(0, 170, 255, 0.8),
        0 12px 30px rgba(0, 170, 255, 0.5);
    transform: perspective(1000px) rotateX(-5deg) translateY(-8px) translateZ(20px) scale(1.02);
    border-color: #fff;
    animation: button-glow 1s ease-out;
}

@keyframes button-glow {
    0% {
        box-shadow: 
            0 0 40px rgba(0, 170, 255, 0.8),
            0 12px 30px rgba(0, 170, 255, 0.5);
    }
    50% {
        box-shadow: 
            0 0 60px rgba(0, 170, 255, 1),
            0 15px 40px rgba(0, 170, 255, 0.7);
    }
    100% {
        box-shadow: 
            0 0 40px rgba(0, 170, 255, 0.8),
            0 12px 30px rgba(0, 170, 255, 0.5);
    }
}

button:active {
    transform: perspective(1000px) rotateX(-2deg) translateY(-3px) translateZ(10px) scale(0.98);
    box-shadow: 
        0 0 25px rgba(0, 170, 255, 0.6),
        0 6px 20px rgba(0, 170, 255, 0.4);
    animation: button-press 0.2s ease-out;
}

@keyframes button-press {
    0% { transform: perspective(1000px) rotateX(-2deg) translateY(-3px) translateZ(10px) scale(0.98); }
    50% { transform: perspective(1000px) rotateX(0deg) translateY(0px) translateZ(5px) scale(0.96); }
    100% { transform: perspective(1000px) rotateX(-2deg) translateY(-3px) translateZ(10px) scale(0.98); }
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: transparent;
    color: #666;
    border-color: #666;
    box-shadow: none;
}

button:disabled:hover {
    background-color: transparent;
    color: #666;
    border-color: #666;
    box-shadow: none;
    transform: none;
}

#language-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

#language-button {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    padding: 10px 16px;
    min-width: auto;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.4), 
        rgba(0, 119, 255, 0.1));
    color: #00aaff;
    border: 2px solid #00aaff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 
        0 0 10px rgba(0, 170, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

#language-button:hover {
    background: linear-gradient(135deg, #00aaff, #0099ff);
    color: #0a0a1a;
    box-shadow: 
        0 0 20px rgba(0, 170, 255, 0.6),
        0 4px 15px rgba(0, 170, 255, 0.3);
    transform: translateY(-2px);
    border-color: #fff;
}

#language-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: linear-gradient(135deg, 
        rgba(10, 10, 30, 0.95), 
        rgba(0, 0, 0, 0.9));
    border: 2px solid #00aaff;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 
        0 8px 25px rgba(0, 170, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    min-width: 150px;
    animation: dropdown-appear 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    visibility: visible;
    opacity: 1;
}

@keyframes dropdown-appear {
    0% {
        opacity: 0;
        transform: translateY(-10px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#language-dropdown a {
    color: #00aaff;
    padding: 12px 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
    overflow: hidden;
}

#language-dropdown a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        #ffc400, 
        transparent);
    transition: left 0.3s ease;
}

#language-dropdown a:hover::before {
    left: 100%;
}

#language-dropdown a:hover {
    background: linear-gradient(135deg, 
        rgba(0, 170, 255, 0.2), 
        rgba(0, 170, 255, 0.1));
    color: #fff;
    transform: translateX(5px);
}

#language-dropdown.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

#participants-list li.selected {
    background: linear-gradient(135deg, rgba(0, 170, 255, 0.3), rgba(0, 100, 200, 0.2));
    border-color: #00aaff;
    color: #fff;
    box-shadow: 
        0 0 20px rgba(0, 170, 255, 0.5),
        inset 0 0 20px rgba(0, 170, 255, 0.1);
    transform: translateX(10px) scale(1.05) rotateY(-3deg);
    animation: selected-glow 2s ease-in-out infinite;
}

#participants-list li[data-id="creator-boss"].creator-charging {
    pointer-events: auto !important; /* Make the target clickable */
    animation: creator-charge-pulse 1s infinite alternate;
    border: 3px solid #ffc400 !important;
    box-shadow: 0 0 25px #ffc400, inset 0 0 15px rgba(255, 196, 0, 0.5) !important;
}

@keyframes creator-charge-pulse {
    from { transform: scale(1.05); }
    to { transform: scale(1.15); }
}

#participants-list li[data-id="creator-boss"].creator-phase3-position {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(2.5) !important;
    z-index: 5000 !important;
    animation: creator-phase3-entrance 3s ease-out;
    pointer-events: none;
}

@keyframes creator-phase3-entrance {
    0% { transform: translate(-50%, -50%) scale(1.5); }
    60% { transform: translate(-50%, -50%) scale(2.8); }
    100% { transform: translate(-50%, -50%) scale(2.5); }
}

#participants-list li.flying {
    position: fixed;
    z-index: 100;
    margin: 0;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}

.player-charge-orb {
    position: fixed;
    width: 30px;
    height: 30px;
    background-color: #ff0044;
    border-radius: 50%;
    z-index: 10002;
    pointer-events: none;
    transform-origin: center center;
    box-shadow: 0 0 10px #ff0044, 0 0 20px #ff0044, 0 0 30px #ff0044, inset 0 0 5px #fff;
    transition: transform 0.05s linear; /* Smooth following */
}

.player-charge-orb.exploding {
    animation: orb-explode 0.3s ease-out forwards;
}

@keyframes orb-explode {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(3); opacity: 0; }
}

#participants-list li.insurrection-target {
    pointer-events: auto !important; /* Make the target clickable */
    animation: pulse-red-strong 0.7s infinite alternate;
    border: 3px solid #ff0000 !important;
    box-shadow: 0 0 25px #ff0000, inset 0 0 15px rgba(255, 0, 0, 0.5) !important;
}

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

#participants-list li.spinning .participant-inner-wrapper {
    animation: spin 2s linear infinite;
}

.boss-projectile {
    position: fixed;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle at 30% 30%, #ff8888, #ff2222);
    border-radius: 50%;
    box-shadow: 0 0 15px #ff2222, 0 0 5px white, inset 0 0 3px white;
    z-index: 10002;
    pointer-events: none;
    transform-origin: center center;
}

.meteor-projectile {
    position: fixed;
    width: 25px;
    height: 25px;
    background: radial-gradient(circle at 30% 30%, #fff, #ffc400, #ff4d4d);
    border-radius: 50%;
    box-shadow: 0 0 10px #ffc400, 0 0 20px #ff4d4d, 0 0 30px #ff0000;
    z-index: 10002;
    pointer-events: none;
    transform-origin: center center;
    filter: brightness(1.5);
}

.meteor-projectile::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 180px;
    height: 4px;
    background: linear-gradient(to right, rgba(255, 100, 100, 0.9), transparent);
    border-radius: 2px;
    transform: translateY(-50%) rotate(var(--angle-deg));
    transform-origin: 0% 50%; /* Rotate around the starting point of the tail */
}

.meteor-projectile.green {
    width: 30px; /* Bigger and easier to catch */
    height: 30px;
    background: radial-gradient(circle at 30% 30%, #fff, #aaffc4, #2ecc71);
    box-shadow: 0 0 10px #aaffc4, 0 0 20px #2ecc71, 0 0 30px #00ff88;
}

.meteor-projectile.green::after {
    background: linear-gradient(to right, rgba(46, 204, 113, 0.9), transparent);
}

.meteor-projectile.homing {
    animation: homing-pulse 0.5s infinite alternate;
}

@keyframes homing-pulse {
    from { box-shadow: 0 0 15px #2ecc71, 0 0 5px white; }
    to { box-shadow: 0 0 30px #2ecc71, 0 0 10px white, 0 0 40px #2ecc71; }
}

.projectile-hit-effect {
    position: fixed;
    width: 60px;
    height: 60px;
    border: 4px solid #ff4d4d;
    border-radius: 50%;
    z-index: 10003;
    pointer-events: none;
    animation: hit-effect 0.3s ease-out forwards;
    transform: translate(-50%, -50%);
}

@keyframes hit-effect {
    from { transform: translate(-50%, -50%) scale(0); opacity: 1; }
    to { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* --- Chat Styles moved to chat.css, messages.css, and modals.css --- */

#reputation-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 600px;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.6), 
        rgba(10, 10, 30, 0.8));
    border: 2px solid #00aaff;
    border-radius: 12px;
    padding: 12px 18px;
    z-index: 1500;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 
        0 0 25px rgba(0, 170, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.5s ease;
    backdrop-filter: blur(15px);
}

#reputation-container.hidden {
    opacity: 0;
    pointer-events: none;
}

#reputation-label {
    font-size: 1rem;
    color: #00aaff;
    text-transform: uppercase;
    white-space: nowrap;
}

#reputation-bar {
    width: 100%;
    height: 25px;
    background-color: rgba(0, 170, 255, 0.2);
    border: 1px solid #00aaff;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
}

#reputation-fill {
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, 
        #0077ff, 
        #00aaff, 
        #0099ff);
    border-radius: 6px;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

#reputation-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: reputation-shine 2s infinite;
}

@keyframes reputation-shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

#player-hp-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 600px;
    background: linear-gradient(135deg, rgba(0, 20, 0, 0.8), rgba(10, 30, 10, 0.9));
    border: 2px solid #2ecc71;
    border-radius: 12px;
    padding: 12px 18px;
    z-index: 1500;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 0 25px rgba(46, 204, 113, 0.4);
    backdrop-filter: blur(10px);
}

#player-hp-container.hidden {
    display: none;
}

#player-hp-label {
    font-size: 1rem;
    color: #2ecc71;
    text-transform: uppercase;
    white-space: nowrap;
}

#player-hp-bar {
    width: 100%;
    height: 25px;
    background-color: rgba(46, 204, 113, 0.2);
    border: 1px solid #2ecc71;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
}

#player-hp-fill {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    border-radius: 6px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

#player-hp-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-weight: bold;
    text-shadow: 1px 1px 2px #000;
}

#reputation-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-weight: bold;
    text-shadow: 1px 1px 2px #000;
}

/* --- Tutorial Notification --- */
.tutorial-notification {
    background: linear-gradient(135deg, 
        rgba(0, 170, 255, 0.15), 
        rgba(0, 119, 255, 0.1));
    border: 2px solid #00aaff;
    border-radius: 12px;
    padding: 20px 25px;
    color: #fff;
    box-shadow: 
        0 8px 25px rgba(0, 170, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    width: 400px;
    max-width: 90vw;
    text-align: left;
    animation: tutorial-slide-in 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    position: relative;
    overflow: hidden;
    border-left: 4px solid #00aaff;
}

.tutorial-notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        #00aaff, 
        transparent);
    animation: tutorial-highlight 3s ease-in-out;
}

.tutorial-notification h4 {
    margin: 0 0 10px;
    color: #00aaff;
    text-transform: uppercase;
    font-size: 1.1rem;
}

.tutorial-notification p {
    margin: 0 0 15px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #e6f3ff;
}

.tutorial-close-btn {
    background: linear-gradient(135deg, #00aaff, #0099ff);
    border: 1px solid #00aaff;
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.3s ease;
    min-width: auto;
}

.tutorial-close-btn:hover {
    background: linear-gradient(135deg, #0099ff, #00ccff);
    box-shadow: 0 0 15px rgba(0, 170, 255, 0.6);
    transform: translateY(-2px);
}

@keyframes tutorial-slide-in {
    0% {
        opacity: 0;
        transform: translateX(150%) rotateY(25deg) scale(0.9);
        filter: blur(3px);
    }
    60% {
        opacity: 0.9;
        transform: translateX(-10px) rotateY(-3deg) scale(1.01);
        filter: blur(1px);
    }
    100% {
        opacity: 1;
        transform: translateX(0) rotateY(0deg) scale(1);
        filter: blur(0px);
    }
}

@keyframes tutorial-highlight {
    0%, 85% { left: -100%; }
    100% { left: 100%; }
}

#task-notification-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2500;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

.task-notification {
    background: linear-gradient(135deg, 
        rgba(10, 10, 30, 0.98), 
        rgba(0, 0, 0, 0.95));
    border: 2px solid #ffc400;
    border-radius: 12px;
    padding: 16px 22px;
    color: #fff;
    box-shadow: 
        0 8px 25px rgba(255, 196, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    width: 320px;
    max-width: 80vw;
    text-align: left;
    animation: notification-slide-in 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, 
               notification-fade-out 0.8s ease-in 7s forwards;
    position: relative;
    overflow: hidden;
}

.task-notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        #ffc400, 
        transparent);
    animation: notification-highlight 4s ease-in-out;
}

.task-notification h4 {
    margin: 0 0 5px;
    color: #ffc400;
    text-transform: uppercase;
}

.task-notification p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

@keyframes notification-slide-in {
    0% {
        opacity: 0;
        transform: translateX(150%) rotateY(45deg) scale(0.8);
        filter: blur(5px);
    }
    60% {
        opacity: 0.9;
        transform: translateX(-10px) rotateY(-5deg) scale(1.02);
        filter: blur(1px);
    }
    100% {
        opacity: 1;
        transform: translateX(0) rotateY(0deg) scale(1);
        filter: blur(0px);
    }
}

@keyframes notification-fade-out {
    0% {
        opacity: 1;
        transform: translateX(0) rotateY(0deg) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(150%) rotateY(45deg) scale(0.8);
        filter: blur(3px);
    }
}

@keyframes notification-highlight {
    0%, 90% { left: -100%; }
    100% { left: 100%; }
}

/* --- Promo Link --- */
#promo-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 101; /* Above language switcher */
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.1));
    border: 2px solid #ffd700;
    border-radius: 10px;
    padding: 10px 20px;
    transition: opacity 0.5s ease, transform 0.5s ease;
    animation: promo-pulse 3s infinite alternate;
}

#promo-container a {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: #ffd700;
    text-decoration: none;
    font-weight: bold;
    text-shadow: 0 0 10px #ffd700, 0 0 20px #ffae00;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

#promo-container a:hover {
    color: #fff;
    text-shadow: 0 0 15px #fff, 0 0 25px #ffd700;
}

@keyframes promo-pulse {
    from {
        transform: scale(1);
        box-shadow: 0 0 15px #ffd700;
    }
    to {
        transform: scale(1.05);
        box-shadow: 0 0 30px #ffae00;
    }
}

#promo-container.hidden {
    opacity: 0;
    transform: scale(0.5);
    pointer-events: none;
}
/* --- End Promo Link --- */

/* --- Console --- */
#console-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    font-family: monospace;
    color: #00ff00;
    border-bottom: 2px solid #00ff00;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
}

#console-container.hidden {
    display: none;
}

#console-output {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
    font-size: 0.9rem;
    line-height: 1.4;
}

#console-output div {
    white-space: pre-wrap;
    word-wrap: break-word;
}
#console-output .log-input {
    color: #aaa;
}
#console-output .log-output {
    color: #00ff00;
}
#console-output .log-error {
    color: #ff4d4d;
}
#console-output .log-warn {
    color: #ffc400;
}
#console-output .log-info {
    color: #00aaff;
}

#console-input-container {
    display: flex;
    align-items: center;
    padding: 5px 10px;
    border-top: 1px solid #00ff00;
    position: relative;
}

#console-input-container > span {
    margin-right: 5px;
}

#console-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: #00ff00;
    font-family: monospace;
    font-size: 1rem;
    position: relative;
    z-index: 2;
}

#console-autocomplete {
    position: absolute;
    top: 5px; /* Match input padding */
    left: 26px; /* Match span width + input padding */
    font-family: monospace;
    font-size: 1rem;
    color: rgba(0, 255, 0, 0.3); /* Faint color */
    pointer-events: none; /* Make it non-interactive */
    z-index: 1;
    line-height: 1.5; /* Align with input */
    padding: 0;
    white-space: pre;
}

#console-input:focus {
    outline: none;
}

#console-suggestions {
    position: absolute;
    bottom: 100%;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.9);
    border: 1px solid #00ff00;
    max-height: 200px;
    overflow-y: auto;
    width: calc(100% - 20px);
}
#console-suggestions.hidden {
    display: none;
}

.suggestion-item {
    padding: 5px 10px;
    cursor: pointer;
    border-bottom: 1px solid #003300;
}
.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover, .suggestion-item.selected {
    background-color: #00ff00;
    color: #000;
}

.suggestion-item .suggestion-desc {
    color: #aaa;
    font-size: 0.8rem;
    margin-left: 10px;
}

.suggestion-item.selected .suggestion-desc {
    color: #333;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .title {
        font-size: 2.8rem;
    }

    button {
        font-size: 1.5rem;
        padding: 12px 25px;
        min-width: 280px;
    }

    #language-switcher {
        top: 10px;
        right: 10px;
    }
}