/**
 * style.css - One-Key Orchestra styling
 *
 * Dark theme with gold accents (#d4a574) matching Nick's website design.
 * Handles start screen, canvas positioning, and responsive layout.
 */

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

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #121218;
    color: #ffffff;
}

/* Game Canvas - Full screen background */
#gameCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Start Screen Overlay */
#startScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(18, 18, 24, 0.98) 0%, rgba(30, 25, 35, 0.98) 100%);
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

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

.start-content {
    text-align: center;
    max-width: 500px;
    padding: 40px 20px;
}

.start-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #d4a574 0%, #e8c9a8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 40px;
    font-weight: 300;
}

.instructions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.instruction-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
}

.key {
    background: rgba(212, 165, 116, 0.15);
    border: 1px solid rgba(212, 165, 116, 0.3);
    color: #d4a574;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    min-width: 70px;
}

.beat-preview {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 24px;
}

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

.beat-label {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    color: #121218;
}

.beat-name {
    font-size: 0.75rem;
    color: var(--color);
    font-weight: 500;
}

.genre-selector {
    margin-bottom: 32px;
}

.selector-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1px;
    margin-bottom: 12px;
    font-weight: 600;
}

.genre-options {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.genre-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 90px;
}

.genre-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.genre-btn.active {
    background: rgba(212, 165, 116, 0.15);
    border-color: #d4a574;
    color: #d4a574;
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.1);
}

.genre-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.genre-bpm {
    font-size: 0.7rem;
    opacity: 0.7;
}

.hint {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
    margin-bottom: 32px;
}

#startButton {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #d4a574 0%, #c49464 100%);
    color: #121218;
    border: none;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

#startButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(212, 165, 116, 0.3);
}

#startButton:active {
    transform: translateY(0);
}

#startButton svg {
    transition: transform 0.2s ease;
}

#startButton:hover svg {
    transform: translateX(2px);
}

.mobile-hint {
    margin-top: 24px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.3);
    display: none;
}

/* Mobile Styles */
@media (max-width: 600px) {
    .start-content h1 {
        font-size: 1.8rem;
    }

    .tagline {
        font-size: 0.95rem;
        margin-bottom: 30px;
    }

    .instruction-item {
        flex-direction: column;
        gap: 8px;
    }

    .beat-preview {
        gap: 12px;
    }

    .beat-label {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
    }

    .beat-name {
        font-size: 0.65rem;
    }

    .mobile-hint {
        display: block;
    }
}

/* Touch device optimization */
@media (hover: none) {
    #startButton:hover {
        transform: none;
        box-shadow: none;
    }

    .mobile-hint {
        display: block;
    }
}

/* Game Controls */
#homeButton,
#pauseButton {
    position: fixed;
    top: 20px;
    z-index: 20;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}

#pauseButton {
    right: 20px;
}

#homeButton {
    right: 80px;
}

#homeButton:hover,
#pauseButton:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

#homeButton.hidden,
#pauseButton.hidden {
    display: none;
}

/* Pause Button Icon handling */
#pauseButton .play-icon {
    display: none;
}

#pauseButton.paused .play-icon {
    display: block;
}

#pauseButton.paused .pause-icon {
    display: none;
}

/* Prevent text selection during gameplay */
body.playing {
    user-select: none;
    -webkit-user-select: none;
}

/* Hide scrollbars */
::-webkit-scrollbar {
    display: none;
}

body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}