/* css/boostercatch.css */

:root {
    --font-heading: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --accent-gold: #FFD700;
    --accent-gold-bright: #FFF2A8;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: #111;
}

#game-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Close Button (Top Right) */
.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid var(--accent-gold);
    color: var(--accent-gold);
    font-size: 1.5rem;
    font-family: var(--font-heading);
    font-weight: bold;
    cursor: pointer;
    z-index: 60;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    transition: transform 0.1s, background 0.2s;
    outline: none;
}

.close-btn:hover {
    background: rgba(0,0,0,0.8);
    transform: scale(1.05);
}

.close-btn:active {
    transform: scale(0.95);
}

/* Overlays (Intro & End Screen) */
.overlay-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 15vh;
    font-family: var(--font-heading);
    color: white;
    box-sizing: border-box;
}

.overlay-screen h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
    margin-top: 0;
    text-shadow: 0 2px 10px rgba(255,215,0,0.5);
    color: var(--accent-gold);
    text-align: center;
}

#player-name {
    font-size: 1.5rem;
    padding: 15px;
    border-radius: 8px;
    border: none;
    text-align: center;
    margin-bottom: 30px;
    outline: none;
    width: 100%;
    max-width: 320px;
    box-sizing: border-box;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.intro-modes {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    width: 100%;
}

.overlay-btn {
    background: #222;
    border: 2px solid var(--accent-gold);
    color: white;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s, transform 0.1s;
    width: 100%;
    max-width: 320px;
    box-sizing: border-box;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.overlay-btn:hover {
    background: #333;
    transform: translateY(-2px);
}

.overlay-btn:active {
    transform: translateY(2px);
}

.overlay-btn strong {
    display: block;
    font-size: 1.4rem;
    margin-bottom: 5px;
    color: var(--accent-gold-bright);
}

.overlay-btn span {
    font-size: 1rem;
    color: #ccc;
}

/* Toggle Switch Styles */
.toggle-container {
    margin-top: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    color: #ccc;
    font-size: 1.1rem;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #444;
    transition: 0.2s;
    border-radius: 26px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.2s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--accent-gold);
}

input:checked + .slider:before {
    transform: translateX(24px);
    background-color: #111;
}

/* Simple text view for end stats (no extra frame) */
.end-stats-simple {
    margin-bottom: 30px;
    text-align: center;
}

.end-stats-simple .highlight {
    color: var(--accent-gold-bright);
    font-weight: bold;
    font-size: 3.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
    display: block;
}

.end-stats-simple .bpm-subtext {
    font-size: 1.2rem;
    color: #aaa;
    margin-top: 5px;
    display: block;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* Game Elements */
.boostercatch-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #333;
    user-select: none;
}

.boostercatch-svg {
    width: 100%;
    flex: 1;
    display: block;
}

.flame { opacity: 0; transition: opacity 0.05s; }
.flame.active { opacity: 0.9; }

/* Inactivity Hint Overlay */
.bc-hint-overlay {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 2rem;
    font-family: var(--font-heading);
    font-weight: bold;
    text-shadow: 0 2px 5px rgba(0,0,0,1);
    background: rgba(0, 0, 0, 0.6);
    padding: 15px 30px;
    border-radius: 50px;
    border: 2px solid var(--accent-gold);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 40;
    text-align: center;
    white-space: nowrap;
}

.bc-hint-overlay.visible {
    opacity: 1;
}

/* Bottom Bar */
.bc-bottom-bar {
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); 
    position: absolute;
    bottom: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px 20px;
    z-index: 20;
    font-family: var(--font-heading);
    min-height: 80px;
    box-sizing: border-box;
}

.bc-stats-label {
    color: #fff;
    font-size: 2rem;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    font-weight: bold;
}

/* Touch Controls */
.bc-touch-controls {
    position: absolute;
    bottom: 25px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 50;
    padding: 0 25px;
    box-sizing: border-box;
}

.bc-touch-side {
    display: flex;
    flex-direction: column;
    gap: 15px;
    pointer-events: auto;
}

.bc-touch-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    transition: background 0.1s, transform 0.1s;
    outline: none;
}

.bc-touch-btn.active {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0.92);
}

.bc-touch-btn svg {
    width: 36px;
    height: 36px;
    fill: white;
    pointer-events: none;
}