/* ========================================
   SKY RUNNER - Game Styles
   ======================================== */

/* CSS Variables - Color Palette */
:root {
    /* Primary Colors */
    --primary-gradient-start: #6366f1;
    --primary-gradient-end: #8b5cf6;
    --accent-color: #ec4899;
    --accent-secondary: #f43f5e;

    /* Background Colors */
    --bg-dark: #0f0f23;
    --bg-darker: #090915;
    --bg-gradient-start: #0a0e27;
    --bg-gradient-end: #1a1f3a;

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);

    /* UI Colors */
    --ui-glass: rgba(255, 255, 255, 0.1);
    --ui-glass-border: rgba(255, 255, 255, 0.2);
    --ui-shadow: rgba(0, 0, 0, 0.3);

    --score-color: #ffd700;
    --health-color: #ff4757;
    --power-up-color: #00d9ff;

    --transition-fast: 0.15s;
    --transition-normal: 0.3s;
    --transition-slow: 0.5s;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Border Radius */
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 50%;
}

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Exo 2', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    /* Prevent pull-to-refresh and overscroll bounce */
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
    position: fixed;
    inset: 0;
}

/* Game Container */
#game-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-darker);
}

/* Game Canvas - Fullscreen */
#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: auto;
}

/* UI Layer */
#ui-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
}

#ui-layer>* {
    pointer-events: auto;
}

/* ========================================
   HUD (Heads-Up Display)
   ======================================== */
#hud {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--spacing-md);
}

#score-container,
#high-score-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 0.75rem 1.25rem;
    min-width: 110px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#score-label,
#high-score-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--text-secondary);
}

#score-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fbbf24;
    text-shadow: 0 2px 12px rgba(251, 191, 36, 0.4);
    transition: transform 0.1s ease;
}

#high-score-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

#power-up-indicator {
    position: absolute;
    top: var(--spacing-md);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.625rem;
    background: linear-gradient(135deg, var(--power-up-color), #00b4d8);
    padding: 0.75rem 1.25rem;
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 16px rgba(0, 217, 255, 0.4), 0 0 32px rgba(0, 217, 255, 0.2);
    animation: powerUpPulse 1s ease-in-out infinite;
}

#power-up-icon {
    font-size: 1.2rem;
    animation: powerUpIconSpin 2s linear infinite;
}

#power-up-timer-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

#power-up-timer {
    width: 60px;
    height: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

#power-up-timer::after {
    content: '';
    display: block;
    height: 100%;
    background: linear-gradient(90deg, white, rgba(255, 255, 255, 0.8));
    border-radius: 3px;
    animation: timerDecrease 5s linear forwards;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

#power-up-time-text {
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    min-width: 20px;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

/* Fullscreen Button */
.hud-button {
    position: absolute;
    /* Move below the score row to avoid overlap */
    top: calc(var(--spacing-md) + 80px);
    right: var(--spacing-md);
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.hud-button:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.hud-button:active {
    transform: scale(0.95);
}

/* ========================================
   Keyboard Hints
   ======================================== */
.keyboard-hints {
    position: absolute;
    bottom: var(--spacing-lg);
    left: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.875rem 1rem;
    border-radius: 14px;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    opacity: 0;
    animation: hintsAppear 1s ease-out 2s forwards, hintsPulse 8s ease-in-out 3s infinite;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.hint-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.hint-separator {
    margin-top: var(--spacing-xs);
    padding-top: var(--spacing-xs);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.keyboard-hints kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 36px;
    padding: 0 0.625rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.hint-item span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 0.05em;
}

@keyframes hintsAppear {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 0.8;
        transform: translateY(0);
    }
}

@keyframes hintsPulse {
    0%, 100% {
        opacity: 0.8;
    }
    50% {
        opacity: 0.4;
    }
}

@keyframes hintsDisappear {
    0% {
        opacity: 0.8;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(10px);
    }
}

/* ========================================
   Performance Badge
   ======================================== */
.performance-badge {
    position: absolute;
    top: var(--spacing-md);
    right: calc(var(--spacing-md) + 60px);
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.625rem 0.875rem;
    border-radius: 14px;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    min-width: 90px;
    animation: fadeIn 0.3s ease-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.perf-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-sm);
}

