
/* CSS for Scatdle */



/* Font */
@font-face {
    font-family: 'Funiko';
    src: url('https://dcwelch.io/scatdle/fonts/FunikoRoman-Regular.woff2') format('woff2'),
         url('https://dcwelch.io/scatdle/fonts/FunikoRoman-Regular.ttf') format('truetype');
}

*:not(.popup):not(.popup *),
*:not(.popup):not(.popup *)::before,
*:not(.popup):not(.popup *)::after {
    font-family: 'Funiko', Arial, sans-serif;
}

.popup, .popupText, .popupImage, .totalScoreContainer, .songArtistTotals, .statTable {
    font-family: 'Open Sans', sans-serif;
}

a {
    color: var(--link-color); /*#6959FF;*/
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}



/* top */
html, body {
	padding-top: env(safe-area-inset-top);
	color: var(--text-color);
    margin: 0;
    padding: 0;
	gap: 0;
    height: 100%;
    width: 100%;
}

body {
    text-align: center;
    background-color: var(--bg-color); /*#f0f0f0;*/
    text-transform: uppercase;
	display: flex;
	justify-content: center;
    align-items: center;
	visibility: hidden;
}

body.fonts-loaded {
    visibility: visible;
}



/* In this case, the gameWrapper is just the full view port */
#gameWrapper {
    display: flex;
    justify-content: center;
	align-items: center;
    width: 100vw;
    height: 100dvh;
	margin: 0;
    padding: 0;
	gap: 0;
}

/* The gameContainer is the maximum 2:3 width:height rectangle within the gameWrapper */
#gameContainer {
    aspect-ratio: 2 / 3;
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
	align-items: center;
	margin: 0;
    padding: 0;
	gap: 0;
	overflow-x: hidden;
}

/* When the screen is tall, gameContainer is pressed to the top of the gameWrapper */
@media (min-aspect-ratio: 2 / 3) {
    #gameContainer {
        height: 100%;
        width: auto;
    }
}

/* When the screen is wide, gameContainer centered within the gameWrapper */
@media (max-aspect-ratio: 2 / 3) {
    #gameWrapper {
        align-items: flex-start;
    }
}



/* Light and Dark Modes */
:root {
    --bg-color: #f0f0f0;
    --text-color: #000;
    --button-bg: #6959FF;
    --button-hover: #8374FF;
    --popup-bg: linear-gradient(to bottom, #ffffff, #dcdcdc);
    --popup-text: #000;
    --link-color: #6959FF;
    --overlay-bg: rgba(0, 0, 0, 0.7);
    --give-up-bg: #F92F60;
    --give-up-hover: #d8264e;
    --answer-bg: white;
    --highlight-green: #00D26A;
    --highlight-red: #F92F60;
    --dropdown-bg: white;
    --dropdown-hover: #f1f1f1;
    --share-bg: #f9f9f9;
    --share-hover: #F0EEFF;
    --tooltip-bg: #333;
	--table-header-bg: #f2f2f2;
    --table-border-color: #ccc;
    --table-row-even-bg: #f2f2f2;
    --table-row-odd-bg: #ffffff;
}

.dark-mode {
    --bg-color: #121212;
    --text-color: #ffffff;
    --button-bg: #4c3aff;
    --button-hover: #6b5aff;
    --popup-bg: linear-gradient(to bottom, #333333, #222222);
    --popup-text: #ffffff;
    --link-color: #9a8cff;
    --overlay-bg: rgba(255, 255, 255, 0.1);
    --give-up-bg: #b00020;
    --give-up-hover: #d8264e;
    --answer-bg: #333333;
    --highlight-green: #00d26a;
    --highlight-red: #F92F60;
    --dropdown-bg: #222222;
    --dropdown-hover: #444444;
    --share-bg: #181818;
    --share-hover: #292929;
    --tooltip-bg: #444;
	--table-header-bg: #333;
    --table-border-color: #555;
    --table-row-even-bg: #222;
    --table-row-odd-bg: #1a1a1a;
}

.dark-mode #settingsButton,
.dark-mode #infoButton,
.dark-mode #statsButton,
.dark-mode #shareButton,
.dark-mode #volumeIcon {
    filter: invert(1);
}



/* Effects that apply to most buttons (GIVE UP, NEXT SCAT, PLAY AGAIN) */
button {
	font-family: 'Funiko';
    flex: 0 0 auto;
    text-transform: uppercase;
    font-size: min(3dvh, 4.5vw);
    background-color: var(--button-bg);/*#6959FF;*/
    color: white;
    border: none;
    border-radius: min(0.5dvh, 0.75vw);
    cursor: pointer;
    box-sizing: border-box;
	padding: min(1dvh, 1.5vw);
}

button:hover {
    background-color: var(--button-hover);/*#8374FF;*/
}



/* For side-by-side buttons */
.buttonContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: min(2dvh, 3vw);
    max-width: 75vw;
    margin: min(2dvh, 3vw);
    padding: min(1dvh, 1.5vw);
    box-sizing: border-box;
    flex: 0 0 auto;
    flex-wrap: wrap;
}



