/* ============================================
   PATANG BAAZI - Kite Fighting Game Styles
   ============================================ */

:root {
    /* Sky Colors */
    --sky-top: #1a0a2e;
    --sky-mid: #4a1c6b;
    --sky-bottom: #ff6b35;
    --sky-horizon: #ffc857;

    /* UI Colors */
    --primary: #ff6b35;
    --primary-glow: rgba(255, 107, 53, 0.6);
    --secondary: #ffc857;
    --accent: #ff1744;
    --dark: #0d0d1a;
    --dark-glass: rgba(13, 13, 26, 0.85);
    --light: #ffffff;
    --light-muted: rgba(255, 255, 255, 0.7);

    /* Kite Colors */
    --kite-player: #00e5ff;
    --kite-enemy-1: #ff1744;
    --kite-enemy-2: #ffea00;
    --kite-enemy-3: #76ff03;
    --kite-enemy-4: #e040fb;
    --kite-enemy-5: #ff9100;

    /* Timing */
    --transition-fast: 0.15s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: var(--dark);
    overflow: hidden;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

#game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* Canvas Layers */
#sky-canvas,
#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#sky-canvas {
    z-index: 1;
}

#game-canvas {
    z-index: 2;
}

/* Wind Indicator */
#wind-indicator {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--dark-glass);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.wind-arrow {
    font-size: 24px;
    color: var(--secondary);
    transition: transform 0.5s ease;
    text-shadow: 0 0 10px var(--secondary);
}

#wind-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--light-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Score Display */
#score-display {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 24px;
    background: var(--dark-glass);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.score-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--light-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.score-value {
    font-size: 28px;
    font-weight: 900;
    color: var(--light);
    text-shadow: 0 0 20px var(--primary-glow);
}

.score-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
}

/* Tension Meter */
#tension-meter {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: 200px;
    height: 12px;
    background: var(--dark-glass);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.tension-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--secondary), var(--primary), var(--accent));
    border-radius: 20px;
    transition: width 0.1s linear;
    box-shadow: 0 0 20px var(--primary-glow);
}

.tension-label {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    font-size: 10px;
    font-weight: 600;
    color: var(--light-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    white-space: nowrap;
}

/* Overlays */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, rgba(26, 10, 46, 0.85) 0%, rgba(13, 13, 26, 0.9) 100%);
    backdrop-filter: blur(5px);
    transition: opacity var(--transition-smooth), visibility var(--transition-smooth);
}

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

.overlay-content {
    text-align: center;
    padding: 40px;
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* Game Title */
.game-title {
    font-size: clamp(36px, 8vw, 56px);
    font-weight: 900;
    color: var(--light);
    text-shadow: 0 0 30px var(--primary-glow);
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.game-subtitle {
    font-size: clamp(12px, 2.5vw, 14px);
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 32px;
    opacity: 0.9;
}

/* Instructions */
.instructions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 32px;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
}

.instruction-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.instruction-item .key {
    font-size: 16px;
    min-width: 60px;
    text-align: center;
}

.instruction-item .desc {
    font-size: 12px;
    color: var(--light-muted);
    text-align: left;
}

.tip {
    font-size: 13px;
    color: var(--secondary);
    margin-bottom: 24px;
    opacity: 0.9;
}

.power-explain {
    margin-bottom: 24px;
    font-size: 13px;
    color: var(--light-muted);
}

.power-explain p {
    margin: 4px 0;
}

.power-explain strong {
    font-weight: 600;
}

/* Game Button */
.game-btn {
    padding: 14px 40px;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--dark);
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    border: none;
    border-radius: 40px;
    cursor: pointer;
    transition: all var(--transition-smooth);
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.3);
}

.game-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 32px rgba(255, 107, 53, 0.4);
}

.game-btn:active {
    transform: translateY(0) scale(0.98);
}

.game-btn.pulse {
    animation: pulse 2.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 8px 24px rgba(255, 107, 53, 0.3);
    }

    50% {
        box-shadow: 0 8px 32px rgba(255, 107, 53, 0.5);
    }
}

/* Game Over Screen */
.result-title {
    font-size: clamp(32px, 8vw, 48px);
    font-weight: 900;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-title.defeat {
    background: linear-gradient(135deg, #ff6b6b 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.final-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 32px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.stat-value {
    font-size: 32px;
    font-weight: 900;
    color: var(--light);
}

.stat-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--light-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Cut Flash Effect */
.cut-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 50;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.8) 0%, transparent 70%);
}

.cut-flash.active {
    animation: flashEffect 0.3s ease-out;
}

@keyframes flashEffect {
    0% {
        opacity: 0.8;
    }

    100% {
        opacity: 0;
    }
}

/* Mobile Responsive */
@media (max-width: 600px) {
    #score-display {
        top: 10px;
        right: 10px;
        padding: 8px 16px;
        gap: 10px;
    }

    .score-value {
        font-size: 22px;
    }

    #wind-indicator {
        top: 10px;
        padding: 8px 16px;
    }

    .wind-arrow {
        font-size: 20px;
    }

    #tension-meter {
        bottom: 20px;
        width: 150px;
    }

    .overlay-content {
        padding: 20px;
    }

    .instructions {
        gap: 10px;
    }

    .instruction-item {
        padding: 10px 16px;
    }

    .game-btn {
        padding: 14px 36px;
        font-size: 16px;
    }

    .final-stats {
        gap: 30px;
    }

    .stat-value {
        font-size: 36px;
    }
}

/* Touch feedback for mobile */
@media (hover: none) {
    .game-btn:active {
        transform: scale(0.95);
        background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    }
}