
/* Global dark mode styling */
body {
    background-color: #121212;
    color: #e0e0e0;
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    padding: 1rem;
}

/* Center everything */
main {
    max-width: 800px;
    margin: auto;
}

/* Header Title */
h1 {
    text-align: center;
    color: #90caf9;
}

/* Info stats bar */
#info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: 10px;
    background-color: #1e1e1e;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
    border: 1px solid #333;
}

#wpmDisplay {
    color: #42a5f5;
    font-weight: bold;
}

#accuracyDisplay {
    font-weight: bold;
    font-weight: bold;
    transition: color 0.3s ease;
}

.accuracy-good {
  color: #4CAF50; /* green */
}

.accuracy-medium {
  color: #FFC107; /* amber */
}

.accuracy-bad {
  color: #F44336; /* red */
}

#timeDisplay {
    color: #ef5350;
    font-weight: bold;
}

/* Progress bar for timer */
#timeBarContainer {
    height: 10px;
    background-color: #333;
    border-radius: 5px;
    overflow: hidden;
    margin: 10px 0;
}
#timeBar {
    height: 100%;
    width: 100%;
    background-color: #42a5f5;
    transition: width 1s linear;
}

/* Typing game area */
#game {
    background-color: #1e1e1e;
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid #333;
    position: relative;
    min-height: 232px;
    overflow: hidden;
}

.word {
    display: inline-block;
    margin: 0 5px 5px 0;
}

.letter.correct {
    color: #66bb6a;
}

.letter.incorrect {
    color: #ef5350;
}

.letter.extra {
    background-color: #c62828;
    color: #fff;
}

.letter.current {
    text-decoration: underline;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Button styling */
#newGameBtn {
    background-color: #42a5f5;
    color: white;
    border: none;
    margin-bottom: 5px;
    padding: 0.6rem 1.4rem;
    font-size: 1rem;
    border-radius: 6px;
    /* cursor: pointer; */
    transition: background-color 0.3s ease;
}
#newGameBtn:hover {
    background-color: #1e88e5;
}

/* Responsive tweaks */
@media (max-width: 600px) {
    #info {
        flex-direction: column;
        align-items: center;
        font-size: 1rem;
    }

    #newGameBtn {
        width: 100%;
        padding: 0.8rem;
        font-size: 1.1rem;
    }

    #words {
        font-size: 1rem;
    }
}