/* Stats, Info, and Settings menu icons / buttons */
#topMenu {
    display: flex;
    align-items: center;
	justify-content: space-evenly;
	gap: min(5.3dvh, 7.95vw);
    position: fixed;
    top: 0;
    left: 50%;
	transform: translateX(-50%);
	height: min(5dvh, 7.5vw);
	padding-top: min(0.5dvh, 0.75vw);
	padding-bottom: min(0.25dvh, 0.75vw);
    box-sizing: border-box;
    z-index: 900;
}

.menuIcon {
	height: 100%;
	aspect-ratio: 1 / 1;
	width: auto;
    cursor: pointer;
	z-index: 901;
}



/* Stats, Info, and Settings overlays (background darkening) */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-bg); /*rgba(0, 0, 0, 0.7);*/
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    z-index: 1000;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.overlay.show {
    visibility: visible;
    opacity: 1;
}



/* Stats, Info, and Settings popups */
.popup {
    text-transform: none;
    position: relative;
    background: var(--popup-bg); /*linear-gradient(to bottom, #ffffff, #dcdcdc);*/
    padding: 2rem;
    border-radius: min(2dvh, 3vw);
    text-align: center;
    width: 90%;
    max-width: 75vw;
    max-height: 75dvh;
	align-items: center;
    justify-content: center;
    overflow-y: auto;
	overflow-x: hidden;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.5), 
                0 8px 12px rgba(0, 0, 0, 0.3),
                inset 0 2px 4px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(-30px);
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 1010;
}

.popup.enter {
    transform: translateY(0);
    opacity: 1;
}

.popup.exit {
    transform: translateY(-30px);
    opacity: 0;
}

.popupText {
    font-size: min(2.25dvh, 3.375vw);
    margin-bottom: min(1dvh, 1.5vw);
}

.popupImage {
    width: 100%;
    max-width: 400px;
    margin: 1rem auto;
}

#closeInfoOverlayButton,
#closeStatOverlayButton,
#closeSettingsOverlayButton,
#closeShareOverlayButton {
    position: absolute;
    top: 1%;
    right: 1%;
    background: none;
    border: none;
    color: #9a9a9a;
    font-size: min(3dvh, 4.5vw);
    font-weight: bold;
    cursor: pointer;
    z-index: 1050;
}

#closeInfoOverlayButton:hover,
#closeStatOverlayButton:hover,
#closeSettingsOverlayButton:hover,
#closeShareOverlayButton:hover {
    color: #707070;
}

#closeInfoOverlayButton:focus,
#closeStatOverlayButton:focus,
#closeSettingsOverlayButton:focus,
#closeShareOverlayButton:focus {
    outline: none;
}

#variantSelect,
#scatSelect {
    font-size: min(1.5dvh, 2.25vw);
    text-align: center;
}



/* Settings-specific */
.settingsOption {
    display: flex;
    align-items: center;
    gap: min(0.75dvh, 1.125vw);
    font-size: min(2dvh, 3vw);
    white-space: nowrap;
    margin-bottom: min(1dvh, 1.5vw);
}

