:root {
    --bg: #ffffff;
    --text: #000000;
    --surface: #081b31;        
    --surface-text: #ffffff;
    --choice-hover: #081b31;
    color-scheme: light;
}

[data-theme="dark"] {
    --bg: #121212;
    --text: #f2f2f2;
    --surface: #1c3557;
    --surface-text: #ffffff;
    --choice-hover: #2f4f7f;
    color-scheme: dark;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-align: center;
}

body {
    position: relative;
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1 {
    background-color: var(--surface);
    color: var(--surface-text);
    min-height: 5rem;
    padding: 1rem 4.5rem; 
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: clamp(1.5rem, 5vw, 2rem);
    transition: background-color 0.3s ease;
}



#theme-toggle {
    position: absolute;
    top: 1.125rem;
    right: 1rem;
    height: 2.75rem;
    width: 2.75rem;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.25rem;
    line-height: 1;
    background: transparent;
    border: 2px solid var(--surface-text);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

#theme-toggle:hover {
    transform: scale(1.1);
}

#theme-toggle:focus-visible {
    outline: 3px solid #7aa7ff;
    outline-offset: 2px;
}



.choices {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: clamp(1rem, 4vw, 3rem);
    margin-top: clamp(2rem, 8vh, 5rem);
    padding: 0 1rem;
}

.choice {
    --size: clamp(80px, 26vw, 150px);
    height: var(--size);
    width: var(--size);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.15s ease;
}


@media (hover: hover) {
    .choice:hover {
        background-color: var(--choice-hover);
    }
}

.choice:active {
    background-color: var(--choice-hover);
}


.choice.key-pressed {
    background-color: var(--choice-hover);
    transform: scale(1.08);
}

img {
    height: 87%;
    width: 87%;
    object-fit: cover;
    border-radius: 50%;
}



.score-board {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: clamp(1.25rem, 4vw, 2rem);
    margin-top: clamp(1.5rem, 5vh, 3rem);
    gap: clamp(2rem, 8vw, 5rem);
}

#user-score,
#computer-score {
    font-size: clamp(2.5rem, 10vw, 4rem);
}



.msg-container {
    margin-top: clamp(2rem, 8vh, 5rem);
    padding: 0 1rem 2rem;
}

.default-msg-style {
    background-color: var(--surface);
    color: var(--surface-text);
    display: inline-block;
    max-width: 100%;
    padding: 1rem;
    font-size: clamp(1.1rem, 4.5vw, 2rem);
    border-radius: 1rem;
    transition: background-color 0.3s ease;
}

#msg {
    background-color: var(--surface);
    color: var(--surface-text);
    display: inline-block; 
    max-width: 100%;
    padding: 1rem;
    font-size: clamp(1.1rem, 4.5vw, 2rem);
    border-radius: 1rem;
    transition: background-color 0.3s ease;
}

#msg.win {
    background-color: green;
}

#msg.lose {
    background-color: red;
}



.shortcut-hint {
    margin: -0.5rem 1rem 2rem;
    font-size: 1rem;
    opacity: 0.75;
}

kbd {
    display: inline-block;
    min-width: 1.6em;
    padding: 0.1em 0.45em;
    font-family: monospace;
    font-size: 0.9em;
    border: 1px solid currentColor;
    border-radius: 0.3rem;
}


@media (hover: none) {
    .shortcut-hint {
        display: none;
    }
}



@media (max-height: 500px) and (orientation: landscape) {
    h1 {
        min-height: 3.5rem;
    }

    #theme-toggle {
        top: 0.5rem;
        height: 2.5rem;
        width: 2.5rem;
    }

    .choices {
        margin-top: 1.5rem;
    }

    .choice {
        --size: clamp(70px, 18vh, 110px);
    }

    .score-board,
    .msg-container {
        margin-top: 1.5rem;
    }
}


.reset-container {
    display: flex;
    justify-content: center;
    margin: 22px 0;
}

#reset-btn {
    display: flex;
    align-items: center;
    gap: 9px;

    padding: 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: 50px;

    background: transparent;
    color: var(--text-color);

    font: inherit;
    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
    transition: background 0.25s ease,
                border-color 0.25s ease,
                transform 0.25s ease;
}

.reset-icon {
    font-size: 19px;
    line-height: 1;
    transition: transform 0.4s ease;
}

#reset-btn:hover {
    background: var(--button-hover);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

#reset-btn:hover .reset-icon {
    transform: rotate(-180deg);
}

#reset-btn:active {
    transform: scale(0.96);
}

#reset-btn:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 4px;
}