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

body {
    font-family: 'Courier New', monospace;
    overflow: hidden;
    height: 100vh;
    background: #000;
    user-select: none;
}

.title-screen {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, #0a0a1a 0%, #000000 100%);
    overflow: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.title-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.lobby-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, #0a0a1a 0%, #000000 100%);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    z-index: 100;
}

.lobby-screen.active {
    opacity: 1;
    visibility: visible;
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(0, 150, 255, 0.3), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(0, 255, 200, 0.3), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(150, 0, 255, 0.3), transparent),
        radial-gradient(1px 1px at 80% 10%, rgba(0, 255, 150, 0.3), transparent),
        radial-gradient(2px 2px at 90% 40%, rgba(100, 200, 255, 0.3), transparent),
        radial-gradient(1px 1px at 33% 60%, rgba(255, 0, 200, 0.3), transparent),
        radial-gradient(2px 2px at 10% 80%, rgba(0, 200, 255, 0.3), transparent);
    background-size: 200% 200%;
    animation: particleMove 20s ease-in-out infinite;
    opacity: 0.6;
}

@keyframes particleMove {
    0%, 100% {
        background-position: 0% 0%, 100% 100%, 50% 50%, 80% 10%, 90% 40%, 33% 60%, 10% 80%;
    }
    50% {
        background-position: 100% 100%, 0% 0%, 50% 50%, 20% 90%, 10% 60%, 67% 40%, 90% 20%;
    }
}

.content {
    position: relative;
    z-index: 10;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.title-subtitle {
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    color: rgba(0, 255, 255, 0.7);
    text-shadow: 
        0 0 5px rgba(0, 255, 255, 0.5),
        0 0 10px rgba(0, 255, 255, 0.3);
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    margin-bottom: 20px;
    opacity: 0.8;
    animation: subtitleGlow 3s ease-in-out infinite;
}

@keyframes subtitleGlow {
    0%, 100% {
        opacity: 0.8;
        text-shadow: 
            0 0 5px rgba(0, 255, 255, 0.5),
            0 0 10px rgba(0, 255, 255, 0.3);
    }
    50% {
        opacity: 1;
        text-shadow: 
            0 0 8px rgba(0, 255, 255, 0.7),
            0 0 15px rgba(0, 255, 255, 0.5),
            0 0 20px rgba(0, 255, 255, 0.3);
    }
}

.title {
    font-size: 8rem;
    font-weight: 900;
    letter-spacing: 0.3em;
    color: #00ffff;
    text-shadow: 
        0 0 10px #00ffff,
        0 0 20px #00ffff,
        0 0 30px #00ffff,
        0 0 40px #0080ff,
        0 0 70px #0080ff,
        0 0 100px #0080ff;
    animation: titlePulse 2s ease-in-out infinite;
    text-transform: uppercase;
    font-family: 'Courier New', monospace;
    position: relative;
}

.lobby-title {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 0.3em;
    color: #00ffff;
    text-shadow: 
        0 0 10px #00ffff,
        0 0 20px #00ffff,
        0 0 30px #00ffff,
        0 0 40px #0080ff;
    animation: titlePulse 2s ease-in-out infinite;
    text-transform: uppercase;
    font-family: 'Courier New', monospace;
    position: relative;
}

.back-button {
    margin-top: 20px;
    opacity: 0.8;
    font-size: 1rem;
    padding: 12px 40px;
}

.back-button:hover {
    opacity: 1;
}

@keyframes titlePulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.02);
    }
}

.subtitle-line {
    width: 300px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00ffff, transparent);
    box-shadow: 0 0 10px #00ffff;
    animation: lineGlow 2s ease-in-out infinite;
}

@keyframes lineGlow {
    0%, 100% {
        opacity: 0.6;
        width: 300px;
    }
    50% {
        opacity: 1;
        width: 400px;
    }
}

.button-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.sci-button {
    position: relative;
    padding: 15px 60px;
    background: rgba(0, 20, 40, 0.8);
    border: 2px solid #00ffff;
    color: #00ffff;
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
    box-shadow: 
        0 0 10px rgba(0, 255, 255, 0.5),
        inset 0 0 10px rgba(0, 255, 255, 0.1);
}

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

.sci-button:hover::before {
    left: 100%;
}

.sci-button:hover {
    background: rgba(0, 40, 80, 0.9);
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.8),
        0 0 40px rgba(0, 255, 255, 0.4),
        inset 0 0 20px rgba(0, 255, 255, 0.2);
    transform: translateY(-2px);
}

.sci-button:active {
    transform: translateY(0);
    box-shadow: 
        0 0 10px rgba(0, 255, 255, 0.6),
        inset 0 0 10px rgba(0, 255, 255, 0.3);
}

.button-text {
    position: relative;
    z-index: 2;
}

.button-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.4), transparent);
    border-radius: 50%;
    transition: width 0.3s ease, height 0.3s ease;
    z-index: 1;
}

.sci-button:hover .button-glow {
    width: 200px;
    height: 200px;
}

.scan-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 255, 255, 0.03) 0px,
        transparent 2px,
        transparent 4px,
        rgba(0, 255, 255, 0.03) 6px
    );
    pointer-events: none;
    animation: scanMove 8s linear infinite;
    z-index: 5;
}

