body {
    font-family: sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #eef2f5;
    margin: 0;
    padding: 15px;
    box-sizing: border-box;
    min-height: 100vh;
    overflow-x: hidden;
}

.view {
    display: none;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 600px;
    margin-top: 5vh;
}
.active { display: flex; }

button {
    background-color: #0056b3;
    color: white;
    border: none;
    font-weight: bold;
    cursor: pointer;
    touch-action: manipulation;
    font-size: 1.4rem;
    padding: 15px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    width: 100%;
    margin-top: 20px;
}
button:active { background-color: #004494; transform: scale(0.98); }

h2 { color: #333; text-align: center; }

/* Faza 1: Rozgrzewka */
#paragraph-display {
    font-size: 1.6rem;
    line-height: 1.8;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
    text-align: justify;
    word-wrap: break-word;
    color: #111;
    letter-spacing: 1px;
}

/* Faza 2 & 3: RSVP */
.controls-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
    text-align: center;
}
.controls-card input {
    font-size: 1.2rem;
    padding: 10px;
    width: 120px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin: 10px 0;
}
#rsvp-display {
    font-size: 4rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    color: #111;
}
.fixation { color: #d32f2f; }

/* Faza 4: Test Retencji */
.test-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    width: 100%;
    margin-top: 20px;
}
.word-btn {
    background-color: #fff;
    color: #111;
    border: 2px solid #ccc;
    font-size: 1.2rem;
    text-transform: uppercase;
    padding: 15px;
    margin: 0;
    transition: all 0.2s;
}
.word-btn.selected {
    background-color: #28a745;
    color: white;
    border-color: #218838;
}
#test-feedback {
    margin-top: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    min-height: 30px;
}
/* Ewaluacja wyników po zatwierdzeniu */
.word-btn.eval-correct { background-color: #28a745 !important; color: white !important; border-color: #218838 !important; }
.word-btn.eval-incorrect { background-color: #d32f2f !important; color: white !important; border-color: #b71c1c !important; }
.word-btn.eval-missed { border: 3px dashed #28a745 !important; color: #111 !important; opacity: 0.8; }
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}