.sliderToggle {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.sliderLabel {
    position: relative;
    display: inline-block;
    width: min(6dvh, 9vw);
    height: min(3dvh, 4.5vw);
    background-color: var(--slider-bg, grey); /*grey;*/
    border-radius: min(1.5dvh, 2.25vw);
    transition: background-color 0.3s ease;
    box-shadow: inset 0 0 min(0.375dvh, 0.5625vw) rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.sliderLabel::before {
    content: '';
    position: absolute;
    width: min(2.4dvh, 3.6vw);
    height: min(2.4dvh, 3.6vw);
    top: min(0.3dvh, 0.45vw);
    left: min(0.3dvh, 0.45vw);
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 min(0.3dvh, 0.45vw) min(0.6dvh, 0.9vw) rgba(0, 0, 0, 0.2);
}

.sliderToggle:checked + .sliderLabel {
    background-color: #6959FF;
}

.sliderToggle:checked + .sliderLabel::before {
    transform: translateX(min(3dvh, 4.5vw));
}

.sliderText {
    margin-left: min(0.75dvh, 1.125vw);
    font-size: min(2dvh, 3vw);
}

.sliderHint {
    font-size: min(1dvh, 1.5vw);
    color: #666;
    margin-left: min(0.75dvh, 1.125vw);
    text-align: left;
    line-height: 1.2;
    white-space: nowrap;
}

.settingsGroup {
    display: flex;
    align-items: center;
    margin-bottom: min(1.5dvh, 2.25vw);
    gap: min(0.75dvh, 1.125vw);
}

#dateRangeSettings {
	margin-top: min(4dvh, 6vw);
}

#genreSettings {
	margin-top: min(1.5dvh, 2.25vw);
	margin-bottom: 0;
}

#disableSongAutoplaySetting {
	margin-bottom: min(1.5dvh, 2.25vw);
}

.groupLabel {
    font-size: min(2dvh, 3vw);
    font-weight: bold;
    white-space: nowrap;
    margin-right: min(1.5dvh, 2.25vw);
}

.groupContent {
    display: flex;
    flex-direction: column;
    gap: min(0.75dvh, 1.125vw);
    padding-left: min(1dvh, 1.5vw);
}

.sliderRangeContainer {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: min(1dvh, 1.5vw);
    align-items: center;
    width: 100%;
    margin-top: min(1dvh, 1.5vw);
}

.noUi-target {
    width: 90%;
    margin: 0 auto;
}

.noUi-base {
    background: #ddd;
    border-radius: 5px;
}

.noUi-connect {
    background: #6959FF;
}

.noUi-handle {
    width: min(2.4dvh, 3.6vw);
    height: min(2.4dvh, 3.6vw);
    background: #fff;
    border: 2px solid #2196F3;
    border-radius: 50%;
    box-shadow: 0 min(0.3dvh, 0.45vw) min(0.6dvh, 0.9vw) rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.noUi-handle:hover {
    transform: scale(1.1);
}

.noUi-tooltip {
    background: #fff;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: min(1.2dvh, 1.8vw);
    text-align: center;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    pointer-events: none;
    transform: translate(-50%, -150%);
}



/* Stats-specific */
.totalScoreContainer {
    font-size: min(3dvh, 4.5vw);
    font-weight: bold;
    margin-bottom: 10px;
}

.totalScoreLabel,
.totalScoreValue {
    margin-right: 10px;
}

.songArtistTotals {
    font-size: min(2dvh, 3vw);
    margin-bottom: 10px;
	margin-right: 5px;
}

.songArtistTotals .label {
    margin-right: 10px;
    font-weight: bold;
}

.statTable {
	width: clamp(80%, 450px);
    margin: 0 auto;
    border-collapse: collapse;
}

.statTable th,
.statTable td {
	font-size: min(2dvh, 3vw);
    padding: 12px;
    text-align: center;
    border: 1px solid var(--table-border-color);
    width: 33.33%;
}

.statTable th {
    font-weight: bold;
    font-size: min(2dvh, 3vw);
    background-color: var(--table-header-bg);
    border: 1px solid var(--table-border-color);
    border-bottom: 3px double var(--table-border-color);
    padding-bottom: 8px;
}

.statTable tbody tr:nth-child(even) {
    background-color: var(--table-row-even-bg);
}

.statTable tbody tr:nth-child(odd) {
    background-color: var(--table-row-odd-bg);
}



/* Share-specific */
#sharePopup {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#shareLinkContainer,
#shareLinkContainer2,
#shareLinkContainer3 {
    display: flex;
    align-items: center;
    justify-content: center;
	gap: 10px;
    padding: 10px;
    background-color: var(--share-bg, #f9f9f9);
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    user-select: none;
	overflow: visible;
	white-space: nowrap;
	width: max(50%, 45dvh);
	max-width: 95%;
}

#shareLinkContainer:hover,
#shareLinkContainer2:hover,
#shareLinkContainer3:hover {
    background-color: var(--share-hover, #F0EEFF);
    border-color: #6959FF;
}

#chainLinkIcon,
#chainLinkIcon2,
#chainLinkIcon3 {
    height: min(3dvh, 4.5vw);
    object-fit: contain;
    pointer-events: none;
}