@keyframes scanMove {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(20px);
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    position: relative;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    background: rgba(0, 10, 20, 0.95);
    border: 2px solid #00ffff;
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.5),
        0 0 40px rgba(0, 255, 255, 0.3),
        inset 0 0 20px rgba(0, 255, 255, 0.1);
    padding: 0;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal-box {
    transform: scale(1);
}

.modal-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 255, 0.03) 2px,
        rgba(0, 255, 255, 0.03) 4px
    );
    pointer-events: none;
    z-index: 1;
}

.modal-header {
    position: relative;
    padding: 20px 30px;
    border-bottom: 2px solid #00ffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 20, 40, 0.5);
    z-index: 2;
    flex-shrink: 0;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 0.2em;
    color: #00ffff;
    text-shadow: 
        0 0 10px #00ffff,
        0 0 20px #00ffff;
    text-transform: uppercase;
    margin: 0;
}

.modal-close {
    background: transparent;
    border: 2px solid #00ffff;
    color: #00ffff;
    font-size: 2rem;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
    padding: 0;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.modal-close:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 
        0 0 15px rgba(0, 255, 255, 0.6),
        inset 0 0 10px rgba(0, 255, 255, 0.1);
    transform: rotate(90deg);
}

.modal-content {
    position: relative;
    padding: 30px;
    color: #00ffff;
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: justify;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    z-index: 2;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

.modal-content p {
    margin: 0;
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(0, 20, 40, 0.5);
    border-left: 1px solid rgba(0, 255, 255, 0.3);
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 255, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.5);
    box-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
}

.modal-navigation {
    position: relative;
    padding: 20px 30px;
    border-top: 2px solid #00ffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 20, 40, 0.5);
    z-index: 2;
    min-height: 60px;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.modal-nav-btn {
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid #00ffff;
    color: #00ffff;
    font-size: 1rem;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
    pointer-events: auto;
    user-select: none;
    display: inline-block;
    visibility: visible;
    opacity: 1;
    flex-shrink: 0;
    white-space: nowrap;
    min-width: fit-content;
}

.modal-nav-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 
        0 0 15px rgba(0, 255, 255, 0.6),
        inset 0 0 10px rgba(0, 255, 255, 0.1);
    transform: translateY(-2px);
}

.modal-nav-btn:active {
    transform: translateY(0);
}

.modal-page-indicator {
    color: #00ffff;
    font-size: 1rem;
    font-weight: bold;
    letter-spacing: 0.1em;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    flex-shrink: 0;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .modal-navigation {
        padding: 15px 20px;
        gap: 8px;
    }
    
    .modal-nav-btn {
        font-size: 0.9rem;
        padding: 8px 16px;
        letter-spacing: 0.05em;
    }
    
    .modal-page-indicator {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .modal-navigation {
        padding: 12px 15px;
        gap: 6px;
        flex-direction: row;
        justify-content: space-between;
    }
    
    .modal-nav-btn {
        font-size: 0.85rem;
        padding: 8px 12px;
        letter-spacing: 0;
    }
    
    .modal-page-indicator {
        font-size: 0.85rem;
    }
}

.modal-content h3 {
    color: #00ffff;
    font-size: 1.3rem;
    margin-top: 20px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.modal-content h3:first-child {
    margin-top: 0;
}

.modal-content ul {
    margin: 15px 0;
    padding-left: 25px;
}

.modal-content li {
    margin: 8px 0;
    line-height: 1.6;
}

.modal-content strong {
    color: #a0ffff;
    text-shadow: 0 0 5px rgba(160, 255, 255, 0.5);
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 255, 0.5);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

/* Responsive design */
@media (max-width: 768px) {
    .title {
        font-size: 4rem;
        letter-spacing: 0.2em;
    }
    
    .subtitle-line {
        width: 200px;
    }
    
    .sci-button {
        padding: 12px 40px;
        font-size: 1rem;
    }

    .modal-box {
        width: 95%;
        max-height: 85vh;
    }

    .modal-header {
        padding: 15px 20px;
    }

    .modal-title {
        font-size: 1.2rem;
    }

    .modal-content {
        padding: 20px;
        font-size: 1rem;
    }

    .lobby-title {
        font-size: 2rem;
        letter-spacing: 0.2em;
    }

    .sci-input {
        font-size: 1.2rem;
        padding: 12px 15px;
    }
}

/* Lobby Area Styles */
.lobby-area {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, #0a0a1a 0%, #000000 100%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    z-index: 200;
}

.lobby-area.active {
    opacity: 1;
    visibility: visible;
}

.lobby-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(0, 150, 255, 0.2), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(0, 255, 200, 0.2), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(150, 0, 255, 0.2), transparent),
        radial-gradient(1px 1px at 80% 10%, rgba(0, 255, 150, 0.2), transparent);
    background-size: 200% 200%;
    animation: particleMove 20s ease-in-out infinite;
    opacity: 0.4;
    z-index: 1;
}

.lobby-grid {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1200px;
    height: 800px;
    background: 
        linear-gradient(rgba(0, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    border: 2px solid rgba(0, 255, 255, 0.3);
    box-shadow: 
        0 0 30px rgba(0, 255, 255, 0.3),
        inset 0 0 30px rgba(0, 255, 255, 0.1);
    z-index: 2;
}

.lobby-border {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1200px;
    height: 800px;
    border: 3px solid #00ffff;
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.6),
        inset 0 0 20px rgba(0, 255, 255, 0.2);
    z-index: 3;
    pointer-events: none;
}

.lobby-border::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border: 1px solid rgba(0, 255, 255, 0.4);
    box-shadow: 
        0 0 10px rgba(0, 255, 255, 0.4),
        inset 0 0 10px rgba(0, 255, 255, 0.1);
}