.perf-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}

.perf-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    min-width: 30px;
    text-align: right;
}

#fps-value {
    color: #4caf50;
}

#fps-value.warning {
    color: #ff9800;
}

#fps-value.critical {
    color: #f44336;
}

.perf-close {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.perf-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* ========================================
   Screens (Start, Game Over, Pause, Settings)
   ======================================== */
.screen {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
    background: radial-gradient(ellipse at center, rgba(15, 15, 35, 0.9), rgba(9, 9, 21, 0.98));
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    animation: fadeIn var(--transition-normal) ease-out;
    overflow: hidden;
    pointer-events: auto;
    z-index: 50;
}

#pause-screen {
    background: radial-gradient(ellipse at center, rgba(15, 15, 35, 0.75), rgba(9, 9, 21, 0.85));
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
}

#pause-screen .screen-content {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl) var(--spacing-lg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.screen-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem;
    max-width: 520px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.screen-content::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Game Title */
.game-title {
    display: flex;
    flex-direction: column;
    margin-bottom: var(--spacing-sm);
    animation: floatBob 3s ease-in-out infinite;
}

.title-line {
    font-family: 'Righteous', cursive;
    font-size: clamp(2.5rem, 10vw, 4rem);
    font-weight: 400;
    letter-spacing: 0.1em;
    line-height: 1;
    background: linear-gradient(180deg, #fff 0%, #a8a8a8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 30px rgba(255, 255, 255, 0.1);
}

.title-line.accent {
    background: linear-gradient(135deg, var(--primary-gradient-start), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
}

.game-subtitle {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
}

/* Instructions */
.instructions {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.instruction-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
}

.key {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
    padding: 0 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25), 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.action {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.game-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: 0.875rem 1.75rem;
    min-width: 180px;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
    pointer-events: auto;
    z-index: 100;
}

.game-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.game-button::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, var(--accent-color), var(--primary-gradient-start), var(--accent-secondary));
    border-radius: var(--radius-lg);
    opacity: 0;
    z-index: -1;
    filter: blur(15px);
    transition: opacity 0.3s ease;
}

.game-button:hover::before {
    opacity: 1;
}

.game-button:hover::after {
    opacity: 0.8;
    animation: gradientShift 2s ease infinite;
}

.game-button.primary {
    background: linear-gradient(135deg, var(--primary-gradient-start), var(--primary-gradient-end));
    color: white;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.game-button.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 36px rgba(99, 102, 241, 0.5);
    background: linear-gradient(135deg, #7c7ff6, #9d5ff9);
}

.game-button.primary:active {
    transform: translateY(0) scale(0.98);
}

.game-button.secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    backdrop-filter: blur(20px);
    margin-top: var(--spacing-sm);
}

.game-button.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.15);
}

.button-icon {
    font-size: 1.2rem;
}

/* Button Divider */
.button-divider {
    width: 100%;
    max-width: 180px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    margin: var(--spacing-sm) 0;
}

/* Game Over Screen */
.game-over-title,
.pause-title,
.settings-title {
    font-size: clamp(2.2rem, 8vw, 3.8rem);
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    padding-top: 1rem;
}

.game-over-title::before,
.pause-title::before,
.settings-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-gradient-start), var(--accent-color));
    border-radius: 2px;
}

.pause-title {
    background: linear-gradient(135deg, var(--primary-gradient-start), var(--primary-gradient-end));
    -webkit-background-clip: text;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite, pauseGlow 2s ease-in-out infinite;
}

.settings-title {
    background: linear-gradient(135deg, #00d9ff, #00b4d8);
    -webkit-background-clip: text;
    background-clip: text;
}

.final-score-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    padding: 1.5rem 3rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    position: relative;
}

