/* ===== Card: gradient frame + soft shadow + shimmer ===== */
.notes__card {
    position: relative;
    border-radius: 14px;
    padding: 1rem;
    margin: 2rem 0;
    background: linear-gradient(135deg, rgba(63, 81, 181, .06), rgba(156, 39, 176, .06));
    box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
    overflow: hidden;
}

/* Subtle moving shine layer */
.notes__card::before {
    content: "";
    position: absolute;
    inset: -200% -50%;
    background:
        radial-gradient(ellipse at top left, rgba(255, 255, 255, .18), transparent 40%),
        radial-gradient(ellipse at bottom right, rgba(255, 255, 255, .12), transparent 45%);
    animation: notesShimmer 12s linear infinite;
    pointer-events: none;
}

@keyframes notesShimmer {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg);
    }

    100% {
        transform: translateX(20%) translateY(-10%) rotate(1turn);
    }
}

/* ===== Content elements ===== */
.notes__hint {
    font-size: .95em;
    opacity: .8;
    margin-bottom: .5rem;
}

.notes__textarea {
    width: 100%;
    box-sizing: border-box;
    margin: .25rem 0 0.75rem;
    resize: vertical;
    border: 1px solid rgba(0, 0, 0, .15);
    border-radius: 10px;
    padding: .75rem .9rem;
    background: var(--md-default-bg-color, #fff);
    outline: none;
    transition: box-shadow .25s ease, border-color .25s ease;
}

.notes__textarea:focus {
    border-color: rgba(63, 81, 181, .45);
    box-shadow: 0 0 0 4px rgba(63, 81, 181, .15), 0 8px 16px rgba(0, 0, 0, .06);
}

.notes__row {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
}

.notes__status {
    font-size: .95em;
    opacity: .95;
}

.notes__status--warn {
    color: #c62828;
}

.notes__status--ok {
    color: #2e7d32;
}

/* ===== Save button with ripple ===== */
.notes__btn {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #3f51b5, #9c27b0);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: .55rem 1rem;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .2s ease, filter .2s ease;
    box-shadow: 0 6px 14px rgba(63, 81, 181, .25);
}

.notes__btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.notes__btn:active {
    transform: translateY(0);
}

.notes__btn--saved {
    box-shadow: 0 0 0 4px rgba(76, 175, 80, .25), 0 8px 18px rgba(0, 0, 0, .08);
}

.notes__ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    background: rgba(255, 255, 255, .4);
    animation: notesRipple .6s ease-out;
    pointer-events: none;
}

@keyframes notesRipple {
    to {
        transform: scale(2.6);
        opacity: 0;
    }
}

/* ===== Save outcome animations ===== */
.notes__card--shake {
    animation: notesShake .5s ease;
}

@keyframes notesShake {

    10%,
    90% {
        transform: translateX(-2px);
    }

    20%,
    80% {
        transform: translateX(4px);
    }

    30%,
    50%,
    70% {
        transform: translateX(-6px);
    }

    40%,
    60% {
        transform: translateX(6px);
    }
}

.notes__card--pulse {
    animation: notesPulse .6s ease;
}

@keyframes notesPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, .35), 0 6px 18px rgba(0, 0, 0, .08);
    }

    100% {
        box-shadow: 0 0 0 14px rgba(76, 175, 80, 0), 0 6px 18px rgba(0, 0, 0, .08);
    }
}

/* Rainbow flash for “all correct” state */
.notes__card--rainbow {
    animation: notesRainbow 1s ease;
}

@keyframes notesRainbow {
    0% {
        filter: hue-rotate(0deg) saturate(1);
    }

    50% {
        filter: hue-rotate(200deg) saturate(1.3);
    }

    100% {
        filter: hue-rotate(360deg) saturate(1);
    }
}

/* ===== Confetti + burst (crazy mode capable) ===== */
.notes__confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.notes__confetti span {
    position: absolute;
    top: -10%;
    animation-name: notesFall;
    animation-timing-function: ease-out;
    animation-fill-mode: forwards;
}

@keyframes notesFall {
    0% {
        transform: translateY(-10%) translateX(0) rotate(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    100% {
        transform: translateY(120%) translateX(var(--drift, 0)) rotate(var(--twist, 480deg));
        opacity: 0;
    }
}

.notes__burst {
    position: absolute;
    left: 50%;
    top: 42%;
    transform: translate(-50%, -50%) scale(0.8);
    font-size: 40px;
    animation: notesBurst .9s ease-out forwards;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .2));
}

@keyframes notesBurst {
    0% {
        transform: translate(-50%, -50%) scale(0.6);
        opacity: 0;
    }

    30% {
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.8);
        opacity: 0;
    }
}

/* docs/assets/notes.css (or your CSS) */
.md-typeset h3.compact {
    margin-top: .25rem;
    margin-bottom: .25rem;
}