#shareLink,
#shareLink2,
#shareLink3 {
    flex: 1;
    border: none;
    background: transparent;
    color: #333;
    font-size: min(1.75dvh, 2.625vw);
    padding: 5px 0;
    text-transform: lowercase;
    pointer-events: none;
	color: #808080;
}

#copyNotification,
#copyNotification2,
#copyNotification3 {
    font-size: min(1dvh, 1.5vw);
    color: #00D26A;
    opacity: 0;
    visibility: hidden;
    margin-left: 10px;
    transition: none;
    z-index: 9999; 
}

#copyNotification.fade-out,
#copyNotification2.fade-out,
#copyNotification3.fade-out {
    transition: opacity 2s ease;
}

#shareVariantContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#variantSelect {
    width: auto;
    min-width: min(3dvh, 4.5vw);
    max-width: min(30dvh, 45vw);
    text-align: center;
	margin-bottom: min(1dvh, 1.5vw);
}

#scatSelect {
    width: auto;
    min-width: min(3dvh, 4.5vw);
    max-width: min(30dvh, 45vw);
    text-align: center;
	margin-bottom: min(1dvh, 1.5vw);
}

#socialShareContainer,
#socialShareContainer1,
#socialShareContainer2,
#socialShareContainer3 {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: min(0.5dvh, 0.75vw);
	margin-bottom: min(2dvh, 3vw);
}

#socialShareContainer img,
#socialShareContainer1 img,
#socialShareContainer2 img,
#socialShareContainer3 img {
    width: min(4dvh, 6vw);
    height: auto;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
}

#socialShareContainer img:hover,
#socialShareContainer1 img:hover,
#socialShareContainer2 img:hover,
#socialShareContainer3 img:hover {
    transform: scale(1.2);
}



/* Logo */
#logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0;
	z-index: 1;
	margin-top: min(3dvh, 4.5vw);
}

#gameLogo {
    width: 75%;
	z-index: 1;
}



/* Scat Number */
#currentQuestion {
    cursor: pointer;
    display: inline-block;
    margin: 0;
	padding: 0;
    text-align: center;
}

#questionNumber {
    position: relative;
	margin-top: 5%;
	margin-bottom: 3%;
	padding: 0;
	opacity: 0;
    visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

#questionNumber.show {
    opacity: 1;
    visibility: visible;
}

#questionNumber h2 {
    display: inline-flex;
    justify-content: center;
    align-items: baseline;
    font-size: min(8dvh, 12vw);
    gap: 0.25em;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
	line-height: 1;
    margin: 0;
    padding: 0;
}

#questionNumber h2 span {
    display: inline-block;
    min-width: 1ch;
    width: auto;
    text-align: center;
}



/* Scat and song play buttons */
#customAudioPlayer {
	position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: auto;
}

