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

body {
    overflow: hidden;
    background: #0a0512;
    font-family: 'Orbitron', sans-serif;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

#canvas {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

#ui-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 8vh;
}

#title-container {
    text-align: center;
    z-index: 10;
}

#main-title {
    font-size: clamp(2rem, 10vw, 6rem);
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 0 20px #4d94ff, 0 0 40px #4d94ff, 0 0 60px #9b4dff;
    letter-spacing: 0.1em;
    animation: pulse 2s ease-in-out infinite;
}

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

#subtitle {
    font-size: clamp(0.8rem, 3vw, 1.5rem);
    font-weight: 700;
    color: #ff69b4;
    letter-spacing: 0.3em;
    margin-top: 0.5rem;
    text-shadow: 0 0 10px #ff69b4;
    animation: fadeInOut 3s ease-in-out infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

#motivational {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
    font-weight: 500;
    color: #9b4dff;
    margin-top: 2rem;
    letter-spacing: 0.1em;
    text-shadow: 0 0 10px currentColor;
    transition: opacity 0.5s ease;
}

#power-meter {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

#meter-label {
    font-size: 0.7rem;
    color: #ffffff;
    letter-spacing: 0.2em;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    text-shadow: 0 0 10px #4d94ff;
}

#meter-bar {
    width: 12px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    transform: rotate(180deg);
}

#meter-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(to top, #4d94ff, #9b4dff);
    border-radius: 4px;
    transition: width 0.1s ease, background 0.3s ease;
    box-shadow: 0 0 20px #4d94ff;
}

#meter-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #ffffff;
    text-shadow: 0 0 10px #4d94ff;
}

#color-toggle {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: auto;
    cursor: pointer;
    z-index: 10;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    transition: all 0.3s ease;
}

#color-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateX(-50%) scale(1.05);
}

#color-toggle:active {
    transform: translateX(-50%) scale(0.95);
}

#toggle-label {
    font-size: clamp(0.7rem, 2vw, 0.9rem);
    color: #ffffff;
    letter-spacing: 0.1em;
    text-shadow: 0 0 10px #ff69b4;
}

#footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 10;
    background: linear-gradient(to top, rgba(10, 5, 18, 0.8), transparent);
}

#footer span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.1em;
}

#footer a {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #ff69b4;
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(255, 105, 180, 0.5);
}

#footer a:hover {
    color: #ffffff;
    text-shadow: 0 0 20px #ff69b4;
}

@media (max-width: 768px) {
    #power-meter {
        right: 10px;
    }
    
    #meter-bar {
        height: 150px;
        width: 10px;
    }
    
    #color-toggle {
        bottom: 100px;
        padding: 10px 20px;
    }
    
    #ui-overlay {
        padding-top: 5vh;
    }
}

@media (max-height: 600px) {
    #ui-overlay {
        padding-top: 3vh;
    }
    
    #power-meter {
        display: none;
    }
}