.lobby-hud {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
}

.hud-panel {
    background: rgba(0, 10, 20, 0.9);
    border: 2px solid #00ffff;
    padding: 15px 25px;
    box-shadow: 
        0 0 15px rgba(0, 255, 255, 0.5),
        inset 0 0 10px rgba(0, 255, 255, 0.1);
    min-width: 200px;
}

.hud-title {
    font-size: 1rem;
    font-weight: bold;
    letter-spacing: 0.2em;
    color: #00ffff;
    text-shadow: 
        0 0 10px #00ffff,
        0 0 20px #00ffff;
    text-transform: uppercase;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
}

.hud-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    gap: 8px;
}

.info-label {
    color: rgba(0, 255, 255, 0.7);
    letter-spacing: 0.1em;
}

.info-value {
    color: #00ffff;
    font-weight: bold;
    text-shadow: 0 0 5px #00ffff;
    flex: 1;
}

.copy-button {
    background: transparent;
    border: 1px solid rgba(0, 255, 255, 0.5);
    color: #00ffff;
    cursor: pointer;
    padding: 4px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 3px;
    opacity: 0.7;
}

.copy-button:hover {
    opacity: 1;
    border-color: #00ffff;
    background: rgba(0, 255, 255, 0.1);
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.4);
}

.copy-button:active {
    transform: scale(0.95);
}

.copy-button.copied {
    border-color: #00ff00;
    color: #00ff00;
    opacity: 1;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.6);
}

.copy-button svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}