#audioButtonsContainer {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: auto;
}

.playButtonWrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: min(13.5dvh, 20.25vw);
    height: auto;
	padding-top: 0;
	padding-bottom: 0;
}

#songPlayButtonWrapper {
    position: absolute;
    top: 105%; 
    left: 50%;
    transform: translateX(-50%);
    width: min(13.5dvh, 20.25vw);
    height: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

#songPlayButtonWrapper.visible {
    opacity: 1;
    visibility: visible;
}

#scatPlayButton,
#songPlayButton {
    width: 100%;
    cursor: pointer;
    transition: transform 0.075s ease, opacity 0.2s ease, visibility 0.2s ease;
}

#scatPlayButton {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.9);
}

#scatPlayButton.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

#scatPlayButton:hover,
#songPlayButton:hover {
    transform: scale(1.05);
}

#scatPlayButton:active,
#songPlayButton:active {
    transform: scale(0.95);
}

@keyframes wiggle {
    0%, 100% {
        transform: rotate(0deg) scale(1);
    }
    25% {
        transform: rotate(-10deg) scale(1.05);
    }
    50% {
        transform: rotate(10deg) scale(1.05);
    }
    75% {
        transform: rotate(-10deg) scale(1.05);
    }
}

.playButtonWrapper.wiggle {
    animation: wiggle 0.5s ease-in-out 2;
}



/* Jump-to-scat dropdown menu */
#customDropdown {
    position: absolute;
    visibility: hidden;
    opacity: 0;
    display: block;
    top: 33%;
    left: 71%;
    transform: translateX(-50%);
    background-color: var(--dropdown-bg, white);
    border: 1px solid #ccc;
    border-radius: min(0.5dvh, 0.75vw);
	height: 50%;
    width: 20%;
    overflow-x: hidden;
    overflow-y: auto;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    box-sizing: border-box;
}

#customDropdown.show {
    visibility: visible;
    opacity: 1;
    display: block;
}

#customDropdown div {
    padding: 5%;
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
    font-size: min(2dvh, 3vw);
    line-height: 1.5;
    transition: background-color 0.2s ease;
    text-align: center;
    overflow: hidden;
    white-space: nowrap;
}

#customDropdown div:hover {
    background-color: background-color: var(--dropdown-hover, #f1f1f1);
}

#customDropdown .inactive {
    color: #aaa;
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}



/* Input text box */
#inputContainer {
    position: relative;
    display: flex;
    width: 95%;
    max-width: 100%;
	padding-top: min(10dvh, 15vw);
	margin: min(2dvh, 3vw);
    gap: min(1dvh, 1.5vw);
}

input[type="text"] {
    flex: 1;
	text-transform: uppercase;
    padding: min(1dvh, 1.5vw);
    border-radius: min(0.5dvh, 0.75vw);
    border: min(0.1dvh, 0.15vw) solid #ccc;
    box-sizing: border-box;
    font-size: min(3dvh, 4.5vw);
    transition: none;
    box-shadow: none;
    outline: none;
	box-sizing: border-box;
	height: 100%;
}

input[type="text"]:focus {
    border-color: #ccc;
    outline: none;
    box-shadow: none;
}

@keyframes inputWiggle {
    0% {
        transform: translateX(0);
        box-shadow: none;
    }
    15% {
        transform: translateX(-5px);
        box-shadow: 0 0 5px rgba(255, 0, 0, 1);
    }
    30% {
        transform: translateX(5px);
        box-shadow: 0 0 10px rgba(255, 0, 0, 0.6);
    }
    45% {
        transform: translateX(-3px);
        box-shadow: 0 0 8px rgba(255, 0, 0, 0.2);
    }
    60% {
        transform: translateX(3px);
        box-shadow: 0 0 6px rgba(255, 0, 0, 0);
    }
    75% {
        transform: translateX(-2px);
		box-shadow: none;
    }
    100% {
        transform: translateX(0);
        box-shadow: none;
    }
}

.inputWiggleEffect {
    animation: inputWiggle 0.4s ease;
}

