:root {
    --primary--i: #fff;
    --secondary--i: #bbb;
    --background: #121416;
    --background-playing: #e65167;
    --card-bg: #3e3e3e;
    --text-color: #fff;
    --radius: 12px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    
    --accent: #f9e2af;
	--bg-2: hsl(220, 10%, 17%);
	--bg-3: hsl(220, 10%, 11%);
	--bg-4: hsl(220, 10%, 16%);
	--bg-t-2: hsla(220, 12%, 5%, 0.5);
	--bg-t: hsla(220, 12%, 5%, 0.25);
	--bg: hsl(220, 10%, 8%);
	--border-d: #334155;
	--border: hsl(0, 0%, 100%);
	--error: #f38ba8;
	--gradient-primary: linear-gradient(90deg, #CF5DEB 0%, #9F3DFA 100%);
	--gradient-secondary: linear-gradient(90deg, var(--txt-1) 0%, var(--txt) 100%);
	--success: #a6e3a1;
	--txt-1: hsl(220, 45%, 90%);
	--txt-2: hsl(220, 14%, 55%);
	--txt-3: hsl(220, 11%, 35%);
	--txt-4: #000000;
	--txt: hsl(220, 30%, 80%);
}

body {
    align-items: center;
    font-family: 'Roboto', sans-serif;
    background: var(--background-playing);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    margin: 0;
    overflow-x: hidden;
    padding: 0;
    touch-action: manipulation;
    user-select: none;
}

footer {
    background-color: var(--background-playing);
    color: var(--txt-1) !important;
}

footer a {
    color: var(--txt-1) !important;
}

h1 {
    margin-block-start: 0.5em;
    margin-block-end: 0.25em;
}

.information {
    cursor: pointer;
    right: 10px;
    position: absolute;
    top: 10px;
}

#overlay-background {
    background-color: var(--background);
    bottom: 0;
    color: var(--text-color);
    display: none;
    left: 0;
    height: 100%;
    opacity: 0.5;;
    padding: 15px;
    position: fixed;
    text-align: center;
    width: 100%;
    z-index: 100001;
}

#u-overlay {
    background-color: #2e2e2e;
    border: 1px solid #383939;
    border-radius: 20px;
    box-sizing: border-box;
    color: var(--text-color);
    display: none;
    height: 100%;
    left: 50%;
    max-width: 450px;
    min-width: 300px;
    position: fixed;
    text-align: center;
    top: 100%;  /* Startet unterhalb des Bildschirms */
    transform: translate(-50%, 0%);
    transition: top 0.1s ease-in, transform 0.1s ease-in;
    z-index: 100001;
    width: 100%;
}

.overlay-ui {
    width: 100%;
}

#done-btn {
    color: #0076DF;
    cursor: pointer;
}

.overlay-content {
    height: calc(100% - 60px);
    overflow-y: scroll;
    padding: 5px;
    width: calc(100% - 10px);
}

.placeholder {
    margin: 0 auto !important;
}

.overlay-card {
    background-color: #1B1D1E;
    border-radius: 15px;
    margin: 15px auto 15px auto;
    width: 90%;
}

.overlay-card-head {
    justify-content: center;
    padding: 10px 0px 0px 0px;
}

.overlay-card-content {
    padding: 10px;
    width: calc(100% - 20px);
}

.overlay-card-content div {
    margin-bottom: 10px;
    margin-top: 10px;
}

.overlay-ui-done {
    font-size: 20px;
    padding: 10px;
    position: relative;
    left: calc(100% - 90px);
    width: 70px;
}

/* Progress */
.start-progress {
    background-color: #fff;
    border-radius: 10px;
    height: 30px;
    margin-bottom: 10px;
    margin-top: 10px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: 350px;
}

.start-progress-bar {
    animation: start-progress 7s ease forwards;
    background-color: var(--background-playing);
    border: 1px solid  #fff;
    border-radius: 10px;
    height: 29px;
    position: absolute;
    width: 0px;
}

