@import url('https://fonts.googleapis.com/css2?family=Knewave&family=Reggae+One&display=swap');

#title {
    font-family: "Reggae One", system-ui;
    font-size: 3em;
    color: white;
    opacity: 0.8;
}
#typing-input {
    height: 60vh;
    display: flex;
    justify-content: center;
    align-items: center;
}
#typing-container {
    position: relative;
}
#typing_area {
    font-size: 1.8em !important;
    font-weight: bold;
    padding: 15px !important;
    line-height: 1.2;
    border: 3px solid #007bff !important;
    border-radius: 15px !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
    text-align: center;
    letter-spacing: 0.05em;
}
#timer {
    font-size: 30em;
    color: rgba(0, 0, 0, 0.03);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: opacity 0.5s ease;
}
.color-red {
    color: rgba(255, 0, 0, 0.2) !important;
}
#kpm-view {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}
#kpm-str {
    font-size: 20em;
    margin-top: 1em;
}

.kpm {
    font-family: "Knewave", system-ui;
    font-size: 30em;
    color: white;
    
    background: linear-gradient(to right, #f00 0%, #f80 14.28%, #dd0 28.56%, #0d0 42.85%, #0dd 57.14%, #00f 71.42%, #e0e 85.71%, #f00 100%) 0% center / 200% auto;
    
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbow 1s linear infinite;

    opacity: 0.9;
}
@keyframes rainbow {
    to { background-position-x: 200%; }
}

@keyframes missType {
    0% {
        background-color: beige;
    }
}
.missed {
    animation: missType 1s forwards;
}

/* Restart button styling */
.restart-button {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border: 3px solid #ffffff;
    border-radius: 20px;
    color: white;
    font-size: 2.5em;
    font-weight: bold;
    padding: 20px 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    font-family: "Reggae One", system-ui;
    position: relative;
    overflow: hidden;
}

.restart-button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.5s ease;
}

.restart-button:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.8);
    border-color: #ffd700;
}

.restart-button:hover::before {
    left: 100%;
}

.restart-button:active {
    transform: scale(0.95);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}