/* ===== NEON CLIMB — STYLE.CSS ===== */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Inter:wght@300;400;600&display=swap');

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --neon-pink: #ff2d78;
    --neon-pink-glow: rgba(255, 45, 120, 0.6);
    --neon-cyan: #00f5ff;
    --neon-cyan-glow: rgba(0, 245, 255, 0.5);
    --neon-purple: #bf00ff;
    --neon-yellow: #ffe600;
    --bg-dark: #050510;
    --bg-card: rgba(10, 10, 30, 0.85);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --font-game: 'Orbitron', monospace;
    --font-ui: 'Inter', sans-serif;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--bg-dark);
    font-family: var(--font-ui);
    color: var(--text-primary);
}

/* ===== GAME WRAPPER ===== */
#game-wrapper {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 480px;
    /* Phone look on desktop */
    max-height: 95vh;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    /* Shadow to separate from void */
    image-rendering: auto;
}

/* ===== OVERLAYS ===== */
.overlay {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(8px);
    background: rgba(5, 5, 16, 0.75);
}

.overlay.active {
    display: flex;
}

.overlay-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 48px 64px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 45, 120, 0.3);
    border-radius: 24px;
    box-shadow:
        0 0 40px rgba(255, 45, 120, 0.2),
        0 0 80px rgba(0, 245, 255, 0.1),
        inset 0 0 40px rgba(255, 45, 120, 0.05);
    animation: cardAppear 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ===== LOGO ===== */
.logo-glow {
    font-family: var(--font-game);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    letter-spacing: 0.15em;
    color: var(--neon-pink);
    text-shadow:
        0 0 10px var(--neon-pink),
        0 0 30px var(--neon-pink),
        0 0 60px var(--neon-pink-glow),
        0 0 100px var(--neon-pink-glow);
    animation: logoPulse 2.5s ease-in-out infinite;
}

@keyframes logoPulse {

    0%,
    100% {
        text-shadow: 0 0 10px var(--neon-pink), 0 0 30px var(--neon-pink), 0 0 60px var(--neon-pink-glow);
    }

    50% {
        text-shadow: 0 0 20px var(--neon-pink), 0 0 50px var(--neon-pink), 0 0 100px var(--neon-pink-glow), 0 0 150px rgba(255, 45, 120, 0.3);
    }
}

.subtitle {
    font-family: var(--font-ui);
    font-size: 1rem;
    font-weight: 300;
    color: var(--text-secondary);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* ===== CONTROLS HINT ===== */
.controls-hint {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.key-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 36px;
    padding: 0 10px;
    background: rgba(255, 45, 120, 0.1);
    border: 1px solid rgba(255, 45, 120, 0.5);
    border-radius: 8px;
    font-family: var(--font-game);
    font-size: 0.75rem;
    color: var(--neon-pink);
    box-shadow: 0 0 10px rgba(255, 45, 120, 0.2);
}

.space-key {
    min-width: 120px;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
}

.key-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
    margin-left: 8px;
}

/* ===== NEON BUTTON ===== */
.neon-btn {
    font-family: var(--font-game);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--bg-dark);
    background: var(--neon-pink);
    border: none;
    border-radius: 50px;
    padding: 16px 48px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow:
        0 0 20px var(--neon-pink-glow),
        0 0 40px var(--neon-pink-glow),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
}

.neon-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.neon-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow:
        0 0 30px var(--neon-pink),
        0 0 60px var(--neon-pink-glow),
        0 0 100px rgba(255, 45, 120, 0.3);
}

.neon-btn:hover::before {
    opacity: 1;
}

.neon-btn:active {
    transform: translateY(0) scale(0.98);
}

/* ===== WIN SCREEN ===== */
#confettiCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.win-content {
    position: relative;
    z-index: 10;
}

.win-title {
    font-family: var(--font-game);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 900;
    color: var(--neon-yellow);
    text-shadow:
        0 0 10px var(--neon-yellow),
        0 0 30px rgba(255, 230, 0, 0.6);
    animation: winPulse 1.5s ease-in-out infinite;
}

@keyframes winPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.win-score-label {
    font-family: var(--font-game);
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    color: var(--text-secondary);
}

.win-score {
    font-family: var(--font-game);
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 900;
    color: var(--neon-cyan);
    text-shadow:
        0 0 10px var(--neon-cyan),
        0 0 30px var(--neon-cyan-glow),
        0 0 60px var(--neon-cyan-glow);
}

.win-height {
    font-family: var(--font-ui);
    font-size: 1rem;
    color: var(--text-secondary);
}

/* ===== HUD ===== */
#hud {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 50;
    pointer-events: none;
}

.hud-item {
    display: flex;
    flex-direction: column;
    background: rgba(5, 5, 16, 0.7);
    border: 1px solid rgba(255, 45, 120, 0.2);
    border-radius: 10px;
    padding: 8px 16px;
    min-width: 120px;
    backdrop-filter: blur(4px);
}

.hud-label {
    font-family: var(--font-game);
    font-size: 0.55rem;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
}

.hud-value {
    font-family: var(--font-game);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--neon-pink);
    text-shadow: 0 0 10px var(--neon-pink-glow);
}

.goal-value {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan-glow);
}

/* ===== PROGRESS BAR ===== */
#progress-bar-container {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 60vh;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    border: 1px solid rgba(255, 45, 120, 0.2);
    z-index: 50;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
}

#progress-bar-fill {
    width: 100%;
    height: 0%;
    background: linear-gradient(to top, var(--neon-pink), var(--neon-cyan));
    border-radius: 4px;
    transition: height 0.3s ease;
    box-shadow: 0 0 10px var(--neon-pink-glow);
}

#progress-label {
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-game);
    font-size: 0.55rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* ===== MOBILE CONTROLS ===== */
#mobile-controls {
    position: absolute;
    bottom: 110px;
    left: 50%;
    transform: translateX(-50%);
    width: 390px;
    /* Canvas genişliğiyle eşleşsin */
    max-width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 60;
    pointer-events: none;
    /* Boşluklara tıklanabilsin */
}

.control-group {
    display: flex;
    gap: 16px;
    pointer-events: auto;
}

.control-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.1s;
}

.control-btn:active,
.control-btn.active {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0.95);
}

#btn-jump {
    width: 80px;
    height: 80px;
    font-size: 1rem;
    border-color: rgba(255, 45, 120, 0.5);
    background: rgba(255, 45, 120, 0.15);
    color: var(--neon-pink);
}

#btn-jump:active,
#btn-jump.active {
    background: rgba(255, 45, 120, 0.4);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    .overlay-content {
        padding: 32px 24px;
    }

    #hud {
        top: 10px;
        left: 10px;
    }

    .hud-item {
        padding: 6px 10px;
        min-width: 90px;
    }

    .hud-value {
        font-size: 0.9rem;
    }
}

/* ===== HUD BUTTONS ===== */
.hud-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(5, 5, 16, 0.7);
    border: 1px solid rgba(255, 45, 120, 0.3);
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    transition: all 0.2s;
}

.hud-btn:hover {
    background: rgba(255, 45, 120, 0.2);
    transform: scale(1.1);
}

.hud-btn:active {
    transform: scale(0.95);
}