@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&family=Share+Tech+Mono&display=swap');

:root {
    --primary: #0ff;
    --secondary: #f0f;
    --dark: #111;
    --light: #eee;
    --accent: #ff0;
    --glow: 0 0 10px var(--primary), 0 0 20px var(--primary);
}

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

body, html {
    height: 100%;
    background-color: #000;
    color: var(--light);
    font-family: 'Share Tech Mono', monospace;
    overflow-x: hidden;
}

.container {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    padding: 20px;
}

/* Background */
#particles-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Welcome Screen */
.welcome-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 100;
    transition: opacity 1s ease-out;
}

.glitch {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    font-weight: bold;
    text-transform: uppercase;
    position: relative;
    color: var(--primary);
    letter-spacing: 5px;
    text-shadow: var(--glow);
    margin-bottom: 20px;
}

.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--secondary);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: 2px 0 var(--accent);
    clip: rect(24px, 450px, 100px, 0);
    animation: glitch-anim 7s infinite linear alternate-reverse;
}

.subtext {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--primary);
    letter-spacing: 2px;
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(to bottom, 
        rgba(0, 255, 255, 0) 0%,
        rgba(0, 255, 255, 0.2) 50%,
        rgba(0, 255, 255, 0) 100%);
    animation: scan 4s linear infinite;
    z-index: 101;
}

/* Main Content */
.main-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px;
    border: 1px solid var(--primary);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
    border-radius: 5px;
    backdrop-filter: blur(5px);
    background-color: rgba(0, 0, 0, 0.7);
}

.hidden {
    display: none;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--primary);
}

.header-decoration {
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.cyber-text {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: var(--glow);
}

/* Message Container */
.message-container {
    margin: 30px 0;
    padding: 20px;
    border: 1px solid var(--primary);
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
}

.typing-text {
    overflow: hidden;
    white-space: pre-wrap;
    opacity: 0;
    animation: typing 3s steps(60, end) forwards;
}

.delay-1 { animation-delay: 1s; }
.delay-2 { animation-delay: 2s; }
.delay-3 { animation-delay: 3s; }
.delay-4 { animation-delay: 4s; }
.delay-5 { animation-delay: 5s; }
.delay-6 { animation-delay: 6s; }
.delay-7 { animation-delay: 7s; }

/* Game Section */
.game-section {
    margin: 40px 0;
    text-align: center;
}

.game-instructions {
    margin: 15px auto;
    display: inline-block;
    padding: 10px 20px;
    color: var(--primary);
    background-color: rgba(0, 0, 0, 0.7);
}

#game-container {
    position: relative;
    width: 100%;
    height: 400px;
    margin: 20px 0;
    border: 1px solid var(--primary);
    background-color: rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

#game-canvas {
    width: 100%;
    height: 100%;
}

#game-score {
    position: absolute;
    top: 10px;
    right: 10px;
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: bold;
}

#game-controls {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--primary);
    border-radius: 5px;
    display: none;
}

/* Mobile Controls */
#mobile-controls {
    position: absolute;
    bottom: 15px;
    left: 0;
    width: 100%;
    display: none;
    z-index: 20;
}

.control-area {
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
}

.joystick-area {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: rgba(0, 255, 255, 0.1);
    border: 1px solid var(--primary);
}

.joystick {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary);
    opacity: 0.8;
}

.shoot-button {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: rgba(255, 0, 255, 0.2);
    border: 1px solid var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    font-weight: bold;
}

/* Secret Message */
#secret-message {
    text-align: center;
    margin: 40px 0;
    padding: 20px;
    border: 2px solid var(--secondary);
    background-color: rgba(255, 0, 255, 0.1);
    border-radius: 5px;
}

.message-box {
    margin: 20px 0;
    line-height: 1.6;
}

.hologram-heart {
    width: 100px;
    height: 100px;
    margin: 20px auto;
}

.hologram-heart svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 5px var(--secondary));
}

.hologram-heart path {
    fill: none;
    stroke: var(--secondary);
    stroke-width: 2;
    animation: pulse 2s infinite;
}

/* Footer */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--primary);
}

.equalizer {
    display: flex;
    gap: 5px;
}

.bar {
    width: 5px;
    height: 20px;
    background-color: var(--primary);
    animation: equalize 1s infinite alternate;
}

.bar:nth-child(2) { animation-delay: 0.2s; }
.bar:nth-child(3) { animation-delay: 0.4s; }
.bar:nth-child(4) { animation-delay: 0.6s; }
.bar:nth-child(5) { animation-delay: 0.8s; }

/* Buttons */
.cyber-button {
    position: relative;
    padding: 12px 30px;
    margin: 10px;
    background-color: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 2px;
    font-family: 'Share Tech Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 2px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
}

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

.cyber-button:hover {
    box-shadow: 0 0 10px var(--primary);
    text-shadow: 0 0 5px var(--primary);
}

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

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

.cyber-panel {
    border: 1px solid var(--primary);
    background-color: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 3px;
}

/* Animations */
@keyframes glitch-anim {
    0% { clip: rect(5px, 9999px, 75px, 0); }
    5% { clip: rect(79px, 9999px, 13px, 0); }
    10% { clip: rect(32px, 9999px, 98px, 0); }
    15% { clip: rect(84px, 9999px, 26px, 0); }
    20% { clip: rect(14px, 9999px, 67px, 0); }
    25% { clip: rect(47px, 9999px, 25px, 0); }
    30% { clip: rect(64px, 9999px, 17px, 0); }
    35% { clip: rect(79px, 9999px, 57px, 0); }
    40% { clip: rect(26px, 9999px, 81px, 0); }
    45% { clip: rect(47px, 9999px, 93px, 0); }
    50% { clip: rect(18px, 9999px, 64px, 0); }
    55% { clip: rect(89px, 9999px, 41px, 0); }
    60% { clip: rect(72px, 9999px, 22px, 0); }
    65% { clip: rect(35px, 9999px, 51px, 0); }
    70% { clip: rect(56px, 9999px, 5px, 0); }
    75% { clip: rect(40px, 9999px, 95px, 0); }
    80% { clip: rect(7px, 9999px, 90px, 0); }
    85% { clip: rect(30px, 9999px, 9px, 0); }
    90% { clip: rect(93px, 9999px, 59px, 0); }
    95% { clip: rect(14px, 9999px, 52px, 0); }
    100% { clip: rect(63px, 9999px, 37px, 0); }
}

@keyframes scan {
    0% { top: 0%; }
    100% { top: 100%; }
}

@keyframes typing {
    0% { 
        width: 0;
        opacity: 0;
    }
    1% { opacity: 1; }
    100% { 
        width: 100%;
        opacity: 1;
    }
}

@keyframes equalize {
    0% { height: 5px; }
    100% { height: 20px; }
}

@keyframes pulse {
    0% { 
        transform: scale(1);
        opacity: 0.7;
    }
    50% { 
        transform: scale(1.1);
        opacity: 1;
    }
    100% { 
        transform: scale(1);
        opacity: 0.7;
    }
}

.blink {
    animation: blink 1s infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .glitch {
        font-size: 2rem;
    }
    
    .main-content {
        padding: 15px;
    }
    
    #game-container {
        height: 300px;
    }
    
    #mobile-controls {
        display: block;
    }
}