@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100..700;1,100..700&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    --bgColor: #2b2d31;
    --textPrimary: #e0e0e0;
    --textSecondary: #666;
    --primaryColor: #e2b714;
    --errorColor: #ca4754;
    --fontMono: 'Roboto Mono', monospace;
    --fontSans: 'Roboto', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--fontSans);
    background-color: var(--bgColor);
    color: var(--textPrimary);
    font-size: 1.2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    max-width: 850px;
    width: 92%;
    margin: 60px auto;
}

h1 {
    color: var(--primaryColor);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 2.2rem;
    font-weight: 700;
}

h1 svg {
    width: 36px;
    height: 36px;
    fill: var(--primaryColor);
}

#header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 25px 0 20px;
}

#info {
    font-family: var(--fontMono);
    font-size: 1.8rem;
    color: var(--primaryColor);
    font-weight: 600;
}

#buttons button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--textPrimary);
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-family: var(--fontSans);
    transition: all 0.2s ease;
}

#buttons button:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

div#game {
    line-height: 40px;
    height: 140px;
    overflow: hidden;
    position: relative;
    user-select: none;
    border-radius: 8px;
}

div#game:focus {
    outline: none;
}

#words {
    filter: blur(5px);
    color: var(--textSecondary);
    transition: filter 0.2s ease, margin-top 0.15s ease-out;
}

#game:focus #words {
    filter: blur(0);
}

#focus-error {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--primaryColor);
    background: rgba(43, 45, 49, 0.7);
    backdrop-filter: blur(2px);
    cursor: pointer;
    z-index: 10;
}

#game:focus #focus-error {
    display: none;
}

div.word {
    display: inline-block;
    font-family: var(--fontMono);
    font-size: 1.5rem;
    margin: 0 8px 0 0;
    white-space: nowrap;
}

.letter {
    position: relative;
    transition: color 0.1s ease;
}

.letter.correct {
    color: #ffffff;
}

.letter.incorrect {
    color: var(--errorColor);
}

.letter.extra {
    color: #7e2a33;
    opacity: 0.8;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

#cursor {
    width: 3px;
    height: 1.6rem;
    background-color: var(--primaryColor);
    position: absolute;
    top: 0;
    left: 0;
    animation: blink 0.9s infinite;
    transition: top 0.1s ease-out, left 0.1s ease-out;
    pointer-events: none;
    z-index: 5;
}

#cursor.no-transition {
    transition: none !important;
}

#game:focus #cursor {
    display: block;
}

#game:not(:focus) #cursor {
    display: none;
}

#game.over #words {
    opacity: 0.4;
    filter: blur(0px);
}

#game.over #cursor {
    display: none !important;
}

#game.over #focus-error {
    display: none !important;
}






