.final-score-container::before,
.final-score-container::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(251, 191, 36, 0.3);
}

.final-score-container::before {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
    border-radius: 8px 0 0 0;
}

.final-score-container::after {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
    border-radius: 0 0 8px 0;
}

.final-score-label {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
}

.final-score-value {
    font-size: clamp(3.5rem, 10vw, 5.5rem);
    font-weight: 700;
    color: #fbbf24;
    text-shadow: 0 4px 24px rgba(251, 191, 36, 0.5);
    animation: scoreReveal 0.5s ease-out;
}

.new-record {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fbbf24;
    margin-bottom: var(--spacing-md);
    padding: 0.75rem 1.5rem;
    background: rgba(251, 191, 36, 0.1);
    border: 2px solid rgba(251, 191, 36, 0.4);
    border-radius: var(--radius-md);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.record-icon {
    color: #fbbf24;
    font-size: 1rem;
}

.game-over-buttons,
.pause-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-md);
}

/* Settings */
.settings-options {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    transition: background 0.2s ease;
}

.setting-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.setting-label {
    font-weight: 600;
    color: var(--text-primary);
}

.toggle-button {
    position: relative;
    width: 80px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--ui-glass-border);
    border-radius: 18px;
    cursor: pointer;
    transition: all var(--transition-fast);
    overflow: hidden;
}

.toggle-button.active {
    background: linear-gradient(135deg, var(--primary-gradient-start), var(--primary-gradient-end));
}

.toggle-on,
.toggle-off {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    transition: opacity var(--transition-fast);
}

.toggle-on {
    left: 12px;
    color: white;
    opacity: 0;
}

.toggle-off {
    right: 12px;
    color: var(--text-secondary);
}

.toggle-button.active .toggle-on {
    opacity: 1;
}

.toggle-button.active .toggle-off {
    opacity: 0;
}

/* Credits Styles */
.credits-info {
    margin: 30px 0;
    text-align: center;
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    position: relative;
}

.credits-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-gradient-start), var(--accent-color));
    border-radius: 2px;
}