/* Player Styles */
.player {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid var(--player-color, #00ffff);
    background: radial-gradient(circle, var(--player-color, #00ffff), transparent);
    box-shadow: 
        0 0 15px var(--player-color, #00ffff),
        0 0 30px var(--player-color, #00ffff),
        inset 0 0 10px rgba(255, 255, 255, 0.3);
    z-index: 5;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease;
    pointer-events: none;
}

.player::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--player-color, #00ffff);
    box-shadow: 0 0 10px var(--player-color, #00ffff);
}

.player::after {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 10px solid var(--player-color, #00ffff);
    filter: drop-shadow(0 0 5px var(--player-color, #00ffff));
}

.player-red {
    --player-color: #ff0040;
}

.player-blue {
    --player-color: #0080ff;
}

.player-darkblue {
    --player-color: #004080;
}

.player-green {
    --player-color: #00ff80;
}

.player-purple {
    --player-color: #8000ff;
}

.players-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1200px;
    height: 800px;
    z-index: 5;
    pointer-events: none;
}

.player-code {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 0.2em;
    color: var(--player-color, #00ffff);
    text-shadow: 
        0 0 5px var(--player-color, #00ffff),
        0 0 10px var(--player-color, #00ffff);
    font-family: 'Courier New', monospace;
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.7);
    padding: 2px 8px;
    border: 1px solid var(--player-color, #00ffff);
    border-radius: 3px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

/* Join Lobby Form Styles */
.join-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.form-label {
    color: #00ffff;
    font-size: 1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-shadow: 0 0 5px #00ffff;
}

.sci-input {
    width: 100%;
    max-width: 300px;
    padding: 15px 20px;
    background: rgba(0, 20, 40, 0.8);
    border: 2px solid #00ffff;
    color: #00ffff;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 0.3em;
    text-align: center;
    text-transform: uppercase;
    font-family: 'Courier New', monospace;
    box-shadow: 
        0 0 10px rgba(0, 255, 255, 0.5),
        inset 0 0 10px rgba(0, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.sci-input:focus {
    outline: none;
    background: rgba(0, 40, 80, 0.9);
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.8),
        0 0 40px rgba(0, 255, 255, 0.4),
        inset 0 0 20px rgba(0, 255, 255, 0.2);
}

.sci-input::placeholder {
    color: rgba(0, 255, 255, 0.4);
    letter-spacing: 0.2em;
}

.error-message {
    color: #ff0040;
    font-size: 0.9rem;
    text-shadow: 0 0 5px #ff0040;
    min-height: 20px;
    text-align: center;
}

/* Start Game Button */
.start-game-container {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: none;
}

.start-game-button {
    padding: 12px 50px;
    font-size: 1.1rem;
    opacity: 0.5;
    cursor: not-allowed;
    transition: all 0.3s ease;
}

.start-game-button:not(:disabled) {
    opacity: 1;
    cursor: pointer;
}

.start-game-button:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 
        0 0 25px rgba(0, 255, 255, 0.9),
        0 0 50px rgba(0, 255, 255, 0.5),
        inset 0 0 25px rgba(0, 255, 255, 0.3);
}

.start-game-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Countdown Screen */
.countdown-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.countdown-screen.active {
    opacity: 1;
    visibility: visible;
}

.countdown-content {
    text-align: center;
}

.countdown-title {
    font-size: 2.5rem;
    font-weight: bold;
    letter-spacing: 0.3em;
    color: #00ffff;
    text-shadow: 
        0 0 20px #00ffff,
        0 0 40px #00ffff,
        0 0 60px #00ffff;
    text-transform: uppercase;
    margin-bottom: 40px;
    font-family: 'Courier New', monospace;
}

.countdown-number {
    font-size: 12rem;
    font-weight: 900;
    color: #00ffff;
    text-shadow: 
        0 0 30px #00ffff,
        0 0 60px #00ffff,
        0 0 90px #00ffff,
        0 0 120px #0080ff;
    font-family: 'Courier New', monospace;
    animation: countdownPulse 0.5s ease-in-out;
}

@keyframes countdownPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Black Screen */
.black-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000000;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.black-screen.active {
    opacity: 1;
    visibility: visible;
}

/* Role Reveal Screen */
.role-reveal-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(ellipse at center, #0a0a1a 0%, #000000 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.role-reveal-screen.active {
    opacity: 1;
    visibility: visible;
}

.role-reveal-screen {
    transition: opacity 1s ease, visibility 1s ease;
}

.role-content {
    text-align: center;
    max-width: 800px;
    padding: 40px;
}

.role-title {
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: 0.2em;
    color: #00ffff;
    text-shadow: 
        0 0 20px currentColor,
        0 0 40px currentColor,
        0 0 60px currentColor;
    text-transform: uppercase;
    margin-bottom: 40px;
    font-family: 'Courier New', monospace;
    animation: roleReveal 1s ease-in-out;
}

@keyframes roleReveal {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.role-description {
    font-size: 1.5rem;
    color: rgba(0, 255, 255, 0.9);
    letter-spacing: 0.1em;
    line-height: 1.8;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    font-family: 'Courier New', monospace;
    animation: roleReveal 1s ease-in-out 0.3s both;
}

/* Responsive for role reveal */
@media (max-width: 768px) {
    .countdown-title {
        font-size: 1.8rem;
    }
    
    .countdown-number {
        font-size: 8rem;
    }
    
    .role-title {
        font-size: 2.5rem;
    }
    
    .role-description {
        font-size: 1.2rem;
    }
}

/* Game Map Styles */
.game-map {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, #0a0a1a 0%, #000000 100%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    z-index: 300;
}

.game-map.active {
    opacity: 1;
    visibility: visible;
}

.map-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(0, 150, 255, 0.2), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(0, 255, 200, 0.2), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(150, 0, 255, 0.2), transparent),
        radial-gradient(1px 1px at 80% 10%, rgba(0, 255, 150, 0.2), transparent);
    background-size: 200% 200%;
    animation: particleMove 20s ease-in-out infinite;
    opacity: 0.4;
    z-index: 1;
}

.map-world {
    position: absolute;
    top: 0;
    left: 0;
    width: 4800px;
    height: 3200px;
    transition: transform 0.1s ease-out;
    z-index: 2;
}

.map-rooms {
    position: absolute;
    top: 0;
    left: 0;
    width: 4800px;
    height: 3200px;
}

.map-room {
    position: absolute;
    background: 
        linear-gradient(rgba(0, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    border: 3px solid #00ffff;
    box-shadow: 
        0 0 30px rgba(0, 255, 255, 0.5),
        inset 0 0 30px rgba(0, 255, 255, 0.1);
    background-color: rgba(0, 10, 20, 0.3);
}

.map-room::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border: 1px solid rgba(0, 255, 255, 0.4);
    box-shadow: 
        0 0 15px rgba(0, 255, 255, 0.4),
        inset 0 0 15px rgba(0, 255, 255, 0.1);
    pointer-events: none;
}

.room-label {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 0.2em;
    color: rgba(0, 255, 255, 0.6);
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    z-index: 1;
}

.map-obstacles {
    position: absolute;
    top: 0;
    left: 0;
    width: 4800px;
    height: 3200px;
    z-index: 3;
    pointer-events: none;
}

.map-obstacle {
    position: absolute;
    background: rgba(0, 20, 40, 0.8);
    border: 2px solid rgba(0, 255, 255, 0.4);
    box-shadow: 
        0 0 15px rgba(0, 255, 255, 0.3),
        inset 0 0 10px rgba(0, 255, 255, 0.1);
    pointer-events: none;
}

/* Lab Table */
.obstacle-lab-table {
    background: 
        linear-gradient(rgba(0, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    background-color: rgba(0, 30, 50, 0.9);
    border: 3px solid rgba(0, 255, 255, 0.5);
}

.obstacle-lab-table::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 20%;
    width: 20px;
    height: 10px;
    background: rgba(0, 255, 255, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.5);
}

.obstacle-lab-table::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 20%;
    width: 20px;
    height: 10px;
    background: rgba(0, 255, 255, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.5);
}

/* Equipment Rack */
.obstacle-equipment-rack {
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 10px,
            rgba(0, 255, 255, 0.2) 10px,
            rgba(0, 255, 255, 0.2) 12px
        );
    background-color: rgba(0, 40, 60, 0.9);
    border-left: 3px solid rgba(0, 255, 255, 0.6);
    border-right: 3px solid rgba(0, 255, 255, 0.6);
}

.obstacle-equipment-rack::before {
    content: '⚡';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    color: rgba(0, 255, 255, 0.6);
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

/* Computer Terminal */
.obstacle-computer-terminal {
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid rgba(0, 255, 255, 0.6);
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.4),
        inset 0 0 20px rgba(0, 255, 255, 0.1);
}

.obstacle-computer-terminal::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    height: 50px;
    background: rgba(0, 255, 0, 0.2);
    border: 1px solid rgba(0, 255, 0, 0.4);
    box-shadow: inset 0 0 10px rgba(0, 255, 0, 0.3);
}

.obstacle-computer-terminal::after {
    content: '█';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(0, 255, 255, 0.8);
    font-size: 0.8rem;
    animation: blink 1s infinite;
}

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

/* Storage Cabinet */
.obstacle-storage-cabinet {
    background: 
        linear-gradient(rgba(0, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 15px 15px;
    background-color: rgba(0, 25, 40, 0.9);
    border: 2px solid rgba(0, 255, 255, 0.4);
}

.obstacle-storage-cabinet::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 10px;
    width: 8px;
    height: 8px;
    background: rgba(0, 255, 255, 0.5);
    border-radius: 50%;
    box-shadow: 
        30px 0 0 rgba(0, 255, 255, 0.5),
        60px 0 0 rgba(0, 255, 255, 0.5);
}

/* Scientific Instrument */
.obstacle-scientific-instrument {
    background: radial-gradient(circle at center, rgba(0, 255, 255, 0.2), transparent);
    background-color: rgba(0, 50, 80, 0.9);
    border: 3px solid rgba(0, 255, 255, 0.5);
    border-radius: 10px;
    box-shadow: 
        0 0 25px rgba(0, 255, 255, 0.4),
        inset 0 0 25px rgba(0, 255, 255, 0.1);
}

.obstacle-scientific-instrument::before {
    content: '⚛';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: rgba(0, 255, 255, 0.6);
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
}

/* Warning Barrier */
.obstacle-warning-barrier {
    background: 
        repeating-linear-gradient(
            45deg,
            rgba(255, 0, 0, 0.3),
            rgba(255, 0, 0, 0.3) 10px,
            rgba(255, 200, 0, 0.3) 10px,
            rgba(255, 200, 0, 0.3) 20px
        );
    border: 2px solid rgba(255, 0, 0, 0.6);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.4);
}

.obstacle-warning-barrier::before {
    content: '⚠';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: rgba(255, 200, 0, 1);
    text-shadow: 0 0 10px rgba(255, 200, 0, 0.8);
}

/* Panel - Black */
.obstacle-panel-black {
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid rgba(0, 150, 255, 0.8);
    box-shadow: 
        0 0 15px rgba(0, 150, 255, 0.5),
        inset 0 0 10px rgba(0, 150, 255, 0.2);
}

.obstacle-panel-black::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px solid rgba(0, 150, 255, 0.4);
    box-shadow: inset 0 0 5px rgba(0, 150, 255, 0.3);
}

/* Panel - Green */
.obstacle-panel-green {
    background: rgba(0, 100, 0, 0.9);
    border: 2px solid rgba(0, 150, 255, 0.8);
    box-shadow: 
        0 0 15px rgba(0, 150, 255, 0.5),
        inset 0 0 10px rgba(0, 255, 0, 0.2);
}

.obstacle-panel-green::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px solid rgba(0, 255, 0, 0.4);
    box-shadow: inset 0 0 5px rgba(0, 255, 0, 0.3);
}

.obstacle-panel-green::after {
    content: '●';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    color: rgba(0, 255, 0, 0.8);
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.8);
}

/* Wall */
.obstacle-wall {
    background: rgba(0, 30, 50, 0.95);
    border: 2px solid rgba(0, 255, 255, 0.6);
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.4),
        inset 0 0 20px rgba(0, 255, 255, 0.1);
    z-index: 4;
}

.obstacle-wall::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            rgba(0, 255, 255, 0.1) 0px,
            transparent 2px,
            transparent 4px,
            rgba(0, 255, 255, 0.1) 6px
        );
    pointer-events: none;
}

.map-players-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 4800px;
    height: 3200px;
    z-index: 5;
    pointer-events: none;
}

/* Objectives Panel */
.objectives-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 300px;
    background: rgba(0, 20, 40, 0.95);
    border: 2px solid #00ffff;
    border-radius: 8px;
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.5),
        inset 0 0 20px rgba(0, 255, 255, 0.1);
    z-index: 600;
    font-family: 'Courier New', monospace;
    color: #00ffff;
    overflow: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.objectives-panel.closed {
    transform: translateX(calc(100% - 8px));
    opacity: 0.7;
}

.objectives-panel.closed .objectives-content {
    display: none;
}

.objectives-panel.closed .objectives-header {
    display: none;
}

.objectives-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(0, 255, 255, 0.1);
    border-bottom: 1px solid #00ffff;
}

