/* PONG PAGE STYLES */

:root {
    --pong-paddle: #12421e;
    --pong-ball: #ff0000;
    --pong-line: rgba(0, 0, 0, 0.2);
    --pong-bg: var(--color-surface-primary);
}

/* Page Container */
.pong-page {
    max-width: 100vw;
    margin: 0 auto;
    padding: 0.5rem;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    overflow: hidden;
}

/* Header */
.game-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
}

.game-header .logo-link {
    display: block;
    width: 80px;
    transition: opacity 0.2s ease;
}

.game-header .logo-link:hover {
    opacity: 0.6;
    animation: none;
}

.game-header .logo-link svg {
    width: 100%;
    height: auto;
}

.game-header h1 {
    font-family: "GT Alpina", Times, serif;
    font-size: 1.25rem;
    font-weight: 300;
    visibility: visible;
    width: auto;
    height: auto;
    text-indent: 0;
    text-overflow: clip;
    padding: 0;
}

/* Game Wrapper */
.game-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    min-height: 0;
}

/* Board Container */
.board-container {
    position: relative;
    height: 100%;
    max-height: calc(100vh - 220px);
    width: min(92vw, 640px);
    aspect-ratio: 4 / 3;
}

/* Canvas */
.game-canvas {
    width: 100%;
    height: 100%;
    border: 2px solid var(--color-content-primary);
    background: var(--pong-bg);
    display: block;
}

/* Game Overlay */
.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.2s ease;
}

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

.overlay-content {
    text-align: center;
    color: #fff;
}

.overlay-content h2 {
    font-family: "GT Alpina", Times, serif;
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    padding: 0;
}

.overlay-content p {
    font-family: "GT Alpina Typewriter", Courier, monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.031rem;
    margin-bottom: 1rem;
    opacity: 0.7;
    padding: 0;
}

/* Game Button */
.game-btn {
    font-family: "GT Alpina Typewriter", Courier, monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.031rem;
    padding: 0.75rem 1.5rem;
    border: 1px solid #fff;
    background: transparent;
    color: #fff;
    cursor: crosshair;
    transition: all 0.15s ease;
}

.game-btn:hover {
    background: #fff;
    color: #000;
}

/* Stats Panel */
.stats-panel {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 0.5rem;
    padding: 0.5rem 0;
    border-top: 1px solid var(--color-content-primary);
    border-bottom: 1px solid var(--color-content-primary);
    opacity: 0.15;
    flex-shrink: 0;
}

.stats-panel .stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.stats-panel small {
    font-family: "GT Alpina Typewriter", Courier, monospace;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.031rem;
    opacity: 0.5;
}

.stats-panel span {
    font-family: "GT Alpina Typewriter", Courier, monospace;
    font-size: 1rem;
}

/* Difficulty */
.difficulty-panel {
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: "GT Alpina Typewriter", Courier, monospace;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.031rem;
    opacity: 0.5;
}

.difficulty-panel select {
    font-family: "GT Alpina Typewriter", Courier, monospace;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.031rem;
    padding: 0.2rem 0.4rem;
    border: 1px solid var(--color-content-primary);
    background: transparent;
    color: inherit;
}

.difficulty-panel select:focus {
    outline: 1px solid var(--color-content-primary);
    outline-offset: 2px;
}

/* Controls Info */
.controls-info {
    margin-top: 0.5rem;
    text-align: center;
    flex-shrink: 0;
}

.controls-info small {
    opacity: 0.4;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.mobile-only {
    display: none;
}

/* Music Toggle */
.music-toggle-wrapper {
    display: inline-flex;
    align-items: center;
}

.music-toggle {
    font-family: "GT Alpina Typewriter", Courier, monospace;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--color-content-primary);
    background: transparent;
    color: var(--color-content-primary);
    cursor: crosshair;
    transition: all 0.15s ease;
    opacity: 0.3;
    line-height: 1;
}

.music-toggle:hover {
    opacity: 0.6;
}

.music-toggle.active {
    opacity: 1;
    background: var(--color-content-primary);
    color: var(--color-surface-primary);
}

/* Mobile Responsive */
@media screen and (max-width: 600px) {
    .pong-page {
        padding: 0.5rem;
    }

    .game-header {
        margin-bottom: 0.5rem;
    }

    .game-header .logo-link {
        width: 50px;
    }

    .game-header h1 {
        font-size: 0.9rem;
    }

    .board-container {
        max-height: calc(100dvh - 180px);
        width: min(96vw, 520px);
    }

    .stats-panel {
        gap: 0.75rem;
        margin-top: 0.5rem;
        padding: 0.5rem 0;
    }

    .stats-panel small {
        font-size: 0.5rem;
    }

    .stats-panel span {
        font-size: 0.8rem;
    }

    .difficulty-panel {
        font-size: 0.5rem;
    }

    .difficulty-panel select {
        font-size: 0.5rem;
    }

    .desktop-only {
        display: none;
    }

    .mobile-only {
        display: inline;
    }
}

@media screen and (max-width: 360px) {
    .board-container {
        max-height: calc(100dvh - 160px);
        width: min(98vw, 440px);
    }
}