@keyframes start-progress {
    0% {
        width: 0px;
    } 100% {
        width: 100%;
    }
}

.start-progress-text {
    color: #000;
    text-align: center;
    top: 50%;
    transform: translateY(-50%);
    position: absolute;
    width: 100%;
}

.container {
    width: calc(100% - 20px);
    max-width: 400px;
    padding: 16px;
    margin: 0px 20px;
}

#timer-screen {
    text-align: center;
}

.reveal-impostors {
    float: right;
    font-size: 25px;
    margin-left: 5px;
    max-height: 48px;
    min-width: 0px;
    overflow: hidden;
    transition: margin-left 0.5s, width 0.5s;
    width: 0px;
}

.reveal-impostors:not(.paused) {
    animation: hide-animation 0.5s ease-in-out forwards;
}

.reveal-impostors.expand {
    animation: reveal-animation 0.5s ease-in-out forwards;
}

@keyframes reveal-animation {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

@keyframes hide-animation {
    0% {
        width: 100%;
    }
    100% {
        width: 0%;
    }
}

#impostor-word-reveal {
    margin-top: 50px;
    font-size: 30px;
}

/* Pause Button */
.pause-btn {
    max-height: 48px;
    transition: width 0.5s ease;
}

.pause-btn.paused {
    width: 41px !important;
}

.pause-btn.paused .timer-controls {
    gap: 5px;
}

.timer-controls {
    display: flex;
}

#start-btn {
    margin-top: 25px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: calc(95% + 2px) !important;
}

.hidden {
    display: none;
}

h1 {
    text-align: center;
    color: var(--text-color);
}

input,
select,
button,
textarea {
    border: 1px solid #ccc;
    border-radius: var(--radius);
    box-sizing: border-box;
    font-size: 1rem;
    margin: 8px 0;
    max-height: 500px;
    padding: 8px;
    width: 100%;
}

button {
    background: var(--background);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.card {
    position: relative;
    width: 100%;
    height: 300px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 16px 0;
    overflow: hidden;
    perspective: 1000px;
    touch-action: none;
    user-select: none;
}

.card-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    backface-visibility: hidden;
    transition: transform 0.5s ease;
    border-radius: var(--radius);
}

.card-content.front {
    display: block;
    font-size: 40px;
    text-align: center;
}

.card-content.back {
    display: block;
    font-size: 40px;
    text-align: center;
}

.card .front {
    background: var(--card-bg);
    transform: rotateX(0deg);
}

.card .back {
    background: var(--secondary--i);
    color: #fff;
    transform: rotateX(180deg);
}

.card.revealed .front {
    transform: rotateX(-180deg);
}

.card.revealed .back {
    transform: rotateX(0deg);
}

.timer {
    font-size: 4rem;
    text-align: center;
    margin-top: 32px;
}

.finished-text {
    text-align: center;
}

/* Input Fields */
label {
    display: block;
    margin-top: 16px;
    margin-bottom: 8px;
    font-size: 1rem;
    color: var(--text-color);
}

textarea,
input[type="number"],
select {
    width: 100%;
    padding: 12px;
    margin-bottom: 16px;
    background: var(--card-bg);
    color: var(--text-color);
    border: 2px solid var(--secondary--i);
    border-radius: var(--radius);
    font-size: 1rem;
    box-shadow: var(--shadow);
    box-sizing: border-box;
    transition: border-color 0.3s, background 0.3s;
}

textarea::placeholder {
    color: var(--secondary--i);
    opacity: 0.8;
}

textarea:focus,
input[type="number"]:focus {
    outline: none;
    border: 2px solid var(--primary--i);
    background: #4ecca320;
}

select:focus {
    outline: none;
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg fill="%23ffffff" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
}

select {
    appearance: none;
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg fill="%23ffffff" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 24px;
    padding-right: 40px;
    cursor: pointer;
}

select option {
    background: var(--card-bg);
    color: var(--text-color);
    transition: background 0.3s, color 0.3s;
}

