/* arcade font */
body {
    font-family: 'Press Start 2P', cursive, sans-serif;
    background-color: #f9f1c7;
    color: #111;
    margin: 0;
    padding: 0;
}

header {
    background-color: #ff6961;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    color: white;
}

header .logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

header .logo img {
    height: 50px;
}

header nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

header nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 0.85em;
}

header nav ul li a.active {
    text-decoration: underline;
}

/* Main content */
main {
    padding: 40px 20px;
    max-width: 600px;
    margin: auto;
}

h2 {
    font-size: 1.5em;
    margin-bottom: 20px;
    text-align: center;
}

/* hovering effect to look nice */
nav ul li a:hover {
  background: #a7d0e8;
  box-shadow: 1px 1px #333;
  transform: translate(2px, 2px);
}

/* Level cards */
.level {
    background-color: #ffffff;
    border: 3px solid #ff6961;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.level:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.level-info {
    display: flex;
    flex-direction: column;
    /* Allow input to take up most of the space */
    flex-grow: 1; 
    margin-right: 15px; /* Space between input and button */
}

.level-title {
    font-weight: bold;
    font-size: 1.1em;
}

.level-desc {
    font-size: 0.85em;
    color: #555;
}

.level-link {
    font-size: 1.5em;
    text-decoration: none;
    color: #ff6961;
    /* Ensures the button doesn't shrink when its a button */
    flex-shrink: 0; 
}

footer {
    text-align: center;
    padding: 20px;
    font-size: 0.8em;
    color: #777;
}


/* --- New Styles for the Spell Fixer Game Input --- */

.level-input {
    /* Inherit the custom arcade font */
    font-family: 'Press Start 2P', cursive, sans-serif;
    /* Match the size of the level description text */
    font-size: 0.85em; 
    /* Style the input box to look like a clean, editable field */
    border: 2px solid #555; 
    padding: 8px;
    margin-top: 5px; 
    width: 100%;
    /* Keep the background white */
    background-color: #ffffff;
    /* Reset default input styles that look out of place */
    box-sizing: border-box;
}

/* Style for when the user is actively typing */
.level-input:focus {
    outline: none; 
    border-color: #ff6961; 
    box-shadow: 2px 2px 0px rgba(255, 105, 97, 0.7); 
}

/* Ensure the button looks like a button and works in the flex container */
.level button.level-link {
    /* Makes the button visually separate from the link style, but keeps the color */
    background-color: transparent;
    border: 2px solid #ff6961;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 1em; 
    font-family: 'Press Start 2P', cursive, sans-serif;
}

.level button.level-link:hover {
    background-color: #ff6961;
    color: white;
}