.credits-game {
    font-family: 'Righteous', cursive;
    font-size: 1.8rem;
    font-weight: 400;
    margin: 0.5rem 0 0.75rem 0;
    background: linear-gradient(135deg, #fff, #a8a8a8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.credits-dev {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 500;
}

.social-links {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
}

.social-link {
    padding: 0.875rem 1.75rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-link:hover {
    background: linear-gradient(135deg, var(--primary-gradient-start), var(--primary-gradient-end));
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}

/* ========================================
   Leaderboard Styles
   ======================================== */
.leaderboard-container {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: var(--spacing-md);
}

.leaderboard-header {
    display: grid;
    grid-template-columns: 60px 1fr 80px;
    padding: 0.75rem 1rem;
    background: rgba(99, 102, 241, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.leaderboard-list {
    max-height: 250px;
    overflow-y: auto;
}

.leaderboard-item {
    display: grid;
    grid-template-columns: 60px 1fr 80px;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s ease;
}

.leaderboard-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.leaderboard-item.current-player {
    background: rgba(99, 102, 241, 0.15);
}

.leaderboard-item.top-3 .lb-rank {
    font-weight: 700;
}

.leaderboard-item.rank-1 .lb-rank { color: #ffd700; }
.leaderboard-item.rank-2 .lb-rank { color: #c0c0c0; }
.leaderboard-item.rank-3 .lb-rank { color: #cd7f32; }

.lb-rank {
    font-weight: 600;
    color: var(--text-secondary);
}

.lb-name {
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lb-score {
    font-weight: 700;
    color: #fbbf24;
    text-align: right;
}

.player-name-input {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    max-width: 300px;
    margin-bottom: var(--spacing-md);
}

.player-name-input label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

.player-name-input input {
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.player-name-input input:focus {
    outline: none;
    border-color: var(--primary-gradient-start);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.player-name-input input::placeholder {
    color: var(--text-muted);
}

.save-name-btn {
    margin-top: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, var(--primary-gradient-start), var(--primary-gradient-end));
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.save-name-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.save-name-btn:active {
    transform: translateY(0);
}

.leaderboard-empty {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
}

/* Modal Styles */
.modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-title {
    font-family: 'Righteous', cursive;
    font-size: 1.5rem;
    font-weight: 400;
    margin: 0 0 1.5rem 0;
    text-align: center;
    letter-spacing: 0.05em;
    position: relative;
    padding-bottom: 1rem;
}

.modal-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-gradient-start), var(--accent-color));
    border-radius: 1px;
}

.share-url-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.share-url-input {
    flex: 1;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: 'Exo 2', monospace;
}

.copy-button {
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-gradient-start), var(--primary-gradient-end));
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.copy-button:hover {
    background: linear-gradient(135deg, #7c7ff6, #9d5ff9);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

/* Speaker Icon Styles */
.speaker-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.speaker-cone {
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 12px solid white;
    position: relative;
}

.speaker-cone::before {
    content: '';
    position: absolute;
    left: -12px;
    top: -4px;
    width: 6px;
    height: 8px;
    background: white;
    border-radius: 2px 0 0 2px;
}

.sound-wave {
    position: absolute;
    right: 20px;
    width: 3px;
    height: 6px;
    background: white;
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toggle-button.active .sound-wave {
    opacity: 1;
}

.sound-wave.wave-1 {
    right: 18px;
    height: 8px;
    animation: soundWave 1.5s ease-in-out infinite;
    animation-delay: 0s;
}

.sound-wave.wave-2 {
    right: 12px;
    height: 12px;
    animation: soundWave 1.5s ease-in-out infinite;
    animation-delay: 0.2s;
}

.sound-wave.wave-3 {
    right: 6px;
    height: 16px;
    animation: soundWave 1.5s ease-in-out infinite;
    animation-delay: 0.4s;
}

.speaker-muted {
    position: absolute;
    right: 15px;
    font-size: 1.2rem;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toggle-button:not(.active) .speaker-muted {
    opacity: 1;
}

.toggle-button:not(.active) .speaker-cone {
    border-left-color: rgba(255, 255, 255, 0.5);
}

.toggle-button:not(.active) .speaker-cone::before {
    background: rgba(255, 255, 255, 0.5);
}

@keyframes soundWave {
    0%, 100% {
        transform: scaleY(0.5);
        opacity: 0.6;
    }
    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}

/* Keep toggle text styles for other buttons */
.toggle-on,
.toggle-off {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    transition: opacity var(--transition-fast);
}

.toggle-on {
    left: 12px;
    color: white;
    opacity: 0;
}

.toggle-off {
    right: 12px;
    color: var(--text-secondary);
}

#contrast-toggle.active .toggle-on {
    opacity: 1;
}

#contrast-toggle.active .toggle-off {
    opacity: 0;
}

/* Loading Screen */
.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--ui-glass);
    border-top-color: var(--primary-gradient-start);
    border-radius: var(--radius-full);
    animation: spin 1s linear infinite;
    margin-bottom: var(--spacing-md);
}

.loading-text {
    font-size: 1rem;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
    margin-bottom: var(--spacing-sm);
}

.loading-bar-container {
    width: 200px;
    height: 6px;
    background: var(--ui-glass);
    border-radius: 3px;
    overflow: hidden;
}

.loading-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-gradient-start), var(--accent-color));
    border-radius: 3px;
    transition: width var(--transition-normal);
}

/* Floating Elements (Start Screen Decoration) */
.floating-elements {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}

.float-element {
    position: absolute;
    opacity: 0.3;
}

.float-element.cloud {
    width: 100px;
    height: 40px;
    background: white;
    border-radius: 20px;
    animation: floatCloud var(--duration, 20s) linear infinite;
    animation-delay: var(--delay, 0s);
}

.float-element.cloud::before,
.float-element.cloud::after {
    content: '';
    position: absolute;
    background: white;
    border-radius: 50%;
}

.float-element.cloud::before {
    width: 50px;
    height: 50px;
    top: -25px;
    left: 15px;
}

.float-element.cloud::after {
    width: 35px;
    height: 35px;
    top: -15px;
    left: 50px;
}

.float-element.star {
    width: 10px;
    height: 10px;
    background: var(--score-color);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    animation: twinkle var(--duration, 2s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}

/* FPS Counter */
#fps-counter {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #0f0;
    font-family: monospace;
    font-size: 12px;
    border-radius: 4px;
    z-index: 1000;
}

/* ========================================
   Utility Classes
   ======================================== */
.hidden {
    display: none !important;
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: translateX(-50%) scale(1);
    }

    50% {
        transform: translateX(-50%) scale(1.05);
    }
}

@keyframes shimmer {

    0%,
    100% {
        filter: brightness(1) saturate(1);
    }

    50% {
        filter: brightness(1.2) saturate(1.1);
    }
}

@keyframes floatBob {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes scorePulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
        text-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes pauseGlow {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(102, 126, 234, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 25px rgba(102, 126, 234, 0.8));
    }
}

@keyframes scoreReveal {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes celebrate {
    0% {
        transform: scale(1) rotate(-2deg);
    }

    100% {
        transform: scale(1.05) rotate(2deg);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes timerDecrease {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

@keyframes floatCloud {
    from {
        transform: translateX(-150px);
    }

    to {
        transform: translateX(calc(100vw + 150px));
    }
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.3);
    }
}

@keyframes powerUpPulse {
    0%, 100% {
        transform: translateX(-50%) scale(1);
        border-color: rgba(255, 255, 255, 0.3);
        box-shadow: 0 0 20px rgba(0, 217, 255, 0.5), 0 0 40px rgba(0, 217, 255, 0.3);
    }
    50% {
        transform: translateX(-50%) scale(1.05);
        border-color: rgba(255, 255, 255, 0.8);
        box-shadow: 0 0 30px rgba(0, 217, 255, 0.8), 0 0 60px rgba(0, 217, 255, 0.5);
    }
}

@keyframes powerUpIconSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 600px) {
    #hud {
        padding: var(--spacing-sm);
    }

    #score-container,
    #high-score-container {
        min-width: 80px;
        padding: var(--spacing-xs);
    }

    #score-value {
        font-size: 1.2rem;
    }

    .game-button {
        min-width: 160px;
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .instructions {
        gap: var(--spacing-md);
    }

    .key {
        min-width: 40px;
        height: 40px;
    }
}

/* Touch Device / Mobile Styles */
.mobile-only {
    display: none;
}

@media (hover: none) and (pointer: coarse) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: flex !important;
    }

    /* Larger touch targets for buttons */
    .game-button {
        min-height: 56px;
        min-width: 200px;
        font-size: 1.1rem;
        padding: var(--spacing-md) var(--spacing-lg);
    }

    .hud-button {
        width: 52px;
        height: 52px;
        font-size: 1.6rem;
    }

    /* Larger score displays */
    #score-container,
    #high-score-container {
        padding: var(--spacing-sm) var(--spacing-md);
        min-width: 90px;
    }

    #score-value {
        font-size: 1.3rem;
    }

    #high-score-value {
        font-size: 1.1rem;
    }

    /* Larger instruction keys */
    .key {
        min-width: 80px;
        height: 44px;
        font-size: 0.9rem;
    }

    /* Scale game title for mobile */
    .game-title {
        font-size: 2.5rem;
    }

    .game-subtitle {
        font-size: 1rem;
    }
}

