/* --- Estils per a la pàgina principal (index) --- */
body.index-page {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, #f8f6f2 0%, #e6e2d8 100%);
    margin: 0;
    padding: 40px 20px;
    color: #333;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-container {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    max-width: 600px;
    width: 100%;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

h1 {
    font-size: 2.2rem;
    margin-top: 0;
    margin-bottom: 30px;
    color: #2c3e50;
    font-weight: 600;
}

.button-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media(min-width: 480px) {
    .button-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 24px;
    font-size: 1.1rem;
    font-family: inherit;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(118, 75, 162, 0.3);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.menu-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.menu-btn span {
    position: relative;
    z-index: 2;
}

.menu-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(118, 75, 162, 0.4);
}

.menu-btn:hover::before {
    opacity: 1;
}

.menu-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(118, 75, 162, 0.3);
}

.icon {
    margin-right: 10px;
    font-size: 1.3rem;
    position: relative;
    z-index: 2;
}


/* --- Estils compartits pels exercicis --- */
body.exercise-page {
    font-family: Georgia, "Times New Roman", serif;
    background: #f8f6f2;
    padding: 24px;
    color: #222;
    margin: 0;
}
body.exercise-page.centered {
    text-align: center;
    padding: 40px;
}

.card {
    max-width: 500px;
    margin: auto;
    background: #fff;
    border: 1px solid #cfc7b8;
    border-radius: 10px;
    padding: 30px;
}

.container {
    max-width: 900px;
    margin: auto;
    background: #fff;
    border: 1px solid #cfc7b8;
    border-radius: 6px;
    padding: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

th, td {
    text-align: left;
    padding: 8px 12px;
    border: 1px solid #cfc7b8;
    min-height: 40px;
}

th {
    background: #f1ede4;
    font-weight: bold;
}

.meaning {
    display: block;
    font-size: 11px;
    color: #666;
    margin-top: 2px;
    line-height: 1.2;
    font-style: italic;
}

select {
    width: 95%;
    padding: 4px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    transition: background-color 0.3s, border-color 0.3s;
}

select.correct {
    background-color: #c8e6c9;
    border-color: #4caf50;
}

select.wrong {
    background-color: #ffcdd2;
    border-color: #f44336;
}

#username {
    margin-bottom: 10px;
    font-size: 16px;
    padding: 4px;
    width: 200px;
}

button {
    margin-right: 10px;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
}

.options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 15px 0;
}

.options button {
    padding: 8px 14px;
    font-size: 14px;
    border-radius: 5px;
    cursor: pointer;
    border: 1px solid #ccc;
    background: #fff;
}

button.navBtn {
    margin: 2px;
    font-size: 12px;
    padding: 4px 8px;
    cursor: pointer;
}

button.navBtn.active {
    border: 2px solid #4caf50;
}

.exerciseBar {
    margin-bottom: 20px;
}

.exerciseBar button {
    margin: 2px;
    font-size: 13px;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    border: 1px solid #ccc;
    background: white;
}

.exerciseBar button.active {
    border: 2px solid #4caf50;
}

.verbBar {
    margin-bottom: 20px;
}

.navControls {
    margin-top: 15px;
}

.navControls button {
    padding: 6px 12px;
    margin: 0 5px;
}

#score {
    font-size: 20px;
    margin-top: 20px;
}

#summary {
    font-size: 18px;
    margin-top: 15px;
    color: #222;
}
