/* =============================================
   SCOREBOARD DROPDOWN
   ============================================= */

.mode-selector-container {
    text-align: center;
    margin-bottom: 25px;
    position: relative;
}

.mode-label {
    display: block;
    font-size: 10px;
    color: #00ff00;
    margin-bottom: 8px;
    letter-spacing: 1px;
    text-shadow: 1px 1px 0px #006600;
    font-family: 'Press Start 2P', cursive;
}

.custom-dropdown {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    user-select: none;
}

.dropdown-selected {
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
    border: 3px solid #8a2be2;
    color: #00ffff;
    padding: 12px 20px;
    font-size: 11px;
    font-family: 'Press Start 2P', cursive;
    letter-spacing: 1px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 
        inset 2px 2px 0 rgba(0, 0, 0, 0.5),
        0 0 15px rgba(138, 43, 226, 0.6);
    transition: all 0.2s;
    text-shadow: 1px 1px 0px #006666;
}

.dropdown-selected:hover {
    border-color: #00ffff;
    box-shadow: 
        inset 2px 2px 0 rgba(0, 0, 0, 0.5),
        0 0 25px rgba(0, 255, 255, 0.9);
}

.custom-dropdown.open .dropdown-selected {
    border-color: #00ffff;
    box-shadow: 
        inset 2px 2px 0 rgba(0, 0, 0, 0.5),
        0 0 30px rgba(0, 255, 255, 1);
}

.dropdown-arrow {
    color: #00ffff;
    font-size: 10px;
    transition: transform 0.2s;
    margin-left: 10px;
}

.custom-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-options {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
    border: 3px solid #00ffff;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2102;
    box-shadow: 
        inset 2px 2px 0 rgba(0, 0, 0, 0.5),
        0 0 30px rgba(0, 255, 255, 0.9);
}

.custom-dropdown.open .dropdown-options {
    max-height: 400px;
    opacity: 1;
}

.dropdown-option {
    padding: 12px 20px;
    font-size: 11px;
    font-family: 'Press Start 2P', cursive;
    letter-spacing: 1px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.15s;
    border-bottom: 1px solid rgba(138, 43, 226, 0.3);
    text-shadow: 1px 1px 0px #000000;
}

.dropdown-option:last-child {
    border-bottom: none;
}

.dropdown-option:hover {
    background: linear-gradient(90deg, rgba(138, 43, 226, 0.4) 0%, rgba(138, 43, 226, 0.2) 100%);
    color: #ffff00;
    text-shadow: 
        1px 1px 0px #999900,
        0 0 10px rgba(255, 255, 0, 0.6);
    padding-left: 25px;
}

.dropdown-option.active {
    background: linear-gradient(90deg, rgba(0, 255, 255, 0.2) 0%, rgba(0, 255, 255, 0.1) 100%);
    color: #00ffff;
    text-shadow: 
        1px 1px 0px #006666,
        0 0 10px rgba(0, 255, 255, 0.6);
}

.dropdown-option.active::before {
    content: '▶ ';
    color: #00ff00;
    margin-right: 5px;
}

/* =============================================
   SCOREBOARD MODAL
   ============================================= */

.scoreboard-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2100;
}

.scoreboard-modal.active {
    display: flex;
}