/* ========================================
   Loading Screen
   ======================================== */
.loading-screen {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    animation: fadeIn 0.5s ease-out;
}

.loading-screen.fade-out {
    animation: fadeOut 0.5s ease-out forwards;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.loading-title {
    display: flex;
    flex-direction: column;
    margin-bottom: var(--spacing-xl);
}

.loading-bar-container {
    width: 300px;
    margin-bottom: var(--spacing-md);
}

.loading-bar {
    position: relative;
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: visible;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.loading-bar-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-gradient-start), var(--accent-color));
    border-radius: 12px;
    width: 0%;
    animation: loadingProgress 2s ease-in-out forwards;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.5);
}

.loading-bar-glow {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 12px;
    width: 0%;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    border-radius: 6px;
    filter: blur(8px);
    opacity: 0.8;
    animation: loadingProgress 2s ease-in-out forwards, pulseGlow 1.5s ease-in-out infinite;
}

.loading-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    letter-spacing: 0.2em;
    animation: fadeInOut 1.5s ease-in-out infinite;
}

@keyframes loadingProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* ========================================
   Confetti Celebration
   ======================================== */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -10px;
    opacity: 0;
    animation: confettiFall 3s ease-in forwards;
}

@keyframes confettiFall {
    0% {
        top: -10px;
        opacity: 1;
        transform: translateX(0) rotateZ(0deg);
    }
    100% {
        top: 100vh;
        opacity: 0;
        transform: translateX(calc(-50px + 100px * var(--random))) rotateZ(720deg);
    }
}

