/* ----- Your colors: change these to change the whole app ----- */
:root {
    --lavender: #c9b6f2;
    --deep-purple: #7a5bb5;
    --soft-pink: #f7c6dd;
    --mint: #c8ecd9;
    --cream: #fffaf5;
    --text-color: #4b3a63;
    --card-shadow: 0 8px 24px rgba(122, 91, 181, 0.25);
}

/* ----- Reset: remove the browser's default spacing ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ----- The whole page ----- */
body {
    font-family: "Quicksand", sans-serif;
    color: var(--text-color);
    background: linear-gradient(160deg, #f3ecff 0%, #fde8f3 50%, #e9f7f0 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    padding: 2rem 1rem 3rem;
}

/* ----- Title with sparkles on both sides ----- */
h1 {
    font-family: "Dancing Script", cursive;
    font-size: clamp(2.5rem, 8vw, 4rem);
    color: var(--deep-purple);
    text-shadow: 2px 2px 0 var(--soft-pink);
}

h1::before {
    content: "✿ ";
    color: var(--soft-pink);
}

h1::after {
    content: " ✿";
    color: var(--soft-pink);
}

/* ----- Category and Show menus ----- */
#filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem 0.75rem;
}

label {
    font-weight: 600;
}

select {
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-color);
    background-color: var(--cream);
    border: 2px solid var(--lavender);
    border-radius: 999px;
    padding: 0.4rem 1rem;
    cursor: pointer;
}

/* ----- The flashcard ----- */
#card-area {
    width: 100%;
    max-width: 420px;
}

.card {
    background-color: var(--cream);
    border: 3px dashed var(--lavender);
    border-radius: 28px;
    box-shadow: var(--card-shadow);
    min-height: 300px;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: transform 0.25s, box-shadow 0.25s;
}

.card:hover {
    transform: translateY(-4px) rotate(-1deg);
    box-shadow: 0 12px 30px rgba(122, 91, 181, 0.35);
}

.card-picture {
    font-size: 4.5rem;
}

.card-spanish {
    font-family: "Quicksand", sans-serif;
    font-size: 2.4rem;
    font-weight: 600;
    color: var(--deep-purple);
}

.card-english {
    font-size: 1.3rem;
    font-weight: 600;
    background-color: var(--soft-pink);
    border-radius: 999px;
    padding: 0.25rem 1rem;
}

.card-sentence {
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.card-sentence-english {
    font-size: 1.05rem;
}

.card-notes {
    font-size: 0.9rem;
    background-color: var(--mint);
    border-radius: 14px;
    padding: 0.5rem 0.9rem;
    margin-top: 0.5rem;
}

.card-hint {
    font-size: 0.85rem;
    opacity: 0.6;
}

/* ----- "3 / 38 · Still learning" line ----- */
#card-counter {
    font-weight: 600;
    opacity: 0.8;
}

/* ----- Buttons ----- */
#card-buttons,
#mark-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

button {
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    background-color: var(--lavender);
    border: none;
    border-radius: 999px;
    padding: 0.6rem 1.3rem;
    cursor: pointer;
    box-shadow: 0 3px 0 var(--deep-purple);
    transition: transform 0.15s, background-color 0.15s;
}

button:hover {
    background-color: var(--soft-pink);
    transform: translateY(-2px);
}

button:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 var(--deep-purple);
}

#know-button {
    background-color: var(--mint);
}

#edit-button,
#cancel-edit-button {
    background-color: var(--cream);
    border: 2px solid var(--lavender);
}

/* ----- Add a word ----- */
#add-word-section {
    width: 100%;
    max-width: 420px;
    background-color: rgba(255, 250, 245, 0.7);
    border: 2px solid var(--soft-pink);
    border-radius: 24px;
    padding: 1.5rem;
    margin-top: 1rem;
}

#add-word-section h2 {
    font-family: "Dancing Script", cursive;
    font-size: 2rem;
    color: var(--deep-purple);
    text-align: center;
    margin-bottom: 1rem;
}

#word-form {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

input {
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-color);
    background-color: white;
    border: 2px solid var(--lavender);
    border-radius: 12px;
    padding: 0.55rem 0.8rem;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--deep-purple);
}

#form-message {
    text-align: center;
    font-weight: 600;
    margin-top: 0.75rem;
}
