:root {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-color: #ffffff;
    --highlight: #00ff88; /* Neon Green */
    --secondary: #bd00ff; /* Neon Purple */
    --error: #ff4444;
    --gray: #888;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 18, 18, 0.95);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.loading-overlay.hidden {
    display: none;
}

.loader {
    border: 5px solid #333;
    border-top: 5px solid var(--highlight);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.container {
    width: 100%;
    max-width: 600px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: -1px;
}

.highlight {
    color: var(--highlight);
}

.game-area {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Progress Bar */
.progress-container {
    position: relative;
    height: 30px;
    background: #333;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-bar {
    height: 100%;
    background: var(--highlight);
    width: 0%;
    transition: width 0.1s linear;
}

.segments {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
}

.segment {
    height: 100%;
    border-right: 1px solid #121212;
    opacity: 0.5;
}

.segment.active {
    background: rgba(255, 255, 255, 0.1);
}

/* Controls */
.controls {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.control-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    font-size: 24px;
    cursor: pointer;
    background: var(--text-color);
    color: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s;
}

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

/* Guesses */
.guesses-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-height: 200px; /* Space for guesses */
}

.guess-row {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid #333;
    border-radius: 4px;
    background: var(--card-bg);
    font-size: 0.9rem;
}

.guess-row.skipped {
    color: var(--gray);
    border-color: #333;
}

.guess-row.wrong {
    border-color: var(--error);
    color: var(--error);
}

.guess-row.correct {
    border-color: var(--highlight);
    color: var(--highlight);
}

/* Input Area */
.input-area {
    display: flex;
    gap: 10px;
    flex-direction: column;
}

.search-box {
    position: relative;
    width: 100%;
}

input[type="text"] {
    width: 100%;
    padding: 15px;
    background: var(--card-bg);
    border: 1px solid #444;
    color: white;
    font-size: 1rem;
    border-radius: 4px;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--highlight);
}

.search-results {
    position: absolute;
    bottom: 100%; /* Show above input */
    left: 0;
    width: 100%;
    background: #252525;
    border: 1px solid #444;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    border-radius: 4px 4px 0 0;
}

.search-result-item {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-result-item:hover {
    background: #333;
}

.search-result-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 2px;
}

.action-btn {
    padding: 15px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
    text-transform: uppercase;
}

.action-btn.skip {
    background: #333;
    color: white;
}

.action-btn.primary {
    background: var(--highlight);
    color: var(--bg-color);
}

.action-btn.secondary {
    background: transparent;
    border: 1px solid var(--gray);
    color: var(--gray);
}
.action-btn.secondary:hover {
    border-color: var(--text-color);
    color: var(--text-color);
}


/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    max-width: 90%;
    width: 400px;
    border: 1px solid var(--highlight);
}

.song-reveal img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}