/* Rotate Device Overlay - Hidden by default */
.rotate-prompt {
    display: none;
}

/* Landscape mode adjustments for better fit */
@media (orientation: landscape) and (max-height: 500px) {
    /* Reduce spacing variables for landscape */
    :root {
        --spacing-xs: 0.25rem;
        --spacing-sm: 0.5rem;
        --spacing-md: 0.75rem;
        --spacing-lg: 1rem;
        --spacing-xl: 1.5rem;
    }

    /* Scale down HUD elements */
    #hud {
        padding: var(--spacing-sm);
    }

    #score-container,
    #high-score-container {
        min-width: 70px;
        padding: 0.25rem 0.5rem;
    }

    #score-label,
    #high-score-label {
        font-size: 0.55rem;
    }

    #score-value {
        font-size: 1rem;
    }

    #high-score-value {
        font-size: 0.9rem;
    }

    .hud-button {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
        top: calc(var(--spacing-sm) + 50px);
    }

    /* Compact screen content */
    .screen-content {
        padding: var(--spacing-md) var(--spacing-sm);
        max-width: 90%;
    }

    /* Smaller game title */
    .title-line {
        font-size: clamp(2rem, 8vw, 3rem);
        letter-spacing: 0.05em;
    }

    .game-subtitle {
        font-size: 0.75rem;
        letter-spacing: 0.2em;
        margin-bottom: var(--spacing-sm);
    }

    /* Compact instructions */
    .instructions {
        gap: var(--spacing-sm);
        margin-bottom: var(--spacing-md);
    }

    .instruction-item {
        gap: 0.25rem;
    }

    .key {
        min-width: 40px;
        height: 40px;
        font-size: 0.85rem;
        padding: 0 0.5rem;
    }

    .action {
        font-size: 0.65rem;
    }

    /* Smaller buttons */
    .game-button {
        min-width: 160px;
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        border-radius: var(--radius-md);
    }

    .game-button.secondary {
        margin-top: 0.25rem;
    }

    .button-icon {
        font-size: 1rem;
    }

    /* Compact game over/pause/settings screens */
    .game-over-title,
    .pause-title,
    .settings-title {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
        margin-bottom: var(--spacing-sm);
    }

    .final-score-container {
        margin-bottom: var(--spacing-sm);
    }

    .final-score-label {
        font-size: 0.75rem;
    }

    .final-score-value {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .new-record {
        font-size: 0.9rem;
        margin-bottom: var(--spacing-sm);
    }

    .game-over-buttons,
    .pause-buttons {
        gap: 0.25rem;
        margin-top: var(--spacing-sm);
    }

    /* Compact settings */
    .settings-options {
        gap: 0.5rem;
        margin-bottom: var(--spacing-sm);
    }

    .setting-item {
        padding: 0.5rem;
    }

    .toggle-button {
        width: 60px;
        height: 28px;
        border-radius: 14px;
    }

    .speaker-cone {
        border-top: 6px solid transparent;
        border-bottom: 6px solid transparent;
        border-left: 9px solid white;
    }

    .speaker-cone::before {
        left: -9px;
        top: -3px;
        width: 5px;
        height: 6px;
    }

    .sound-wave {
        width: 2px;
        height: 5px;
    }

    .sound-wave.wave-1 {
        right: 14px;
        height: 6px;
    }

    .sound-wave.wave-2 {
        right: 9px;
        height: 9px;
    }

    .sound-wave.wave-3 {
        right: 4px;
        height: 12px;
    }

    .speaker-muted {
        right: 12px;
        font-size: 1rem;
    }

    /* Power-up indicator */
    #power-up-indicator {
        top: var(--spacing-sm);
        padding: 0.25rem 0.5rem;
    }

    #power-up-icon {
        font-size: 1rem;
    }

    #power-up-timer {
        width: 50px;
        height: 5px;
    }

    /* Performance badge */
    .performance-badge {
        top: var(--spacing-sm);
        right: calc(var(--spacing-sm) + 45px);
        padding: 0.25rem 0.4rem;
        min-width: 65px;
    }

    .perf-label {
        font-size: 0.6rem;
    }

    .perf-value {
        font-size: 0.75rem;
        min-width: 24px;
    }

    .perf-close {
        width: 16px;
        height: 16px;
        font-size: 0.85rem;
        top: -6px;
        right: -6px;
    }

    /* Keyboard hints */
    .keyboard-hints {
        bottom: var(--spacing-sm);
        left: var(--spacing-sm);
        padding: 0.35rem;
        gap: 0.2rem;
    }

    .keyboard-hints kbd {
        min-width: 28px;
        height: 24px;
        font-size: 0.7rem;
        padding: 0 0.25rem;
    }

    .hint-item span {
        font-size: 0.65rem;
    }
}

