/* =============================================
   SETTINGS MODAL
   NOTE: toggle-button and settings-link use
   !important to prevent theme CSS from bleeding
   into the modal. See modal-scoreboard.css for
   the same pattern on scoreboard buttons.
   ============================================= */

.settings-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;
}

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

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

.settings-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: 500px;
    width: 90%;
}

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

.settings-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(138, 43, 226, 0.3);
}

.settings-section:last-of-type {
    border-bottom: none;
    margin-bottom: 10px;
}

.settings-section h4 {
    color: #ff00ff;
    font-size: 12px;
    font-weight: normal;
    margin-bottom: 15px;
    text-shadow: 2px 2px 0px #990099;
    letter-spacing: 1px;
}

.toggle-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toggle-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: rgba(15, 15, 30, 0.6);
    border: 2px solid rgba(138, 43, 226, 0.3);
}

.toggle-label {
    color: #ffffff;
    font-size: 10px;
    letter-spacing: 0.5px;
}

.toggle-button {
    background: linear-gradient(180deg, #8a2be2 0%, #4b0082 100%) !important;
    border: 3px solid #00ffff !important;
    padding: 6px 16px;
    font-size: 9px;
    color: #ffffff !important;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 
        0 3px 0 #0f0f1e,
        0 0 10px rgba(138, 43, 226, 0.5) !important;
    font-family: 'Press Start 2P', cursive;
    letter-spacing: 1px;
    min-width: 60px;
}

.toggle-button:hover {
    background: linear-gradient(180deg, #9d3bff 0%, #5b0099 100%) !important;
    box-shadow: 
        0 3px 0 #0f0f1e,
        0 0 15px rgba(138, 43, 226, 0.8) !important;
}

.toggle-button:active {
    transform: translateY(2px);
    box-shadow: 
        0 1px 0 #0f0f1e,
        0 0 8px rgba(138, 43, 226, 0.5) !important;
}

.toggle-button.active {
    background: linear-gradient(180deg, #00ff00 0%, #00aa00 100%) !important;
    border-color: #00ffff !important;
    box-shadow: 
        0 3px 0 #0f0f1e,
        0 0 15px rgba(0, 255, 0, 0.8) !important;
}

.toggle-button.active .toggle-status {
    color: #000000;
    text-shadow: none;
}

.toggle-status {
    font-weight: normal;
}

.settings-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-link {
    background: linear-gradient(180deg, #2d2d44 0%, #1a1a2e 100%) !important;
    border: 3px solid #8a2be2 !important;
    padding: 12px;
    font-size: 11px;
    color: #00ffff !important;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 
        0 4px 0 #0f0f1e,
        0 0 10px rgba(138, 43, 226, 0.4) !important;
    font-family: 'Press Start 2P', cursive;
    letter-spacing: 1px;
    text-align: left;
}

.settings-link:hover {
    background: linear-gradient(180deg, #3d3d54 0%, #2a2a3e 100%) !important;
    border-color: #00ffff !important;
    box-shadow: 
        0 4px 0 #0f0f1e,
        0 0 20px rgba(0, 255, 255, 0.7) !important;
}

.settings-link:active {
    transform: translateY(3px);
    box-shadow: 
        0 1px 0 #0f0f1e,
        0 0 10px rgba(138, 43, 226, 0.4) !important;
}

.settings-content > button {
    background: linear-gradient(180deg, #8a2be2 0%, #4b0082 100%) !important;
    border: 4px solid #00ffff !important;
    color: #ffffff !important;
    box-shadow: 0 4px 0 #1a1a2e, 0 0 15px rgba(138, 43, 226, 0.6) !important;
    margin-top: 20px;
    width: 100%;
}
