/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;600&display=swap');

/* Reset defaults */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body styles */
body {
    background-color: #121212;
    color: #4cbb8a;
    font-family: 'Fredoka', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
}

/* Main container */
.container {
    max-width: 1200px;
    width: 100%;
    padding: 2rem;
    background-color: #1a1a1a;
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(76, 187, 138, 0.15);
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.image-container img {
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: 10%;
}

/* Simple margins */
.margin-top {
    margin-top: 20px;
}

.margin-top-big {
    margin-top: 50px;
}

.margin-bottom {
    margin-bottom: 20px;
}

/* Headings */
h1, h2, h3 {
    color: #4cbb8a;
    text-shadow: 2px 2px 4px rgba(76, 187, 138, 0.2);
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.25rem;
    text-align: center;
    animation: bounce 2s infinite;
}

h2 {
    font-size: 1.75rem;
}

h3 {
    font-size: 1.25rem;
}

.game-header {
    font-size: 3rem;
    font-weight: bold;
}

@media (max-width: 600px) {
    .game-header {
        font-size: 1.5rem;
    }
}

.answer-subheader {
    font-size: 1.5rem;
    font-weight: bold;
}

/* Buttons */
.button {
    background-color: #4cbb8a;
    color: #121212;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-family: 'Fredoka', sans-serif;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(76, 187, 138, 0.4);
}

.button:active {
    transform: translateY(1px);
}

/* Avatar */
.avatar-container {
    position: absolute;
    top: 15px;
    right: 15px;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: 4px -2px 10px #4cbb8a;
    object-fit: cover;
}

.avatar-on-profile {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    box-shadow: 10px -5px 25px #4cbb8a;
    object-fit: cover;
}

/* Player table */
.player-table {
    width: 100%;
}

.player-table-row td {
    padding: 10px;
}

.player-table-row img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    box-shadow: 4px -2px 10px #4cbb8a;
    object-fit: cover;
}

.player-table-image {
    width: 15%;
}

.player-table-name {
    font-size: 2rem;
    width: 35%;
}

.player-table-bet-amount {
    font-size: 1rem;
    padding-left: 50px;
}

.player-list {
    width: 100%;
}

.player-list-row td {
    padding: 5px;
}

.player-images img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    box-shadow: 4px -2px 10px #4cbb8a;
    object-fit: cover;
    margin: 10px;
}

@media (max-width: 600px) {
    .player-images img {
        width: 50px;
        height: 50px;
    }
}

/* Game elements */
.game-element {
    background-color: #232323;
    border-radius: 15px;
    padding: 1.5rem;
    margin: 1rem 0;
    border: 2px solid rgba(76, 187, 138, 0.2);
    transition: all 0.3s ease;
}

.game-element:hover {
    border-color: #4cbb8a;
    transform: scale(1.02);
}

.game-element-disabled {
    background-color: #232323;
    border-radius: 15px;
    padding: 1.5rem;
    margin: 1rem 0;
    border: 2px solid #232323;
    color: black;
}

.game-element-bet {
    font-size: 1.5rem;
    text-align: center;
}

/* Score display */
.score {
    font-size: 1.5rem;
    font-weight: 600;
    color: #4cbb8a;
    margin: 1rem 0;
}

/* Progress bar */
.game-progress {
    position: relative;
    width: 100%;
    height: 20px;
    background-color: #d3d3d3;
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

/* Animated striped progress bar */
.game-progress-bar {
    position: relative;
    height: 100%;
    background: linear-gradient(
        135deg,
        #4cbb8a 25%,
        #5ad29a 25%,
        #5ad29a 50%,
        #4cbb8a 50%,
        #4cbb8a 75%,
        #5ad29a 75%
    );
    background-size: 40px 40px;
    animation: moveStripes 1s linear infinite;
    transition: width 0.3s ease;
}

/* Keyframes for the striped animation */
@keyframes moveStripes {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 40px 0;
    }
}

/* Milestones Container */
.milestones {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

/* Milestones (marks every round) */
.milestone {
    width: 2px;
    height: 100%;
    background-color: black;
    opacity: 0.7;
}

/* Animations */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Countdown and announcement */

.announcement {
    color: white;
    text-align: center;
    text-shadow:
        -4px -4px 0 black,
        4px -4px 0 black,
        -4px 4px 0 black,
        4px 4px 0 black;
}

.announcement > img {
    left: 50%;
    max-width: 800px;
    position: fixed;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    z-index: 10;
}

.announcement-countdown {
    font-size: 24rem;
    left: 50%;
    max-width: 1200px;
    position: fixed;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
}

.announcement-text {
    animation: quick-bounce 0.5s infinite;
    font-size: 8rem;
    left: 50%;
    max-width: 1200px;
    position: fixed;
    top: 50%;
    transform: translate(-40%, -50%) rotate(-10deg);
    transform-origin: center center;
    width: 80%;
    will-change: transform;
    z-index: 11;
}

@media (max-width: 600px) {
    .announcement {
        text-shadow:
            -2px -2px 0 black,
            2px -2px 0 black,
            -2px 2px 0 black,
            2px 2px 0 black;
    }

    .announcement-countdown {
        font-size: 16rem;
    }

    .announcement-text {
        font-size: 4rem;
    }
}

@keyframes quick-bounce {
  0%, 100% {
    transform: rotate(-10deg) scale(1) translate(-40%, -50%);
  }
  50% {
    transform: rotate(-10deg) scale(1.2) translate(-40%, -50%);
  }
}

/* Links */
a {
    color: #4cbb8a;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #5ddaa3;
    text-decoration: underline;
}

/* Loading spinner */
.loading {
    width: 50px;
    height: 50px;
    border: 5px solid #232323;
    border-top: 5px solid #4cbb8a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Input fields */
input, select {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    font-family: 'Fredoka', sans-serif;
    font-size: 1rem;
    color: #4cbb8a;
    background-color: #232323;
    border: 2px solid rgba(76, 187, 138, 0.2);
    border-radius: 10px;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: #4cbb8a;
    box-shadow: 0 0 8px rgba(76, 187, 138, 0.3);
}

/* Label */
label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #4cbb8a;
    margin-bottom: 5px;
    display: inline-block;
    text-shadow: 1px 1px 2px rgba(76, 187, 138, 0.3);
}

/* Answer table */
table.answer-table {
    text-align: left;
    width: 100%;
}

.answer-correct {
    color: green;
}

.answer-maybe-correct {
    color: orange;
}

.answer-incorrect {
    color: red;
}

/* The switch - the box around the slider */
.switch {
    position: relative;
    display: inline-block;
    width: 30px;
    height: 17px;
}

/* Hide default HTML checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: red;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 17px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 13px;
    width: 13px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: green;
}

input:focus + .slider {
    box-shadow: 0 0 1px green;
}

input:checked + .slider:before {
    -webkit-transform: translateX(13px);
    -ms-transform: translateX(13px);
    transform: translateX(13px);
}

/* Explanations */
.flex-container {
    display: flex;
    flex-direction: column;
}

.flex-row {
    display: flex;
}

.flex-row > div {
    flex: 1;
}

h4 {
    flex: 0 0 100%;
}

.explanation-color {
    color: burlywood;
}