.objectives-title {
    margin: 0;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

/* Objectives Hint */
.objectives-hint {
    position: fixed;
    bottom: 20px;
    left: 20px;
    padding: 8px 16px;
    background: rgba(0, 20, 40, 0.8);
    border: 1px solid #00ffff;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #00ffff;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.6);
    z-index: 600;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
    display: none;
}

.game-map.active .objectives-hint {
    display: block;
}

/* Minigame Overlay */
.minigame-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.minigame-overlay.active {
    display: flex;
}

.minigame-container {
    background: rgba(0, 20, 40, 0.95);
    border: 2px solid #00ffff;
    border-radius: 8px;
    box-shadow: 
        0 0 30px rgba(0, 255, 255, 0.6),
        inset 0 0 20px rgba(0, 255, 255, 0.1);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    color: #00ffff;
}

/* Large Vortex Machine Minigame */
.minigame-container.vortex-machine {
    max-width: 90%;
    width: 90%;
    max-height: 90vh;
    padding: 30px;
    background: linear-gradient(135deg, #001122 0%, #003344 100%);
    border: 4px solid #00ffff;
    box-shadow: 
        0 0 60px rgba(0, 255, 255, 0.8),
        inset 0 0 40px rgba(0, 255, 255, 0.2);
}

/* Game Timer */
.game-timer {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    text-align: center;
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ffff;
    border-radius: 8px;
    padding: 15px 30px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
    display: none; /* Hidden by default, shown when game map is active */
}

.timer-label {
    font-size: 14px;
    color: #00ffff;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.timer-display {
    font-size: 36px;
    font-weight: bold;
    color: #00ffff;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
    font-variant-numeric: tabular-nums;
}

/* Shaking animation */
@keyframes shake {
    0%, 100% { transform: translate(0, 0); }
    10%, 30%, 50%, 70%, 90% { transform: translate(-10px, -10px); }
    20%, 40%, 60%, 80% { transform: translate(10px, 10px); }
}

.game-map.shaking {
    animation: shake 0.5s ease-in-out infinite;
}

.vortex-step-header {
    font-size: 28px;
    font-weight: bold;
    color: #00ffff;
    text-align: center;
    margin-bottom: 25px;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
    letter-spacing: 3px;
}

.vortex-instructions {
    font-size: 20px;
    text-align: center;
    margin-bottom: 30px;
    padding: 15px;
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid #00ffff;
    border-radius: 4px;
}

.vortex-number-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 600px;
    margin: 0 auto 30px;
}

.vortex-number-btn {
    font-size: 32px;
    padding: 30px;
    min-height: 80px;
    background: rgba(0, 255, 255, 0.1);
    border: 3px solid #00ffff;
    color: #00ffff;
    cursor: pointer;
    transition: all 0.3s;
}

.vortex-number-btn:hover {
    background: rgba(0, 255, 255, 0.3);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
}

.vortex-color-sequence {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.vortex-color-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.vortex-color-btn {
    cursor: pointer;
    transition: all 0.3s;
    font-size: 18px;
    font-weight: bold;
    color: #000;
}

.vortex-color-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.8);
}

