/* RhythmMech - Anime/Mecha Rhythm Game Styles */

/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Exo+2:wght@300;400;600;800&display=swap');

/* CSS Variables - Anime/Mecha Color Palette */
:root {
    /* Primary Colors - Deep Tech */
    --primary-purple: #2D1B69;
    --primary-teal: #006B73;
    --electric-blue: #0094FF;
    --cyber-cyan: #00FFFF;
    
    /* Pastel Accents - Kawaii Touch */
    --pastel-pink: #FFB3E6;
    --pastel-lavender: #E6B3FF;
    --pastel-mint: #B3FFE6;
    --pastel-sky: #B3E6FF;
    
    /* UI Elements */
    --warning-orange: #FF6B00;
    --success-green: #00FF94;
    --danger-red: #FF0051;
    
    /* Surfaces */
    --surface-dark: #1a0d3e;
    --surface-medium: #2a1b5c;
    --surface-light: #3d2d7a;
    --glass-overlay: rgba(255, 255, 255, 0.1);
    
    /* Text */
    --text-primary: #FFFFFF;
    --text-secondary: #B3B3FF;
    --text-accent: #00FFFF;
    
    /* Fonts */
    --font-primary: 'Orbitron', monospace;
    --font-secondary: 'Exo 2', sans-serif;
}

/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--surface-dark) 100%);
    font-family: var(--font-primary);
    color: var(--text-primary);
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* Game Canvas Styles */
#gameCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--surface-dark) 100%);
    touch-action: none;
}

/* Mecha UI Components */
.mecha-panel {
    background: linear-gradient(145deg, var(--surface-medium), var(--surface-dark));
    border: 2px solid var(--cyber-cyan);
    border-radius: 0 12px 0 12px;
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.3),
        inset 0 0 10px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.mecha-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--cyber-cyan) 50%, transparent 100%);
    animation: scan 3s ease-in-out infinite;
}

.hexagon {
    width: 60px;
    height: 34.64px;
    background: var(--cyber-cyan);
    margin: 17.32px 0;
    position: relative;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.holographic-text {
    font-family: var(--font-primary);
    color: var(--cyber-cyan);
    text-shadow: 
        0 0 5px currentColor,
        0 0 10px currentColor,
        0 0 15px currentColor;
    animation: hologram 2s ease-in-out infinite alternate;
}

/* Button Styles */
.mecha-button {
    background: linear-gradient(145deg, var(--surface-light), var(--surface-medium));
    border: 2px solid var(--electric-blue);
    border-radius: 0 8px 0 8px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 24px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 148, 255, 0.3);
}

.mecha-button:hover {
    border-color: var(--cyber-cyan);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    transform: translateY(-2px);
}

.mecha-button:active {
    transform: translateY(0);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.7);
}

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

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

/* Progress Bars */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--surface-dark);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--electric-blue);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--cyber-cyan), var(--electric-blue));
    border-radius: 4px;
    position: relative;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
    animation: shine 2s ease-in-out infinite;
}

/* Score Display */
.score-display {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--cyber-cyan);
    text-align: center;
    text-shadow: 
        0 0 10px currentColor,
        0 0 20px currentColor,
        0 0 30px currentColor;
    animation: scoreGlow 1s ease-in-out infinite alternate;
}

/* Combo Counter */
.combo-display {
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--pastel-pink);
    text-shadow: 0 0 10px currentColor;
    animation: comboPulse 0.5s ease-in-out;
}

/* Accuracy Display */
.accuracy-display {
    font-family: var(--font-primary);
    font-size: 1.2rem;
    color: var(--success-green);
    text-shadow: 0 0 5px currentColor;
}

/* Shield Counter */
.shield-display {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--warning-orange);
    font-family: var(--font-secondary);
    font-weight: 600;
}

.shield-icon {
    width: 20px;
    height: 20px;
    background: var(--warning-orange);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: shieldGlow 1s ease-in-out infinite alternate;
}

/* Particle Effects Base */
.particle {
    position: absolute;
    pointer-events: none;
    opacity: 0;
    transform-origin: center;
}

.hit-particle {
    width: 4px;
    height: 4px;
    background: var(--cyber-cyan);
    border-radius: 50%;
    box-shadow: 0 0 6px currentColor;
}

.explosion-particle {
    width: 8px;
    height: 8px;
    background: linear-gradient(45deg, var(--pastel-pink), var(--pastel-lavender));
    border-radius: 50%;
    box-shadow: 0 0 10px currentColor;
}

/* Responsive Design */
@media screen and (max-width: 480px) {
    .score-display {
        font-size: 2rem;
    }
    
    .combo-display {
        font-size: 1.2rem;
    }
    
    .mecha-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media screen and (orientation: landscape) and (max-height: 500px) {
    .mecha-panel {
        padding: 8px;
    }
    
    .score-display {
        font-size: 1.8rem;
    }
}

/* Animations */
@keyframes scan {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

@keyframes hologram {
    0% { 
        text-shadow: 
            0 0 5px currentColor,
            0 0 10px currentColor,
            0 0 15px currentColor;
    }
    100% { 
        text-shadow: 
            0 0 10px currentColor,
            0 0 20px currentColor,
            0 0 30px currentColor;
    }
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes scoreGlow {
    0% { 
        filter: brightness(1);
        transform: scale(1);
    }
    100% { 
        filter: brightness(1.2);
        transform: scale(1.02);
    }
}

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

@keyframes shieldGlow {
    0% { 
        filter: brightness(1);
        box-shadow: 0 0 5px currentColor;
    }
    100% { 
        filter: brightness(1.3);
        box-shadow: 0 0 15px currentColor;
    }
}

/* Perfect/Great/Good hit feedback */
.hit-perfect {
    color: var(--cyber-cyan);
    animation: hitFeedback 0.5s ease-out;
}

.hit-great {
    color: var(--success-green);
    animation: hitFeedback 0.5s ease-out;
}

.hit-good {
    color: var(--warning-orange);
    animation: hitFeedback 0.5s ease-out;
}

.hit-miss {
    color: var(--danger-red);
    animation: hitFeedback 0.5s ease-out;
}

@keyframes hitFeedback {
    0% { 
        transform: scale(0.5) translateY(20px);
        opacity: 0;
    }
    50% { 
        transform: scale(1.2) translateY(0px);
        opacity: 1;
    }
    100% { 
        transform: scale(1) translateY(-20px);
        opacity: 0;
    }
}

/* Grid Lines (Mecha aesthetic) */
.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: 
        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: 40px 40px;
    animation: gridPulse 4s ease-in-out infinite;
}

@keyframes gridPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.1; }
}