:root {
    --bg-dark: #07090f;
    --cold-blue: #0B132B;
    --cold-grey: #1C2541;
    --toxic-red: #ff1e3c;
    --aggressive-cyan: #00f0ff;
    --glitch-black: #0c000c;
    --power-magenta: #ff00ff;
    --text-light: #e0e6ed;
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: var(--font-body);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

#game-container {
    width: 100%;
    max-width: 600px;
    /* Mobile-like app aspect */
    height: 100vh;
    max-height: 900px;
    background: radial-gradient(circle at center, var(--cold-grey) 0%, var(--cold-blue) 100%);
    position: relative;
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.glitch-bg {
    animation: glitchBg 2s infinite alternate;
}

@keyframes glitchBg {
    0% {
        background-color: rgba(7, 9, 15, 0.4);
    }

    10% {
        background-color: rgba(12, 0, 12, 0.8);
        box-shadow: inset 0 0 40px var(--toxic-red);
    }

    20% {
        background-color: rgba(11, 19, 43, 0.5);
    }

    100% {
        background-color: rgba(7, 9, 15, 0.4);
        box-shadow: none;
    }
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
    letter-spacing: 2px;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    padding: 15px 20px;
    background: rgba(11, 19, 43, 0.8);
    border-bottom: 2px solid var(--power-magenta);
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 10;
}

.points-display {
    font-size: 1.2rem;
    color: var(--power-magenta);
    font-weight: bold;
    text-shadow: 0 0 10px var(--power-magenta);
}

.level-badge {
    color: var(--aggressive-cyan);
    font-family: var(--font-heading);
    text-transform: uppercase;
}

.scene {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 20px;
    padding-bottom: 50px;
    text-align: center;
    margin-top: 60px;
    /* offset for top bar */
    animation: fadeIn 0.5s ease;
    position: relative;
    overflow-y: auto;
    width: 100%;
}

.scene::-webkit-scrollbar {
    width: 6px;
}

.scene::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.scene::-webkit-scrollbar-thumb {
    background: var(--power-magenta);
    border-radius: 3px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

button {
    font-family: var(--font-heading);
    padding: 12px 24px;
    margin: 10px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    text-transform: uppercase;
    transition: all 0.2s ease;
    background: transparent;
    border: 2px solid;
    position: relative;
    overflow: hidden;
}

button.power-btn {
    color: var(--power-magenta);
    border-color: var(--power-magenta);
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.4);
}

button.power-btn:hover {
    background: var(--power-magenta);
    color: #fff;
    box-shadow: 0 0 20px var(--power-magenta);
}

button.toxic-btn {
    color: var(--toxic-red);
    border-color: var(--toxic-red);
}

button.toxic-btn:hover {
    background: var(--toxic-red);
    color: #fff;
    box-shadow: 0 0 20px var(--toxic-red);
}

button.cyan-btn {
    color: var(--aggressive-cyan);
    border-color: var(--aggressive-cyan);
}

button.cyan-btn:hover {
    background: var(--aggressive-cyan);
    color: var(--bg-dark);
    box-shadow: 0 0 20px var(--aggressive-cyan);
}

/* Phone Mockup */
.phone {
    width: 280px;
    min-height: 350px;
    border: 4px solid var(--cold-grey);
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 20px rgba(11, 19, 43, 0.8);
    flex-shrink: 0;
}

.vibrate {
    animation: shake 0.5s infinite;
}

@keyframes shake {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px) rotate(-1deg);
    }

    50% {
        transform: translateX(5px) rotate(1deg);
    }

    75% {
        transform: translateX(-5px) rotate(-1deg);
    }

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

.notification {
    background: rgba(26, 26, 26, 0.9);
    border-left: 4px solid var(--toxic-red);
    padding: 15px;
    margin: 20px;
    border-radius: 5px;
    animation: slideDown 0.5s ease;
    color: #fff;
    font-family: var(--font-body);
    font-size: 1.1rem;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.chat-bubble {
    position: absolute;
    background: var(--toxic-red);
    color: #fff;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 1rem;
    box-shadow: 0 0 10px var(--toxic-red);
    white-space: nowrap;
    animation: fallDown linear forwards;
    z-index: 5;
    pointer-events: none;
}

@keyframes fallDown {
    from {
        top: -50px;
    }

    to {
        top: 110%;
    }
}

.shield-item {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, var(--aggressive-cyan), transparent);
    border: 2px solid var(--aggressive-cyan);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 0 20px var(--aggressive-cyan);
    z-index: 10;
    animation: pulse 1s infinite alternate;
}