.vortex-switches {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    max-width: 800px;
    margin: 0 auto 30px;
}

.vortex-switch {
    font-size: 20px;
    padding: 25px;
    min-height: 70px;
    background: rgba(0, 255, 255, 0.1);
    border: 3px solid #00ffff;
    color: #00ffff;
    cursor: pointer;
    transition: all 0.3s;
}

.vortex-switch:hover {
    background: rgba(0, 255, 255, 0.3);
    transform: scale(1.1);
}

.vortex-wire-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 700px;
    margin: 0 auto 30px;
}

.vortex-wire-btn {
    font-size: 18px;
    padding: 25px;
    min-height: 70px;
    background: rgba(0, 255, 255, 0.1);
    border: 3px solid #00ffff;
    color: #00ffff;
    cursor: pointer;
    transition: all 0.3s;
}

.vortex-wire-btn:hover:not(:disabled) {
    background: rgba(0, 255, 255, 0.3);
    transform: scale(1.1);
}

.vortex-wire-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.vortex-action-btn {
    font-size: 32px;
    padding: 30px 60px;
    background: linear-gradient(135deg, #00ffff 0%, #0088ff 100%);
    border: 4px solid #00ffff;
    color: #000;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin: 0 auto 30px;
    display: block;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.6);
}

.vortex-action-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 50px rgba(0, 255, 255, 1);
}

.vortex-progress {
    font-size: 24px;
    text-align: center;
    padding: 15px;
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid #00ffff;
    border-radius: 4px;
    font-weight: bold;
}

/* Mole Map Overlay */
.mole-map-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1500;
    display: none;
    align-items: center;
    justify-content: center;
    font-family: 'Courier New', monospace;
}

.mole-map-overlay.active {
    display: flex;
}

.mole-map-container {
    background: linear-gradient(135deg, #001122 0%, #003344 100%);
    border: 3px solid #ff0040;
    border-radius: 8px;
    box-shadow: 
        0 0 40px rgba(255, 0, 64, 0.6),
        inset 0 0 30px rgba(255, 0, 64, 0.2);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    color: #ff0040;
}

.mole-map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(255, 0, 64, 0.1);
    border-bottom: 2px solid #ff0040;
}

.mole-map-title {
    margin: 0;
    font-size: 24px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 20px rgba(255, 0, 64, 0.8);
}

.mole-map-close {
    background: rgba(255, 0, 64, 0.2);
    border: 2px solid #ff0040;
    color: #ff0040;
    font-size: 24px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

.mole-map-close:hover {
    background: rgba(255, 0, 64, 0.4);
    transform: scale(1.1);
}

.mole-map-content {
    padding: 20px;
}

.mole-map-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.mole-map-room-btn {
    background: rgba(255, 0, 64, 0.1);
    border: 2px solid #ff0040;
    color: #ff0040;
    padding: 15px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
}

.mole-map-room-btn:hover:not(:disabled) {
    background: rgba(255, 0, 64, 0.3);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 0, 64, 0.6);
}

.mole-map-room-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.mole-map-room-btn.door-closed {
    background: rgba(255, 0, 0, 0.3);
    border-color: #ff0000;
    color: #ff0000;
    animation: pulse 1s ease-in-out infinite;
}

.mole-map-room-btn.door-cooldown {
    background: rgba(255, 100, 0, 0.2);
    border-color: #ff6400;
    color: #ff6400;
}

