* {
    box-sizing: border-box;

    --video-fade-duration: 0.3s;
    --reveal-animation-duration: 0.3s;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;

    height: 100vh;
    margin: 0;

    background-color: rgb(15, 15, 15);

    font-family: "Roboto", serif;
    font-optical-sizing: auto;
    font-style: normal;
    font-variation-settings: "wdth" 100;
}

.content {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 1em;
    padding: 2em;
    justify-items: center;
}

@keyframes glow {
    0% {
        box-shadow: 0 0 0 rgba(0, 255, 0, 0);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 30px rgba(0, 255, 0, 0.3);
        transform: scale(1.02);
    }
    100% {
        box-shadow: 0 0 0 rgba(0, 255, 0, 0);
        transform: scale(1);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gameOverShow {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.reveal-animation {
    animation: glow 1s ease-in-out;
}

.video.correct {
    outline: 0.4em solid #00ff00;
}

.video.incorrect {
    outline: 0.4em solid #ff0000;
}

.options-container {
    grid-row: 1;
    display: flex;
    gap: 1em;
    justify-content: center;
    align-items: flex-start;
}

.video-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5em;

    transition: opacity var(--video-fade-duration);
    opacity: 0;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

#unknown-0, #unknown-1, #unknown-2 {
    width: 20em;
    height: 18em;
    transition: transform 0.2s, outline 0.3s;
    cursor: pointer;
}

#unknown-0:hover, #unknown-1:hover, #unknown-2:hover {
    transform: scale(1.05);
}

.video {
    display: grid;
    grid-template-columns: min-content 1fr;
    grid-template-rows: auto 1fr;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 1em;
    padding: 1em;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.video .thumbnail {
    grid-row: 1;
    grid-column: 1/3;
    object-fit: cover;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 0.5em;
}

.video > .channel-icon {
    grid-row: 2;
    grid-column: 1;
    width: 2.3em;
    height: 2.3em;
    margin-right: 1em;
    margin-top: 0.8em;
    border-radius: 100%;
}

.video > .titles {
    grid-row: 2;
    grid-column: 2;
    display: flex;
    flex-direction: column;
}

.video > .titles > .title {
    max-height: 2.5em;
    margin-bottom: 0.5em;
    margin-top: 0.8em;
    font-weight: 500;
    text-overflow: ellipsis;
    overflow: hidden;
    color: white;
}

.video > .titles > .channel-title {
    font-size: 0.9em;
    color: rgb(177, 177, 177);
}

.view-count {
    font-size: 1.2em;
    color: #00ff00;
    font-weight: bold;
    opacity: 0;
    background: rgba(0, 0, 0, 0.8);
    padding: 0.3em 0.8em;
    border-radius: 0.5em;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.known-container .view-count {
    opacity: 1;
    transition: opacity var(--reveal-animation-duration);
}

.view-count.reveal {
    animation: slideIn var(--reveal-animation-duration) ease-out forwards;
}

.video > .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(0, 255, 0, 0.2) 0%, transparent 70%);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--reveal-animation-duration);
}

.video > .overlay.show {
    opacity: 1;
}

#known  {
    width: 55vh;
}

#known-replacement {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
}

.card-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    display: flex;
    flex-direction: column;
    gap: 0.5em;
    justify-content: center;
    align-items: center;

    background: linear-gradient(to bottom,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.95) 100%
    );
    color: white;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(8px);
}

.game-over-overlay {
    display: none;
    opacity: 0;
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 2em 3em;
}

.game-over-overlay h1 {
    font-size: 3em;
    color: #ff3333;
    text-shadow: 0 0 10px rgba(255, 51, 51, 0.5);
    margin-bottom: 0.2em;
    filter: drop-shadow(0 0 8px rgba(255, 51, 51, 0.3));
}

.game-over-overlay .score {
    font-size: 1.5em;
    color: #ff9999;
    margin-bottom: 1em;
    text-shadow: 0 0 8px rgba(255, 153, 153, 0.3);
}

button {
    padding: 0.8em 1.6em;
    font-size: 1em;
    font-family: "Roboto", serif;
    color: white;
    background-color: rgba(255, 51, 51, 0.2);
    border: 2px solid rgba(255, 51, 51, 0.4);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background-color: rgba(255, 51, 51, 0.3);
    border-color: rgba(255, 51, 51, 0.6);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 51, 51, 0.3);
}

button:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    body {
        font-size: calc(1.4vh);
    }

    .options-container {
        flex-direction: column;
    }

    .video-container {
        flex-direction: row;
    }

    #unknown-0, #unknown-1, #unknown-2 {
        width: 16em;
        height: 15em;
    }

    #known {
        width: 65%;
    }
}