@keyframes pulse {
    0% {
        transform: translateX(-50%) scale(1);
        box-shadow: 0 0 10px var(--aggressive-cyan);
    }

    100% {
        transform: translateX(-50%) scale(1.1);
        box-shadow: 0 0 30px var(--aggressive-cyan);
    }
}

/* Hallway Level */
.hallway {
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #111, var(--cold-grey));
    position: relative;
    overflow: hidden;
}

.silhouette {
    position: absolute;
    width: 80px;
    height: 150px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 40px 40px 0 0;
    filter: blur(5px);
    transition: all 0.5s;
    cursor: pointer;
}

.silhouette:hover {
    box-shadow: 0 0 20px var(--toxic-red);
    background: rgba(255, 30, 60, 0.4);
}

.maya-silhouette {
    position: absolute;
    width: 60px;
    height: 120px;
    background: rgba(255, 0, 255, 0.4);
    border-radius: 30px 30px 0 0;
    filter: blur(2px);
    cursor: pointer;
    box-shadow: 0 0 20px var(--power-magenta);
}

/* Boss Battle */
.boss-sombra {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--glitch-black), var(--toxic-red));
    border-radius: 50%;
    box-shadow: 0 0 50px var(--toxic-red);
    margin: 20px auto;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--bg-dark);
    text-shadow: 0 0 5px var(--toxic-red);
    transition: all 0.5s;
}

.boss-sombra.disarmed {
    background: transparent;
    border: 2px dashed #555;
    box-shadow: none;
    color: #555;
    font-size: 1rem;
}

.boss-sombra.disarmed::after {
    content: "Engranajes oxidados...";
}

/* Modal Capsule */
.capsule-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.capsule-box {
    background: #111;
    border: 2px solid var(--power-magenta);
    padding: 30px;
    max-width: 80%;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.3);
    text-align: center;
}

.capsule-box h2 {
    color: var(--power-magenta);
    margin-bottom: 15px;
}

.capsule-box p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    line-height: 1.4;
}

/* Story Text */
.dialogue-box {
    background: rgba(11, 19, 43, 0.7);
    backdrop-filter: blur(5px);
    border: 1px solid var(--aggressive-cyan);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    text-align: left;
    width: 90%;
}

.dialogue-speaker {
    color: var(--power-magenta);
    font-family: var(--font-heading);
    font-weight: bold;
    margin-bottom: 5px;
}

.dialogue-text {
    font-size: 1.1rem;
    line-height: 1.5;
}

/* Grid Layout for minigames */
.minigame-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.draggable-tag {
    background: var(--cold-grey);
    border: 1px solid var(--power-magenta);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: grab;
    color: var(--power-magenta);
    font-weight: bold;
}

.drop-zone {
    width: 100%;
    height: 100px;
    border: 2px dashed var(--aggressive-cyan);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--aggressive-cyan);
    background: rgba(0, 240, 255, 0.1);
}

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

.user-icon {
    width: 60px;
    height: 60px;
    background: var(--cold-grey);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    border: 2px solid var(--toxic-red);
    cursor: pointer;
    transition: all 0.3s;
}

.user-icon.supported {
    border-color: var(--power-magenta);
    box-shadow: 0 0 15px var(--power-magenta);
    background: rgba(255, 0, 255, 0.2);
}

.manifesto {
    text-align: left;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-left: 4px solid var(--aggressive-cyan);
    margin-bottom: 20px;
}

.manifesto ul {
    list-style: none;
    margin-top: 10px;
}

.manifesto li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
    font-size: 1.1rem;
}

.manifesto li::before {
    content: "⚡";
    position: absolute;
    left: 0;
    color: var(--aggressive-cyan);
}