/*settings css */
/*settings for audio control */

#settings-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 40px;
    z-index: 1000;
}

/* SETTINGS BUTTON */

/*black jack chip style settings button */
#settings-button {
    font-weight: bold;
    color: white; 
    border: none;
    background: radial-gradient(circle at center, #b8860b 100%);
    overflow: hidden;
    z-index: 1000;
    bottom: 50px;
    position: fixed;
    width: 80px;
    height: 80px;
    transition: transform 0.2s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.6), inset 0 0 10px #fff3;
    text-transform: uppercase;
    border-radius: 50%;
    padding: 0;
    font-size: 10px;
    cursor: pointer;
}
/*if not disabled, hovering over it should make it pop up */
#settings-button:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

/*giving it those chip edges */
#settings-button::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: 50%;
    mask: radial-gradient(circle, transparent 0% 65%, black 65% 100%);
    -webkit-mask: radial-gradient(circle, transparent 0% 65%, black 65% 100%);
    pointer-events: none;
    background:
    conic-gradient(
        #fff8dc 0deg 10deg, #b8860b 10deg 20deg, #fff8dc 20deg 30deg, #b8860b 30deg 40deg, #fff8dc 40deg 50deg, #b8860b 50deg 60deg, #fff8dc 60deg 70deg, #b8860b 70deg 80deg, #fff8dc 80deg 90deg, #b8860b 90deg 100deg, #fff8dc 100deg 110deg, #b8860b 110deg 120deg, #fff8dc 120deg 130deg, #b8860b 130deg 140deg, #fff8dc 140deg 150deg, #b8860b 150deg 160deg, #fff8dc 160deg 170deg, #b8860b 170deg 180deg, #fff8dc 180deg 190deg, #b8860b 190deg 200deg, #fff8dc 200deg 210deg,
        #b8860b 210deg 220deg, #fff8dc 220deg 230deg, #b8860b 230deg 240deg, #fff8dc 240deg 250deg, #b8860b 250deg 260deg, #fff8dc 260deg 270deg, #b8860b 270deg 280deg, #fff8dc 280deg 290deg, #b8860b 290deg 300deg, #fff8dc 300deg 310deg, #b8860b 310deg 320deg, #fff8dc 320deg 330deg, #b8860b 330deg 340deg, #fff8dc 340deg 350deg, #b8860b 350deg 360deg
    );
}
#settings-button .inner {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(circle at center, #b8860b 100%);
}

#settings-button::after {
    content: attr(data-label);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 14px;
    max-width: 70%;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 2;
    text-shadow: 0 0 2px black;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
}

/*SETTINGS MENU */
/*styling for the semi-translucent settings menu that pops up */
#settings-menu {
    background: white;
    color: black;
    display: flex;
    flex-direction: column;
    font-family: 'Georgia', serif;
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.6);
    position: relative;
    width: auto;
    min-width: 300px;
    max-width: 400px;
    height: auto;
    max-height: none;
    overflow: visible;
    align-items: center;
    z-index: 9999;
    border: 3px solid black;
    pointer-events: auto;
    opacity: 1;
    transform: none;
    justify-content: flex-start;
    gap: 20px;
}

#settings-menu::before,
#settings-menu::after {
    content: "A♠️";
    position: absolute;
    font-size: 35px;
    font-family: 'Georgia', serif;
    font-weight: bold;
}

#settings-menu::before {
    top: 10px;
    left: 10px;
}

#settings-menu::after {
    bottom: 10px;
    right: 10px;
    transform: rotate(180deg);
}
#toggle-screen-reader {
    width: 160px;
    height: 60px;
    border-radius: 10px;
    padding: 10px 20px;
    background: linear-gradient(145deg, #f0f0f0, #dcdcdc);
    color: #222;
    text-align: center;
    display: flex;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    font-weight: bold;
    margin: 10px 0;
    font-family: 'Georgia', serif;
    justify-content: center;
    font-size: 16px;
    border: 2px solid #444;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3), inset 0 -2px 4px rgba(255,255,255,0.2), inset 0 2px 4px rgba(0,0,0,0.1);
}

#toggle-screen-reader:hover {
    transform: translateY(-2px);
    background: linear-gradient(145deg, #e8e8e8, #c8c8c8);
    box-shadow: 0 6px 14px rgba(0,0,0,0.6), 0 0 8px #ffd700;
}

#toggle-screen-reader.active {
    background: #fff8dc;
    border: 2px solid #ffd700;
    color: #000;
    transform: translateY(1px);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5),
    0 0 6px #ffd700;
    animation: button-glow 2s ease-in-out infinite;
}

#accessibility-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 15px;
}
#settings-menu.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
/* button for settings menu */
#settings-menu button {
    border: 2px solid #444;
    border-radius: 10px;
    color: #222;
    padding: 10px 20px;
    background: linear-gradient(145deg, #f0f0f0, #dcdcdc);
    width: 160px;
    height: 60px;
    margin: 10px 0;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3), inset 0 -2px 4px rgba(255,255,255,0.2), inset 0 2px 4px rgba(0,0,0,0.1);
    font-family: 'Georgia', serif;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    display: flex;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