select:focus option:checked,
select option:checked {
    background: #2e2e2e;
    color: var(--shadow);
}

select option:hover {
    background: var(--primary--i);
    color: var(--background);
}

select:focus option:hover {
    background: var(--primary--i);
    color: var(--background);
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

textarea:hover,
input[type="number"]:hover,
select:hover {
    border-color: var(--primary--i);
}

@media (max-width: 480px) {
    label {
        font-size: 0.9rem;
    }

    textarea,
    input[type="number"],
    select {
        font-size: 0.9rem;
    }
}

.dropdown {
    position: relative;
    width: 100%;
}

.dropdown-toggle {
    background: var(--card-bg);
    box-shadow: var(--shadow);
    color: var(--text-color);
    border: 2px solid var(--secondary--i);
    border-radius: var(--radius);
    cursor: pointer;
    margin: 0px 0 !important;
    padding: 8px 12px;
    text-align: left;
    position: relative;
    transition: border-radius 0.25s ease, height 0.25s ease;
    width: 100%;
}

.dropdown-menu {
    background: var(--card-bg);
    border: 2px solid var(--secondary--i);
    border-radius: var(--radius);
    border-top: none;
    box-shadow: var(--shadow);
    height: 0;
    left: 0;
    max-width: 396px;
    max-height: 230px;
    opacity: 0;
    overflow-y: auto;
    position: absolute;
    pointer-events: none;
    top: 100%;
    transition: height 0.3s ease, opacity 0.2s ease 0.3s, border-radius 0.25s ease;
    width: 100%;
    z-index: 1000;
}

.dropdown.open .dropdown-menu {
    border-bottom-left-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    height: 230px;
    opacity: 1;
    pointer-events: auto;
    transition: height 0.3s ease, opacity 0.2s ease 0s, border-radius 0.25s ease;
}

.dropdown label {
    margin-top: 0px;
    margin-bottom: 0px;
    padding: 12px !important;
}

.dropdown-menu label {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 10px;
    padding: 6px 12px;
    user-select: none;
}

.dropdown-menu > label > div > div:first-child {
    font-weight: 800;
}

.dropdown-menu label:hover {
    background: var(--primary--i);
    color: var(--background);
}

.dropdown.open .dropdown-toggle {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

input[type="checkbox"] {
    align-items: center;
    appearance: none;
    background: var(--card-bg);
    border: 1px solid #fff;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    display: flex;
    justify-content: center;
    margin: 3px;
    height: 30px;
    width: 30px !important;
}

input[type="checkbox"]:checked::before {
    content: "✔";
    color: var(--tt);
    display: block;
    font-size: 25px;
    line-height: 20px;
    text-align: center;
}

/* Scrollbar / Source: https://community.hubspot.com/t5/CMS-Development/CSS-for-Scrollbar-in-iOS-devices/m-p/293889 [04/01/2025]*/
::-webkit-scrollbar {
    width: 7.5px;
    -webkit-appearance: none;
    z-index: 1000000;
}

::-webkit-scrollbar-thumb {
    background-color: transparent;
    border-radius: 4px;
    -webkit-box-shadow: 0 0 1px rgba(255,255,255,.5);
}

::-webkit-scrollbar-track {
    border-bottom-right-radius: 5px;
    border-top-right-radius: 5px;
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #707070;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

::-webkit-overflow-scrolling:touch {
    background: #707070;
    width: 5px;
}

/* Disable Scrollbar in Dropdown */
.dropdown-menu::-webkit-scrollbar {
    display: none;
}

.dropdown-menu::-webkit-scrollbar-thumb {
    display: none;
}

.dropdown-menu::-webkit-scrollbar-track {
    display: none;
}

.dropdown-menu::-webkit-scrollbar-thumb {
    display: none;
}

.dropdown-menu::-webkit-scrollbar-thumb:hover {
    display: none;
}

.dropdown-menu::-webkit-overflow-scrolling:touch {
    display: none;
}