.scoreboard-modal.menu-mode {
    background: linear-gradient(180deg, #0a0a14 0%, #16213e 50%, #1a1a2e 100%);
}

.scoreboard-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
    padding: 30px;
    border-radius: 0;
    box-shadow: 
        0 0 0 4px #8a2be2,
        0 0 0 8px #00ffff,
        0 0 40px rgba(138, 43, 226, 0.9);
    border: 4px solid #0f0f1e;
    max-width: 550px;
    width: 90%;
    text-align: center;
    max-height: 85vh;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.scoreboard-content h3 {
    color: #00ffff;
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: normal;
    text-shadow: 
        3px 3px 0px #0066cc,
        0 0 15px rgba(0, 255, 255, 0.8);
    letter-spacing: 2px;
}

.scoreboard-content button {
    background: linear-gradient(180deg, #8a2be2 0%, #4b0082 100%);
    border: 4px solid #00ffff;
    color: #ffffff;
    box-shadow: 0 4px 0 #1a1a2e, 0 0 15px rgba(138, 43, 226, 0.6);
    margin-top: 20px;
    width: 100%;
    padding: 12px;
    font-size: 11px;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.scoreboard-content button:hover {
    background: linear-gradient(180deg, #9d3bff 0%, #5b0099 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #1a1a2e, 0 0 20px rgba(138, 43, 226, 0.8);
}

.scoreboard-content button:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #1a1a2e, 0 0 10px rgba(138, 43, 226, 0.6);
}

/* =============================================
   SCORE COLUMNS & ENTRIES
   ============================================= */

.score-columns {
    display: flex;
    gap: 20px;
    text-align: left;
}

.score-column {
    flex: 1;
    min-width: 0;
}

.column-title {
    color: #ffff00;
    font-size: 11px;
    font-family: 'Press Start 2P', cursive;
    text-align: center;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 0, 0.3);
    text-shadow: 2px 2px 0px #999900;
    letter-spacing: 1px;
}

.score-entry {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 6px;
    border-bottom: 1px solid rgba(138, 43, 226, 0.2);
    font-family: 'Press Start 2P', cursive;
    transition: background 0.15s;
}

.score-entry:last-child {
    border-bottom: none;
}

.score-entry:hover {
    background: rgba(138, 43, 226, 0.15);
}

.score-rank {
    color: #8a2be2;
    font-size: 9px;
    min-width: 30px;
    text-shadow: 1px 1px 0px #4b0082;
}

.score-rank[data-rank="1"] {
    color: #ffd700;
    text-shadow: 1px 1px 0px #996600;
}

.score-rank[data-rank="2"] {
    color: #c0c0c0;
    text-shadow: 1px 1px 0px #666666;
}

.score-rank[data-rank="3"] {
    color: #cd7f32;
    text-shadow: 1px 1px 0px #8b4513;
}

.score-initials {
    color: #00ffff;
    font-size: 10px;
    min-width: 35px;
    text-shadow: 1px 1px 0px #006666;
    letter-spacing: 1px;
}

.score-value {
    color: #ffffff;
    font-size: 10px;
    flex: 1;
    text-align: right;
    text-shadow: 1px 1px 0px #333333;
}

.score-mode-badge {
    font-size: 7px;
    color: #ff00ff;
    background: rgba(255, 0, 255, 0.15);
    border: 1px solid rgba(255, 0, 255, 0.4);
    padding: 2px 6px;
    text-shadow: 1px 1px 0px #990099;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.score-entry.new-score {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid rgba(0, 255, 0, 0.3);
    animation: newScorePulse 1.5s ease-in-out 3;
}

.score-entry.new-score .score-initials {
    color: #00ff00;
    text-shadow: 0 0 8px rgba(0, 255, 0, 0.6);
}

@keyframes newScorePulse {
    0%, 100% { background: rgba(0, 255, 0, 0.1); }
    50% { background: rgba(0, 255, 0, 0.2); }
}

.initials-prompt {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
    padding: 30px;
    border: 4px solid #00ffff;
    box-shadow: 
        0 0 0 4px #8a2be2,
        0 0 40px rgba(138, 43, 226, 0.9);
    display: none;
    text-align: center;
    z-index: 2200;
}

.initials-prompt.active {
    display: block;
}

.initials-prompt h3 {
    color: #ffff00;
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: normal;
    text-shadow: 
        2px 2px 0px #999900,
        0 0 15px rgba(255, 255, 0, 0.8);
    letter-spacing: 1px;
}

.initials-prompt p {
    color: #00ff00;
    margin-bottom: 10px;
    font-size: 10px;
    text-shadow: 1px 1px 0px #006600;
    letter-spacing: 1px;
}

.initials-prompt input {
    font-size: 24px;
    padding: 10px;
    width: 120px;
    text-align: center;
    text-transform: uppercase;
    border: 4px solid #8a2be2;
    border-radius: 0;
    margin: 10px;
    background: #0f0f1e;
    color: #00ffff;
    box-shadow: 
        inset 2px 2px 0 rgba(0, 0, 0, 0.8),
        0 0 15px rgba(138, 43, 226, 0.6);
    font-family: 'Press Start 2P', cursive;
    letter-spacing: 4px;
}

.initials-prompt input:focus {
    outline: none;
    border-color: #00ffff;
    box-shadow: 
        inset 2px 2px 0 rgba(0, 0, 0, 0.8),
        0 0 25px rgba(0, 255, 255, 0.9);
}

.initials-prompt button {
    margin-top: 10px;
}