#settings-menu button:hover {
    background: linear-gradient(145deg, #e8e8e8, #c8c8c8);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.4), 0 0 8px #ffd700;
}
/*glowing when active */
#settings-menu button.active {
    background: #fff8dc;
    border-color: #ffd700;
    transform: translateY(1px);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
    animation: button-glow 2s ease-in-out infinite;
}
/*styling so that it pops up with a semi-translucent overlay */
#settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.7);
    z-index: 9998; /*making it below the menu but above the rest of the UI */
    display: none;
    justify-content: center;
    align-items: center;
}

#settings-overlay.show {
    display: flex;
}

/*AUDIO CONTROLS */

#audio-controls-label {
    font-family: 'Georgia', serif;
    font-size: 18px;
    text-align: center;
    margin-bottom: 10px;
}
#audio-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

#toggle-music {
    background-color: #FFCCCB;
}
#toggle-music:hover {
    background-color: #FFCCCB;
}
#toggle-sound-effect {
    background-color: #FFCCCB;
}
/*Volume controls */

.volume-controls {
    margin-top: 1em;
}
.volume-controls label {
    color: #ffd700;
    display: block;
    font-weight: bold;
    margin-bottom: 0.25em;
    margin-top: 0.5em;
}

.volume-controls input[type="range"] {
    width: 100%;
}

/*neon sliders */
input[type="range"] {
    width: 100%;
    height: 12px;
    background: transparent;
    cursor: pointer;
    margin-top: 5px;
    margin-bottom: 10px;
}

input[type="range"]::-webkit-slider-runnable-track {
    height: 12px;
    background: rgba(255,215,0,0.1);
    border: 1px solid #ffd700;
    border-radius: 10px;
    box-shadow: 0 0 5px #ffd700aa, 0 0 15px #ffd70066, inset 0 0 5px #000;
}

input[type="range"]::-webkit-slider-thumb {
    width: 20px;
    height: 20px;
    margin-top: -4px;
    background: #ffd700;
    border: 2px solid #fff8dc;
    border-radius: 50%;
    box-shadow: 0 0 10px #ffd700cc, 0 0 20px #ffcc00aa, inset 0 0 5px #000;
}
input[type="range"]::-moz-range-track {
    height: 12px;
    background:rgba(255,215,0,0.1);
    border: 1px solid #ffd700;
    border-radius: 10px;
    box-shadow: 0 0 5px #ffd700aa, 0 0 15px #ffd70066, inset 0 0 5px #000;
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #ffd700;
    border: 2px solid #fff8dc;
    border-radius: 50%;
    box-shadow: 0 0 10px #ffd700cc, 0 0 20px #ffcc00aa, inset 0 0 5px #000;
    cursor: pointer;
}

input[type="range"]::-ms-track {
    height: 12px;
    background: transparent;
    border-color: transparent;
    color: transparent;
}

input[type="range"]:-ms-fill-lower {
    background: rgba(255,215,0,0.1);
    border: 1px solid #ffd700;
    border-radius: 10px;
}

input[type="range"]::-ms-fill-upper {
    background: rgba(255, 215, 0,0.1);
    border: 1px solid #ffd700;
    border-radius: 10px;
}

input[type="range"]::-ms-thumb {
    width: 20px;
    height: 20px;
    background: #ffd700;
    border: 2px solid #fff8dc;
    border-radius: 50%;
    box-shadow: 0 0 10px #ffd700cc, 0 0 20px #ffcc00aa, inset 0 0 5px #000;
}
/*glow for settings buttons */
.glow {
    animation: button-glow 2s ease-in-out infinite;
    box-shadow: 0 0 12px 4px rgba(255,215,0,0.8);
    background-color: #1f1f1f;
    color: #ffd700;
    transition: all 0.3s ease;
}

/*Language buttons */
#language-options {
    display: flex;
    gap: 5px;
    margin-top: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

#language-options .lang-btn {
    padding: 6px 10px;
    font-size: clamp(10px,2vw,13px);
    font-family: 'Georgia', serif;
    border: 1px solid #444;
    border-radius: 6px;
    background: #f5f5f5;
    color: #222;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 1px 1px 4px rgba(0,0,0,0.2);
    min-width: auto;
    max-width: 100px;
    max-height: 30px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#language-options .lang-btn:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

#language-options .lang-btn.active {
    background: #ffd700;
    color: #000;
    font-weight: bold;
    box-shadow: 0 0 6px #ffd700;
    animation: button-glow 2s ease-in-out infinite;
}

/*mobile queries to make sure that the screen adjusts */
@media (max-width: 480px), (max-height: 700px) {
    #settings-menu {
        width: 95%;
        max-width: none;
        padding: 20px;
        gap: 15px;
    }
    #settings-menu button {
        width: 120px;
        height: 60px;
        font-size: 14px;
    }
    #language-options .lang-btn {
        font-size: 11px;
        padding: 4px 8px;
        max-width: 80px;
    }
    #audio-controls-label {
        font-size: 16px;
    }
}