/* Show rotate prompt only on touch devices in portrait mode */
@media (hover: none) and (pointer: coarse) and (orientation: portrait) {
    .rotate-prompt {
        display: flex;
        position: fixed;
        inset: 0;
        z-index: 9999;
        background: linear-gradient(135deg, #1a1a2e, #16213e);
        align-items: center;
        justify-content: center;
        flex-direction: column;
    }

    .rotate-content {
        text-align: center;
        padding: 2rem;
    }

    .rotate-icon-container {
        width: 80px;
        height: 120px;
        margin: 0 auto 1.5rem;
        position: relative;
        animation: rotateHint 2s ease-in-out infinite;
    }

    .phone-icon {
        display: block;
        width: 60px;
        height: 100px;
        border: 3px solid rgba(255, 255, 255, 0.8);
        border-radius: 10px;
        position: relative;
        margin: 0 auto;
    }

    .phone-icon::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 6px;
        height: 6px;
        background: rgba(255, 255, 255, 0.5);
        border-radius: 50%;
    }

    .phone-icon::after {
        content: '';
        position: absolute;
        bottom: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 16px;
        height: 16px;
        border: 2px solid rgba(255, 255, 255, 0.5);
        border-radius: 50%;
    }

    .rotate-content h2 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
        color: #fff;
    }

    .rotate-content p {
        font-size: 1rem;
        color: rgba(255, 255, 255, 0.7);
    }

    @keyframes rotateHint {

        0%,
        100% {
            transform: rotate(-15deg);
        }

        50% {
            transform: rotate(15deg);
        }
    }

    /* Hide game content in portrait */
    #game-canvas,
    #ui-layer {
        display: none;
    }
}