/* Base styles - slightly refined */
body {
    font-family: 'Inter', sans-serif;
    display: flex; /* Use flexbox for body to center content */
    flex-direction: column; /* Stack children vertically */
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f0f2f5;
    padding: 20px;
    box-sizing: border-box;
}

/* Main game container - enhanced aesthetics */
.game-container {
    background-color: #ffffff;
    padding: 35px; /* Increased padding */
    border-radius: 18px; /* Slightly more rounded */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12); /* Stronger, softer shadow */
    text-align: center;
    max-width: 650px; /* Slightly wider */
    width: 100%;
    margin-top: 20px; /* Space from header */
    margin-bottom: 20px; /* Space from footer */
}

/* Main game title */
.game-title {
    font-size: 2.5rem; /* Larger heading */
    font-weight: bold;
    color: #1a202c; /* Darker, more prominent */
    margin-bottom: 20px;
    line-height: 1.2;
}

/* Instructions */
.instructions {
    margin-bottom: 30px; /* More space below instructions */
    color: #64748b;
    line-height: 1.6;
    font-size: 1.05rem; /* Slightly larger instructions */
}

/* Header words (Start Word, Target Word) */
.header-words {
    display: flex;
    justify-content: space-around; /* Distribute words evenly */
    align-items: center;
    margin-bottom: 30px; /* More space below */
    font-size: 1.8rem; /* Larger font for words */
    font-weight: bold;
    color: #334155;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    gap: 15px; /* Gap between words if they wrap */
}

.header-words span {
    padding: 10px 20px; /* More padding */
    border-radius: 10px; /* More rounded */
    background-color: #e2e8f0;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08); /* Subtle shadow for words */
}

/* Step sections - refined */
.step-section {
    background-color: #f8fafc;
    padding: 25px; /* More padding */
    border-radius: 15px; /* More rounded */
    margin-bottom: 25px; /* More space between steps */
    border: 1px solid #e2e8f0;
    box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.05); /* Inner shadow for depth */
}

.step-title {
    font-size: 1.5rem; /* Larger step title */
    font-weight: 700; /* Bolder */
    color: #334155;
    margin-bottom: 20px; /* More space below title */
}

/* Input group for letters */
.input-group {
    display: flex;
    justify-content: center;
    gap: 10px; /* Slightly more space between input boxes */
    margin-bottom: 20px; /* More space below inputs */
}

.input-group input {
    width: 60px; /* Slightly larger input boxes */
    height: 60px;
    font-size: 2.5rem; /* Larger font in inputs */
    text-align: center;
    border: 3px solid #cbd5e1; /* Thicker border */
    border-radius: 12px; /* More rounded */
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    text-transform: uppercase;
    font-weight: bold; /* Bold text in inputs */
    color: #334155;
}

.input-group input:focus {
    border-color: #6366f1; /* Quiznest blue */
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.4); /* Stronger glow on focus */
}

/* Feedback messages */
.feedback-message {
    margin-top: 15px; /* More space above message */
    font-size: 1.1rem; /* Slightly larger feedback text */
    font-weight: 600;
}

.correct {
    color: #10b981; /* Green for correct */
}

.wrong {
    color: #ef4444; /* Red for wrong */
}

/* Primary Button */
.button-primary {
    background-color: #6366f1; /* Quiznest blue */
    color: white;
    padding: 12px 25px; /* More padding */
    border-radius: 10px; /* More rounded */
    font-size: 1.1rem; /* Larger font */
    font-weight: 700; /* Bolder */
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.35); /* Stronger shadow */
    margin-top: 15px; /* More space above button */
    letter-spacing: 0.5px; /* Slightly spaced letters */
}

.button-primary:hover {
    background-color: #4f46e5;
    transform: translateY(-2px); /* More pronounced lift */
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.45);
}

.button-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(99, 102, 241, 0.3);
}

/* Secondary Button (Reset) */
.button-secondary {
    background-color: #e2e8f0;
    color: #475569;
    padding: 12px 25px; /* More padding */
    border-radius: 10px; /* More rounded */
    font-size: 1.1rem; /* Larger font */
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    border: none;
    margin-top: 30px; /* More space above */
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08); /* Subtle shadow */
}

.button-secondary:hover {
    background-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.15);
}

/* Game Over Message */
.game-over-message {
    font-size: 2rem; /* Larger game over message */
    font-weight: bold;
    color: #10b981;
    margin-top: 25px;
    animation: fadeIn 0.8s ease-out; /* Simple fade-in animation */
}

/* Target Word Display */
.target-word-display {
    font-size: 1.8rem; /* Larger target word */
    font-weight: bold;
    color: #334155;
    margin-top: 25px; /* More space above */
    background-color: #dbeafe; /* Light blue background */
    padding: 12px 25px; /* More padding */
    border-radius: 10px; /* Rounded corners */
    display: inline-block;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08); /* Subtle shadow */
}

/* Responsive adjustments for smaller screens */
@media (max-width: 640px) {
    .game-container {
        padding: 20px;
        border-radius: 10px;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    }
    .game-title {
        font-size: 2rem;
    }
    .header-words {
        font-size: 1.5rem;
        flex-direction: column; /* Stack start/target words vertically */
        gap: 10px;
    }
    .header-words span {
        padding: 8px 15px;
        font-size: 1.4rem;
    }
    .step-section {
        padding: 18px;
        border-radius: 10px;
    }
    .step-title {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }
    .input-group {
        gap: 6px;
    }
    .input-group input {
        width: 50px;
        height: 50px;
        font-size: 2.2rem;
    }
    .button-primary, .button-secondary {
        padding: 10px 20px;
        font-size: 1rem;
        border-radius: 8px;
    }
    .game-over-message {
        font-size: 1.6rem;
    }
    .target-word-display {
        font-size: 1.5rem;
        padding: 10px 20px;
    }
}

/* Simple fade-in animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}