.mole-map-info {
    text-align: center;
    font-size: 14px;
    color: #ff0040;
    padding: 10px;
    background: rgba(255, 0, 64, 0.1);
    border: 1px solid #ff0040;
    border-radius: 4px;
}

/* Mole Map Tabs */
.mole-map-tabs {
    display: flex;
    border-bottom: 2px solid #ff0040;
    background: rgba(255, 0, 64, 0.1);
}

.mole-map-tab {
    flex: 1;
    padding: 15px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #ff0040;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
}

.mole-map-tab:hover {
    background: rgba(255, 0, 64, 0.2);
}

.mole-map-tab.active {
    border-bottom-color: #ff0040;
    background: rgba(255, 0, 64, 0.2);
    color: #ff0040;
    text-shadow: 0 0 10px rgba(255, 0, 64, 0.8);
}

.mole-map-tab-content {
    display: none;
    padding: 20px;
}

.mole-map-tab-content.active {
    display: block;
}

.mole-map-other-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

.mole-map-other-btn {
    padding: 20px 30px;
    background: rgba(255, 0, 64, 0.1);
    border: 2px solid #ff0040;
    color: #ff0040;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 4px;
}

.mole-map-other-btn:hover:not(:disabled) {
    background: rgba(255, 0, 64, 0.3);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 0, 64, 0.6);
}

.mole-map-other-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.mole-map-other-btn.cooldown {
    background: rgba(255, 100, 0, 0.2);
    border-color: #ff6400;
    color: #ff6400;
}

.mole-map-other-btn.disabled {
    background: rgba(255, 0, 0, 0.3);
    border-color: #ff0000;
    color: #ff0000;
}

/* Power Outage Overlay */
.power-outage-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 500;
    pointer-events: none;
    display: none;
    transition: opacity 1s ease;
}

.power-outage-overlay.active {
    display: block;
}

/* Player Light Circle */
.player-light-circle {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
    box-shadow: 0 0 100px rgba(255, 255, 255, 0.5), inset 0 0 50px rgba(255, 255, 255, 0.2);
    pointer-events: none;
    z-index: 501;
    transform: translate(-50%, -50%);
    animation: lightFlicker 2s ease-in-out infinite;
}

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

/* Spectating Overlay */
.spectating-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 600;
    pointer-events: none;
    display: none;
}

.spectating-overlay.active {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: 20px;
    padding-left: 20px;
}

.spectating-text {
    font-family: 'Courier New', monospace;
    font-size: 48px;
    font-weight: bold;
    color: #ff0040;
    text-shadow: 0 0 20px #ff0040, 0 0 40px #ff0040, 0 0 60px #ff0040;
    text-transform: uppercase;
    letter-spacing: 4px;
    animation: pulse 2s ease-in-out infinite;
    transition: opacity 1s ease;
}

.spectating-overlay.fade-out .spectating-text {
    opacity: 0;
}

/* Closed door walls */
.map-obstacle.obstacle-closed-door {
    background: linear-gradient(135deg, #330000 0%, #660000 100%);
    border: 2px solid #ff0000;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.6);
    animation: pulse 1s ease-in-out infinite;
}

.minigame-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(0, 255, 255, 0.1);
    border-bottom: 1px solid #00ffff;
}