@keyframes flash {
    0% {
        box-shadow: 0 0 10px yellow;
    }
    100% {
        box-shadow: none;
    }
}

.flashEffect {
    animation: flash 0.5s ease-out;
}



/* GIVE UP button */
#giveUp {
    background-color: #F92F60;
    color: white;
    border: none;
    border-radius: min(0.5dvh, 0.75vw);
    padding: min(1dvh, 1.5vw);
    cursor: pointer;
    font-size: min(3dvh, 4.5vw);
	box-sizing: border-box;
	height: 100%;
	margin: 0;
	gap: 0;
}

#giveUp:hover {
    background-color: #d8264e;
}



/* Answer boxes (correct or incorrect) */
#correctAnswers {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 15%;
    margin: 0;
    margin-top: min(1dvh, 1.5vw);
    padding-left: 5%;
    padding-right: 5%;
    padding-top: min(1dvh, 1.5vw);
    gap: 5%;
    font-size: 0;
    box-sizing: border-box;
    border: none;
    outline: none;
}

.answerBox {
    font-size: min(2dvh, 3vw);
    display: flex;
    width: 100%;
    height: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    gap: 0;
    box-sizing: border-box;
}

.correctAnswer,
#correctSong,
#correctArtist {
    font-size: min(3.2dvh, 4.8vw);
    border-radius: min(1dvh, 1.5vw);
    background-color: var(--answer-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
    height: 100%;
    opacity: 0;
    border: min(0.5dvh, 0.75vw) solid transparent;
    transition: opacity 0.3s ease, border 0.3s ease;
    box-sizing: border-box;
    line-height: normal;
    position: relative;
}

.correctAnswer.visible {
    opacity: 1;
}

.correctAnswer::after {
    content: '';
    display: none;
    height: 100%;
    display: flex;
    vertical-align: middle;
    box-sizing: border-box;
    align-items: center;
    text-align: center;
    justify-content: center;
}

.highlightGreen {
    animation: highlightFade 2s ease-out forwards;
    border-color: #00D26A;
}

@keyframes highlightGreen {
    0% {
        background-color: transparent;
    }
    100% {
        background-color: #00D26A;
    }
}

@keyframes highlightFade {
    0% {
        background-color: transparent;
    }
    10% {
        background-color: #00D26A;
    }
    100% {
        background-color: var(--answer-bg);
    }
}

.highlightRed {
    animation: highlightFadeRed 2s ease-out forwards;
    border-color: #F92F60;
}

@keyframes highlightRed {
    0% {
        background-color: transparent;
    }
    100% {
        background-color: #F92F60;
    }
}

@keyframes highlightFadeRed {
    0% {
        background-color: transparent;
    }
    10% {
        background-color: #F92F60;
    }
    100% {
        background-color: var(--answer-bg);
    }
}



/* Answer box labels (artist and song name) */
.answerLabel {
    font-size: min(3.5dvh, 5.25vw);
    line-height: 1.2;
    display: inline-block;
    vertical-align: middle;
	font-weight: bold;
	text-align: center;
	position: relative;
}

.answerLabel::before,
.answerLabel::after {
    content: '';
    font-size: min(3.5dvh, 5.25vw);
    display: inline-block;
    vertical-align: middle;
	font-weight: bold;
}

.answerLabel::before {
    content: '';
    font-size: min(3.5dvh, 5.25vw);
    display: inline-block;
	position: absolute;
	left: -1.5em;
	text-align: center;
    vertical-align: middle;
    width: 1.5em;
	font-weight: bold;
}

.answerLabel.correct::before {
    content: '✅';
    font-size: min(3.5dvh, 5.25vw);
    width: 1.5em;
    text-align: center;
	font-weight: bold;
}

.answerLabel.incorrect::before {
    content: '❌';
    font-size: min(3.5dvh, 5.25vw);
    width: 1.5em;
    text-align: center;
	font-weight: bold;
}



/* NEXT SCAT button */
#nextButtonContainer {
    display: flex;
    justify-content: center;
    margin-top: 0px;
    position: relative;
	padding-top: min(3dvh, 4.5vw);
    z-index: 1;
}

#nextQuestion {
    padding: min(1dvh, 1.5vw);
    font-size: min(3dvh, 4.5vw);
    background-color: #6959FF;
    color: white;
    border: none;
    border-radius: min(0.5dvh, 0.75vw);
    cursor: pointer;
}

#nextQuestion:hover {
    background-color: #8374FF;
}



/* Tooltips */
.tooltip1_class,
.tooltip2_class,
.tooltip3_class {
	font-size: min(2dvh, 3vw);
    margin: 0;
    padding: 0;
    position: relative;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
}

/* **REVISIT** */
/* Temporarily decided to hide tooltip3 */
/* **REVISIT** */
.tooltip3_class {
	visibility: hidden !important;
	opacity: 0 !important;
}

.tooltip1_class.show,
.tooltip2_class.show,
.tooltip3_class.show {
    opacity: 1;
    visibility: visible;
}

.tooltip1_text {
    margin: 0;
    padding: min(0.5dvh, 0.75vw);
    background-color: var(--tooltip-bg, #333);
    color: #fff;
    text-align: center;
    border-radius: min(1dvh, 1.5vw);
    white-space: nowrap;
    position: absolute;
    top: min(3.75dvh, 5.5vw);
    left: max(-29dvh, -43.5vw);
    animation: wobbleLeftRight 2s infinite ease-in-out;
}

.tooltip1_text::after {
    content: "";
    position: absolute;
    top: 50%;
    right: max(-0.75dvh, -1.125vw);
    transform: translateY(-50%);
    border-width: min(0.5dvh, 0.75vw);
    border-style: solid;
    border-color: transparent transparent transparent #333;
}

.tooltip2_text {
    background-color: #333333;
    color: #fff;
    text-align: center;
    border-radius: min(1dvh, 1.5vw);
    padding: min(0.5dvh, 0.75vw);
    position: absolute;
    top: max(-7.5dvh, -11.25vw);
    left: max(-37.5dvh, -56.25vw);
    transform: translateX(-50%);
    white-space: nowrap;
    animation: floatUpDown 2s infinite ease-in-out;
}

.tooltip2_text::after {
    content: "";
    position: absolute;
    top: 98%;
    left: 50%;
    margin-left: -min(0.5dvh, 0.75vw);
    border-width: min(0.5dvh, 0.75vw);
    border-style: solid;
    border-color: #333333 transparent transparent transparent;
}

.tooltip3_text {
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: min(1dvh, 1.5vw);
    padding: min(0.5dvh, 0.75vw);
    white-space: nowrap;
    position: absolute;
    top: max(-7.25dvh, -10.875vw);
    left: min(21dvh, 31vw);
    transform: translateY(-50%);
    animation: wobbleRightLeft 2s infinite ease-in-out;
}

.tooltip3_text::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 99.5%;
    transform: translateY(-50%);
    border-width: min(0.5dvh, 0.75vw);
    border-style: solid;
    border-color: transparent #333 transparent transparent;
}

@keyframes wobbleLeftRight {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(-5px);
    }
}

@keyframes wobbleRightLeft {
    0%, 100% {
        transform: translateX(-5px);
    }
    50% {
        transform: translateX(0);
    }
}

@keyframes floatUpDown {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-5px);
    }
}



/* End screen */
#endScreen {
	position: absolute;
	top: min(25dvh, 37.5vw);
}

#endScreen h2 {
	font-size: min(4dvh, 6vw);
}

#endScreen p,
#endScreen a {
    font-family: 'Open Sans', sans-serif;
	text-transform: none;
	font-size: min(2dvh, 3vw);
}



/* Extra spacing for the end screen */
.extra-space {
    margin: min(6dvh, 9vw) 0;
}



/* Generic hidden class */
.hidden {
    opacity: 0;
    visibility: hidden;
}



/* Song name notes and artist notes */
#answerNotes {
    position: absolute;
    width: 100%;
    height: min(10dvh, 15vw);
    display: block;
	top: 67.5%;
}