.minigame-title {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

.minigame-close {
    background: transparent;
    border: 1px solid #00ffff;
    color: #00ffff;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.minigame-close:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.minigame-content {
    padding: 24px;
}

.minigame-instructions {
    margin-bottom: 20px;
    font-size: 14px;
    color: #a0ffff;
    text-align: center;
}

.minigame-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.minigame-btn {
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid #00ffff;
    color: #00ffff;
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-family: 'Courier New', monospace;
}

.minigame-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

.minigame-action-btn {
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid #00ffff;
    color: #00ffff;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-family: 'Courier New', monospace;
    width: 100%;
    margin-bottom: 20px;
}

.minigame-action-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

.minigame-progress {
    text-align: center;
    font-size: 14px;
    color: #a0ffff;
    margin-top: 20px;
}

.minigame-drag-area {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    justify-content: center;
    flex-wrap: wrap;
    max-height: 80px;
    overflow-y: auto;
}

.drag-item {
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid #00ffff;
    color: #00ffff;
    padding: 10px 15px;
    cursor: move;
    border-radius: 4px;
    user-select: none;
}

.drag-item:active {
    opacity: 0.5;
}

.minigame-slots {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    justify-content: center;
    flex-wrap: wrap;
    max-height: 100px;
    overflow-y: auto;
}

.drop-slot {
    background: rgba(0, 255, 255, 0.05);
    border: 2px dashed #00ffff;
    color: #00ffff;
    padding: 20px;
    min-width: 100px;
    min-height: 60px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.minigame-switches {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.minigame-switch {
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid #00ffff;
    color: #00ffff;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-family: 'Courier New', monospace;
}

.minigame-switch:hover {
    background: rgba(0, 255, 255, 0.2);
}

.minigame-number-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.minigame-number-btn {
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid #00ffff;
    color: #00ffff;
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-family: 'Courier New', monospace;
}

.minigame-number-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

.objectives-list li.completed {
    color: rgba(0, 255, 255, 0.5);
    text-decoration: line-through;
}

.objective-arrow {
    cursor: pointer;
    margin-right: 8px;
    color: #00ffff;
    font-size: 14px;
    user-select: none;
    display: inline-block;
    transition: transform 0.2s ease;
    position: absolute;
    left: 0;
}

.objective-arrow:hover {
    color: #a0ffff;
    transform: scale(1.2);
}

.objective-text {
    display: inline;
    margin-left: 20px;
}

.objective-room-info {
    display: block;
    margin-top: 5px;
    margin-left: 18px;
    font-size: 11px;
    color: #a0ffff;
    font-style: italic;
}

.minigame-color-sequence {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.minigame-color-buttons {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.minigame-color-btn {
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.minigame-color-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

/* Vortex Terminal */
.map-obstacle.obstacle-vortex-terminal {
    background: linear-gradient(135deg, #001122 0%, #003344 100%);
    border: 3px solid #00ffff;
    box-shadow: 
        0 0 30px rgba(0, 255, 255, 0.6),
        inset 0 0 30px rgba(0, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.map-obstacle.obstacle-vortex-terminal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            rgba(0, 255, 255, 0.1) 0px,
            transparent 2px,
            transparent 4px,
            rgba(0, 255, 255, 0.1) 6px
        );
    pointer-events: none;
}

.map-obstacle.obstacle-vortex-terminal::after {
    content: 'VORTEX';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Courier New', monospace;
    font-size: 24px;
    font-weight: bold;
    color: #00ffff;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
    letter-spacing: 4px;
}

/* Warning Barrier Completed State */
.map-obstacle.obstacle-warning-barrier.barrier-completed {
    background: linear-gradient(135deg, #001100 0%, #003300 100%);
    border-color: #00ff00;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
}

/* Win/Lose Screen */
.win-lose-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    font-family: 'Courier New', monospace;
}

.win-lose-screen.active {
    display: flex;
}

.win-lose-content {
    text-align: center;
    animation: pulse 2s ease-in-out infinite;
}

.win-lose-title {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 0 0 30px currentColor;
    letter-spacing: 4px;
}

.win-lose-description {
    font-size: 24px;
    color: #a0ffff;
    text-shadow: 0 0 15px rgba(160, 255, 255, 0.6);
}

.vortex-step-header {
    font-size: 18px;
    font-weight: bold;
    color: #00ffff;
    text-align: center;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
    letter-spacing: 2px;
}

/* Wire grid for electrical minigame */
.minigame-wire-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.minigame-wire-btn {
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid #00ffff;
    color: #00ffff;
    padding: 12px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-family: 'Courier New', monospace;
}

.minigame-wire-btn:hover:not(:disabled) {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

.minigame-wire-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.objectives-content {
    padding: 16px;
    max-height: 400px;
    overflow-y: auto;
}

.objectives-content::-webkit-scrollbar {
    width: 6px;
}

.objectives-content::-webkit-scrollbar-track {
    background: rgba(0, 255, 255, 0.1);
    border-radius: 3px;
}

.objectives-content::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 255, 0.5);
    border-radius: 3px;
}

.objectives-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 255, 0.7);
}

.objectives-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.objectives-list li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    font-size: 12px;
    line-height: 1.5;
    color: #a0ffff;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}

.objectives-list li:last-child {
    border-bottom: none;
}

.objectives-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #00ffff;
    font-size: 14px;
}

.objectives-list li.empty {
    color: rgba(0, 255, 255, 0.5);
    font-style: italic;
}

.objectives-list li.empty::before {
    content: '';
}

.objectives-list li.has-arrow::before {
    content: '';
}

/* Camera Spots */
.camera-spot {
    position: absolute;
    background-color: #808080;
    border: 2px solid #606060;
    box-shadow: 0 0 5px rgba(128, 128, 128, 0.5);
    z-index: 4;
}

.camera-indicator {
    position: absolute;
    background-color: #000000;
    border: 2px solid #404040;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
    z-index: 10;
}

/* Camera View Overlay */
.camera-view-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1500;
    display: none;
    align-items: center;
    justify-content: center;
    font-family: 'Courier New', monospace;
}

.camera-view-overlay.active {
    display: flex;
}

.camera-view-container {
    background: linear-gradient(135deg, #001122 0%, #003344 100%);
    border: 3px solid #00ffff;
    border-radius: 8px;
    box-shadow: 
        0 0 40px rgba(0, 255, 255, 0.6),
        inset 0 0 30px rgba(0, 255, 255, 0.2);
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow: hidden;
    color: #00ffff;
}

.camera-view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(0, 255, 255, 0.1);
    border-bottom: 2px solid #00ffff;
}

.camera-view-title {
    margin: 0;
    font-size: 24px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
}

.camera-view-close-hint {
    font-size: 14px;
    color: rgba(0, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.camera-view-content {
    padding: 20px;
    height: calc(90vh - 100px);
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.camera-view-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
}

.camera-room-view {
    position: relative;
    background: 
        linear-gradient(rgba(0, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    border: 3px solid #00ffff;
    box-shadow: 
        0 0 30px rgba(0, 255, 255, 0.5),
        inset 0 0 30px rgba(0, 255, 255, 0.1);
    background-color: rgba(0, 10, 20, 0.3);
}

.camera-view-content::-webkit-scrollbar {
    width: 8px;
}

.camera-view-content::-webkit-scrollbar-track {
    background: rgba(0, 20, 40, 0.5);
    border-left: 1px solid rgba(0, 255, 255, 0.3);
}

.camera-view-content::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 255, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.5);
    box-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
}

.camera-view-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 255, 0.5);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