.answerNote {
	font-size: min(3dvh, 4.5vw);
	font-style: italic;
	position: absolute;
	white-space: nowrap;
	transform: rotate(-10deg);
	text-align: left;
	transform-origin: top left;
}

#songNote {
    top: 0%;
    left: 17.5%;
}

#artistNote {
    top: 0%;
    left: 67.5%;
}



/* Volume Warning */
#volumeWarning {
    position: absolute;
    z-index: 150;
    color: red;
    font-size: min(10dvh, 15vw);
    font-weight: bold;
    text-align: center;
    pointer-events: none;
    transform-origin: center;
    opacity: 0;
    top: min(42.1dvh, 63.15vw);
    left: 50%;
    transform: translate(-50%, -50%);
    animation-fill-mode: forwards;
	/*transition: opacity 0.25s ease-in;*/
}

/* Trigger the animation */
#volumeWarning.animate {
	opacity: 1;
    animation: volumeWarningEffect 8s ease-in-out forwards;
}

/* Combine movement, shrinking, and fading */
@keyframes volumeWarningEffect {
    0% {
        font-size: min(10dvh, 15vw);
        top: min(42.1dvh, 63.15vw);
        left: 50%;
	    transform: translate(-50%, -50%);
        opacity: 1;
    }
    10% {
        font-size: min(10dvh, 15vw);
        top: min(42.1dvh, 63.15vw);
        left: 50%;
	    transform: translate(-50%, -50%);
        opacity: 1;
    }
    30% {
        font-size: min(3dvh, 4.5vw);
        top: min(42.1dvh, 63.15vw);
        left: 75%;
	    transform: translate(-50%, -50%);
        opacity: 1;
    }
    100% {
        font-size: min(3dvh, 4.5vw);
        top: min(42.1dvh, 63.15vw);
        left: 75%;
	    transform: translate(-50%, -50%);
        opacity: 0;
    }
}



/* Volume Slider */
#volumeControl {
    display: flex;
    align-items: center;
    justify-content: center;
	width: 50%;
    gap: min(1dvh, 1.5vw);
    margin: 0;
    padding: 0;
}

#volumeIcon {
    width: min(3dvh, 4.5vw);
    height: min(3dvh, 4.5vw);
    object-fit: contain;
}

#volumeSlider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: min(0.667dvh, 1vw);
    background: linear-gradient(to right, #007bff 50%, #ccc 50%);
    border-radius: min(1dvh, 1.5vw);
    outline: none;
    cursor: pointer;
    transition: background 0.3s ease;
    position: relative;
}

#volumeSlider::-webkit-slider-runnable-track {
    width: 100%;
    height: min(2dvh, 3vw);
    background: transparent;
    border-radius: min(1dvh, 1.5vw);
}

#volumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: min(2dvh, 3vw);
    height: min(2dvh, 3vw);
    background: #6959FF;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    position: relative;
    margin-top: -min(1dvh, 1.5vw);
}

#volumeSlider::-moz-range-track {
    background: transparent;
    border-radius: min(1dvh, 1.5vw);
}

#volumeSlider::-moz-range-thumb {
    width: min(2dvh, 3vw);
    height: min(2dvh, 3vw);
    background: #6959FF;
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

#volumeSlider:focus {
    outline: none;
}

#statsButton {
    display: none !important;
	visibility: hidden !important;
}

#infoButton {
	display: none !important;
	visibility: hidden !important;
}

#settingsButton {
	display: none !important;
	visibility: hidden !important;
}

#endScreenStats {
	display: none !important;
	visibility: hidden !important;
}

#currentQuestion {
	display: none !important;
	visibility: hidden !important;
}

#restartButton {
	display: none !important;
	visibility: hidden !important;
}

#topMenu a.menuIconLink {
  display: inline-flex;
  align-items: center;
  height: 100%;
  text-decoration: none;
}

#topMenu a.menuIconLink > img.menuIcon {
  height: 100%;
  width: auto;
  aspect-ratio: 1 / 1;
}
