/* =========================================================
   CLASSROOM RANDOM PICKER
   Presentation-style interface
========================================================= */


/* =========================================================
   RESET
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;

    font-family:
        Inter,
        "Segoe UI",
        Arial,
        Helvetica,
        sans-serif;

    color: #183153;

    background:
        radial-gradient(
            circle at 35% 35%,
            #ffffff 0%,
            #f8fafc 38%,
            #f2f6fa 100%
        );

    overflow-x: hidden;
}

button,
input,
textarea {
    font-family: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
}


/* =========================================================
   TOP BAR
========================================================= */

.top-bar {
    height: 86px;

    padding: 0 34px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;

    background: rgba(255, 255, 255, 0.94);

    border-bottom: 1px solid #e4eaf1;

    position: relative;
    z-index: 20;
}


/* =========================================================
   BRAND
========================================================= */

.brand {
    display: flex;
    align-items: center;

    gap: 13px;
}

.brand-icon {
    width: 45px;
    height: 45px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 14px;

    background: #eef4ff;

    font-size: 25px;
}

.brand h1 {
    font-size: 22px;

    line-height: 1.1;

    color: #152e4d;
}

.brand p {
    margin-top: 4px;

    font-size: 12px;

    color: #8492a4;
}


/* =========================================================
   TOP ACTIONS
========================================================= */

.top-actions {
    display: flex;
    align-items: center;

    gap: 11px;
}

.current-class {
    display: flex;
    flex-direction: column;

    padding-right: 18px;
    margin-right: 3px;

    border-right: 1px solid #e1e7ee;
}

.current-class-label {
    margin-bottom: 2px;

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 0.8px;

    text-transform: uppercase;

    color: #9aa7b5;
}

.current-class strong {
    max-width: 190px;

    overflow: hidden;

    text-overflow: ellipsis;
    white-space: nowrap;

    font-size: 14px;

    color: #28435f;
}


/* =========================================================
   HEADER BUTTONS
========================================================= */

.header-btn {
    height: 40px;

    padding: 0 15px;

    border: 1px solid #dce4ed;
    border-radius: 10px;

    background: #f8fafc;

    color: #405a76;

    font-size: 13px;
    font-weight: 650;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.15s ease;
}

.header-btn:hover {
    background: white;

    border-color: #bccadd;

    transform: translateY(-1px);
}


/* =========================================================
   MAIN PAGE
========================================================= */

.picker-page {
    width: min(1450px, calc(100% - 50px));

    min-height: calc(100vh - 86px);

    margin: 0 auto;

    padding: 28px 0 35px;

    display: grid;

    grid-template-columns:
        minmax(560px, 1.4fr)
        minmax(330px, 0.6fr);

    gap: 34px;

    align-items: center;
}


/* =========================================================
   WHEEL AREA
========================================================= */

.wheel-area {
    min-width: 0;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 5px 15px;
}


/* =========================================================
   WHEEL WRAPPER
========================================================= */

.wheel-wrapper {
    position: relative;

    width: min(650px, 72vh, 100%);
    aspect-ratio: 1 / 1;

    display: flex;
    align-items: center;
    justify-content: center;
}


/* =========================================================
   CANVAS
========================================================= */

#wheelCanvas {
    display: block;

    width: 100%;
    height: 100%;

    border-radius: 50%;

    filter:
        drop-shadow(
            0 18px 28px rgba(41, 62, 88, 0.14)
        );
}


/* =========================================================
   POINTER
========================================================= */

.wheel-pointer {
    position: absolute;

    top: -7px;
    left: 50%;

    transform: translateX(-50%);

    width: 0;
    height: 0;

    border-left: 19px solid transparent;
    border-right: 19px solid transparent;
    border-top: 36px solid #17324f;

    z-index: 8;

    filter:
        drop-shadow(
            0 4px 4px rgba(30, 45, 65, 0.2)
        );
}


/* Small circle on pointer */

.wheel-pointer::before {
    content: "";

    position: absolute;

    width: 12px;
    height: 12px;

    border-radius: 50%;

    background: white;

    top: -30px;
    left: -6px;
}


/* =========================================================
   SPIN BUTTON
========================================================= */

.spin-button {
    position: absolute;

    width: 128px;
    height: 128px;

    border-radius: 50%;

    border: 8px solid white;

    background:
        linear-gradient(
            145deg,
            #284a70,
            #142d4a
        );

    color: white;

    box-shadow:
        0 10px 25px rgba(18, 43, 70, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);

    z-index: 7;

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.spin-button span {
    font-size: 21px;

    font-weight: 800;

    letter-spacing: 1.2px;
}

.spin-button:hover {
    transform: scale(1.06);

    box-shadow:
        0 14px 30px rgba(18, 43, 70, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.spin-button:active {
    transform: scale(0.97);
}


/* =========================================================
   STUDENTS LEFT
========================================================= */

.remaining-pill {
    margin-top: 22px;

    min-height: 39px;

    padding: 0 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    border: 1px solid #e1e7ed;
    border-radius: 30px;

    background: rgba(255, 255, 255, 0.88);

    box-shadow:
        0 4px 12px rgba(35, 55, 80, 0.05);

    color: #718196;

    font-size: 13px;
}

.remaining-pill strong {
    color: #264a6e;

    font-size: 15px;
}

.remaining-dot {
    width: 8px;
    height: 8px;

    margin-right: 2px;

    border-radius: 50%;

    background: #67b78c;
}


/* =========================================================
   RESULT AREA
========================================================= */

.result-area {
    min-width: 0;

    display: flex;
    flex-direction: column;

    gap: 18px;
}


/* =========================================================
   RESULT CARD
========================================================= */

.result-card {
    position: relative;

    overflow: hidden;

    padding: 34px 28px 29px;

    border: 1px solid #e1e7ef;
    border-radius: 24px;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.98),
            rgba(247, 250, 253, 0.98)
        );

    box-shadow:
        0 12px 30px rgba(36, 58, 82, 0.08);

    text-align: center;
}


/* decorative glow */

.result-card::before {
    content: "";

    position: absolute;

    width: 220px;
    height: 220px;

    border-radius: 50%;

    top: -145px;
    right: -90px;

    background:
        rgba(104, 158, 235, 0.11);
}


/* =========================================================
   EYEBROWS
========================================================= */

.result-eyebrow,
.section-eyebrow {
    font-size: 10px;
    font-weight: 800;

    letter-spacing: 1.4px;

    text-transform: uppercase;

    color: #8797aa;
}

.result-eyebrow {
    margin-bottom: 17px;
}


/* =========================================================
   SELECTED STUDENT
========================================================= */

.selected-student {
    min-height: 88px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 5px;

    color: #173655;

    font-size: clamp(35px, 3vw, 53px);

    font-weight: 800;

    line-height: 1.05;

    text-align: center;

    word-break: break-word;
}

.result-message {
    min-height: 20px;

    margin: 5px 0 26px;

    color: #8a99aa;

    font-size: 13px;

    line-height: 1.5;
}


/* =========================================================
   RESULT ACTIONS
========================================================= */

.result-actions {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 11px;
}

.done-btn,
.keep-btn {
    min-height: 66px;

    padding: 9px 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 9px;

    border-radius: 13px;

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        opacity 0.15s ease;
}

.done-btn {
    border: 1px solid #cfe8d9;

    background: #ecf8f1;

    color: #28774e;
}

.keep-btn {
    border: 1px solid #d9e3f5;

    background: #f0f5fd;

    color: #436b9f;
}

.done-btn:not(:disabled):hover,
.keep-btn:not(:disabled):hover {
    transform: translateY(-2px);

    box-shadow:
        0 6px 13px rgba(35, 55, 80, 0.08);
}

.done-btn:disabled,
.keep-btn:disabled {
    opacity: 0.43;
}

.action-icon {
    font-size: 21px;
    font-weight: 800;
}

.done-btn > span:last-child,
.keep-btn > span:last-child {
    display: flex;
    flex-direction: column;

    text-align: left;

    font-size: 14px;
    font-weight: 750;
}

.done-btn small,
.keep-btn small {
    margin-top: 2px;

    font-size: 9px;
    font-weight: 500;

    opacity: 0.7;
}


/* =========================================================
   HISTORY CARD
========================================================= */

.history-card {
    padding: 23px 24px;

    border: 1px solid #e1e7ef;
    border-radius: 20px;

    background: rgba(255, 255, 255, 0.86);

    box-shadow:
        0 7px 20px rgba(36, 58, 82, 0.055);
}

.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 17px;
}

.history-header h2 {
    margin-top: 4px;

    color: #28445f;

    font-size: 17px;
}

.small-text-btn {
    padding: 5px;

    border: none;

    background: transparent;

    color: #8192a6;

    font-size: 11px;
    font-weight: 700;
}

.small-text-btn:hover {
    color: #3f6fa9;
}


/* =========================================================
   HISTORY
========================================================= */

.history-list {
    min-height: 50px;

    display: flex;
    flex-wrap: wrap;

    gap: 7px;

    align-content: flex-start;
}

.history-item {
    padding: 7px 11px;

    border: 1px solid #e1e8f0;
    border-radius: 20px;

    background: #f5f8fb;

    color: #536b84;

    font-size: 11px;
    font-weight: 700;
}

.empty-history,
.empty-message {
    color: #9aa8b7;

    font-size: 12px;

    font-style: italic;
}


/* =========================================================
   RESET
========================================================= */

.reset-btn {
    width: 100%;

    height: 42px;

    margin-top: 18px;

    border: 1px solid #dce4ec;
    border-radius: 10px;

    background: #f7f9fb;

    color: #5c7188;

    font-size: 12px;
    font-weight: 700;

    transition:
        background 0.15s ease,
        transform 0.15s ease;
}

.reset-btn:hover {
    background: #edf2f7;

    transform: translateY(-1px);
}


/* =========================================================
   CLASS SETUP OVERLAY
========================================================= */

.setup-overlay {
    position: fixed;

    inset: 0;

    z-index: 1000;

    display: flex;
    justify-content: flex-end;

    background:
        rgba(17, 34, 53, 0.35);

    backdrop-filter: blur(3px);
}

.setup-overlay.hidden {
    display: none;
}


/* =========================================================
   SETUP DRAWER
========================================================= */

.setup-drawer {
    width: min(480px, 100%);

    height: 100%;

    padding: 32px;

    overflow-y: auto;

    background: #ffffff;

    box-shadow:
        -20px 0 50px rgba(19, 38, 59, 0.16);

    animation:
        slideDrawer 0.25s ease;
}

@keyframes slideDrawer {

    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }

}


/* =========================================================
   DRAWER HEADER
========================================================= */

.drawer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;

    padding-bottom: 24px;

    border-bottom: 1px solid #e8edf2;
}

.drawer-header h2 {
    margin-top: 5px;

    color: #183754;

    font-size: 25px;
}

.drawer-header > div > p:last-child {
    margin-top: 7px;

    color: #8391a1;

    font-size: 13px;

    line-height: 1.5;
}


/* =========================================================
   CLOSE BUTTON
========================================================= */

.close-btn,
.modal-close {
    flex: 0 0 auto;

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 50%;

    background: #f3f6f9;

    color: #64788e;

    font-size: 24px;

    transition:
        background 0.15s ease,
        transform 0.15s ease;
}

.close-btn:hover,
.modal-close:hover {
    background: #e9eef3;

    transform: rotate(4deg);
}


/* =========================================================
   SETUP SECTIONS
========================================================= */

.setup-section {
    padding: 25px 0;
}

.setup-section-title {
    display: flex;
    align-items: center;

    gap: 12px;

    margin-bottom: 18px;
}

.setup-number {
    flex: 0 0 auto;

    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #eaf2ff;

    color: #3970b7;

    font-size: 13px;
    font-weight: 800;
}

.setup-section-title h3 {
    color: #29445f;

    font-size: 16px;
}

.setup-section-title p {
    margin-top: 2px;

    color: #8b99a8;

    font-size: 11px;
}


/* =========================================================
   SETUP FIELDS
========================================================= */

.setup-fields {
    display: grid;

    grid-template-columns: 1fr 105px;

    gap: 12px;
}

.input-group {
    display: flex;
    flex-direction: column;

    gap: 6px;
}

.input-group label {
    color: #536a82;

    font-size: 11px;
    font-weight: 700;
}

.input-group input {
    width: 100%;
    height: 44px;

    padding: 0 12px;

    outline: none;

    border: 1px solid #d8e1eb;
    border-radius: 10px;

    background: #fafcfd;

    color: #29435d;

    font-size: 13px;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.input-group input:focus {
    border-color: #78a2db;

    box-shadow:
        0 0 0 3px rgba(78, 129, 194, 0.11);
}


/* =========================================================
   MAIN ACTION BUTTON
========================================================= */

.main-action-btn {
    width: 100%;
    min-height: 45px;

    margin-top: 14px;

    border: none;
    border-radius: 11px;

    background:
        linear-gradient(
            135deg,
            #467cc1,
            #3267ad
        );

    color: white;

    font-size: 13px;
    font-weight: 750;

    box-shadow:
        0 6px 15px rgba(54, 105, 172, 0.18);

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.main-action-btn:hover {
    transform: translateY(-1px);

    box-shadow:
        0 8px 18px rgba(54, 105, 172, 0.23);
}


/* =========================================================
   OR DIVIDER
========================================================= */

.or-divider {
    position: relative;

    height: 20px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.or-divider::before {
    content: "";

    position: absolute;

    left: 0;
    right: 0;

    height: 1px;

    background: #e7ecf1;
}

.or-divider span {
    position: relative;

    padding: 0 12px;

    background: white;

    color: #a3aebb;

    font-size: 9px;
    font-weight: 800;
}


/* =========================================================
   IMPORT OPTIONS
========================================================= */

.import-options {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 10px;
}

.import-card {
    min-height: 96px;

    padding: 14px;

    display: flex;
    align-items: center;

    gap: 10px;

    text-align: left;

    border: 1px solid #dfe6ee;
    border-radius: 13px;

    background: #f9fbfd;

    color: #405b76;

    transition:
        transform 0.15s ease,
        border-color 0.15s ease,
        background 0.15s ease;
}

.import-card:hover {
    transform: translateY(-2px);

    border-color: #b9cbe0;

    background: white;
}

.import-icon {
    flex: 0 0 auto;

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: #edf3fa;

    font-size: 18px;
}

.import-card > span:last-child {
    display: flex;
    flex-direction: column;
}

.import-card strong {
    font-size: 12px;
}

.import-card small {
    margin-top: 4px;

    color: #8998a8;

    font-size: 9px;

    line-height: 1.3;
}


/* =========================================================
   SAVED CLASSES
========================================================= */

.saved-class-area {
    padding: 20px 0;

    border-top: 1px solid #e7ecf1;
}

.saved-classes-btn {
    width: 100%;

    min-height: 44px;

    border: 1px solid #dce4ec;
    border-radius: 11px;

    background: white;

    color: #536c85;

    font-size: 12px;
    font-weight: 700;
}

.saved-classes-btn:hover {
    background: #f7f9fc;
}


/* =========================================================
   PRIVACY NOTE
========================================================= */

.privacy-note {
    display: flex;
    align-items: flex-start;

    gap: 9px;

    padding: 13px;

    border-radius: 11px;

    background: #f5f8fa;

    color: #7e8e9e;
}

.privacy-note span {
    font-size: 14px;
}

.privacy-note p {
    font-size: 10px;

    line-height: 1.5;
}


/* =========================================================
   MODAL
========================================================= */

.modal {
    position: fixed;

    inset: 0;

    z-index: 1100;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background:
        rgba(17, 34, 53, 0.42);

    backdrop-filter: blur(4px);
}

.modal.hidden {
    display: none;
}


/* =========================================================
   MODAL CONTENT
========================================================= */

.modal-content {
    position: relative;

    width: min(520px, 100%);

    max-height: 90vh;

    overflow-y: auto;

    padding: 31px;

    border-radius: 20px;

    background: white;

    box-shadow:
        0 25px 60px rgba(18, 37, 58, 0.22);
}

.modal-content h2 {
    margin-top: 5px;

    color: #193753;

    font-size: 23px;
}

.modal-description {
    margin-top: 7px;
    margin-bottom: 18px;

    color: #8291a1;

    font-size: 12px;
}

.modal-close {
    position: absolute;

    top: 18px;
    right: 18px;
}


/* =========================================================
   TEXTAREA
========================================================= */

#namesTextarea {
    width: 100%;

    min-height: 240px;

    padding: 14px;

    resize: vertical;

    outline: none;

    border: 1px solid #d8e1ea;
    border-radius: 12px;

    background: #fafcfd;

    color: #29445f;

    font-size: 13px;

    line-height: 1.6;
}

#namesTextarea:focus {
    border-color: #78a2db;

    box-shadow:
        0 0 0 3px rgba(78, 129, 194, 0.11);
}


/* =========================================================
   SAVED CLASS LIST
========================================================= */

.saved-classes-list {
    display: flex;
    flex-direction: column;

    gap: 9px;

    margin-top: 20px;
}

.saved-class-item {
    padding: 13px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    border: 1px solid #e0e7ee;
    border-radius: 11px;

    background: #f8fafc;

    color: #405b75;
}

.saved-class-item strong {
    font-size: 13px;
}

.saved-class-item small {
    color: #8c9aaa;

    font-size: 10px;
}


/* =========================================================
   FULLSCREEN MODE
========================================================= */

body.fullscreen-mode .top-bar {
    height: 65px;
}

body.fullscreen-mode .brand p,
body.fullscreen-mode .current-class-label {
    display: none;
}

body.fullscreen-mode .picker-page {
    min-height: calc(100vh - 65px);

    padding-top: 12px;
    padding-bottom: 12px;
}

body.fullscreen-mode .wheel-wrapper {
    width: min(690px, 80vh, 100%);
}


/* =========================================================
   RESPONSIVE - MEDIUM SCREENS
========================================================= */

@media (max-width: 1050px) {

    .picker-page {
        grid-template-columns: 1fr;

        align-items: start;
    }

    .wheel-wrapper {
        width: min(610px, 82vw);
    }

    .result-area {
        width: min(650px, 100%);

        margin: 0 auto;
    }

}


/* =========================================================
   RESPONSIVE - TABLET
========================================================= */

@media (max-width: 760px) {

    .top-bar {
        height: auto;

        min-height: 75px;

        padding: 13px 18px;
    }

    .brand p {
        display: none;
    }

    .current-class {
        display: none;
    }

    .picker-page {
        width: calc(100% - 24px);

        min-height: auto;

        padding-top: 20px;

        gap: 22px;
    }

    .wheel-wrapper {
        width: min(580px, 88vw);
    }

    .spin-button {
        width: 105px;
        height: 105px;

        border-width: 6px;
    }

    .spin-button span {
        font-size: 18px;
    }

}


/* =========================================================
   RESPONSIVE - MOBILE
========================================================= */

@media (max-width: 540px) {

    .top-bar {
        gap: 10px;
    }

    .brand-icon {
        width: 38px;
        height: 38px;

        font-size: 20px;
    }

    .brand h1 {
        font-size: 17px;
    }

    .header-btn {
        height: 36px;

        padding: 0 10px;

        font-size: 11px;
    }

    #fullscreenBtn {
        display: none;
    }

    .wheel-area {
        padding-left: 0;
        padding-right: 0;
    }

    .wheel-wrapper {
        width: 91vw;
    }

    .wheel-pointer {
        border-left-width: 14px;
        border-right-width: 14px;
        border-top-width: 28px;
    }

    .spin-button {
        width: 88px;
        height: 88px;
    }

    .spin-button span {
        font-size: 15px;
    }

    .result-card {
        padding: 27px 18px 22px;
    }

    .selected-student {
        min-height: 70px;

        font-size: 34px;
    }

    .result-actions {
        grid-template-columns: 1fr;
    }

    .history-card {
        padding: 20px 18px;
    }

    .setup-drawer {
        padding: 24px 20px;
    }

    .setup-fields {
        grid-template-columns: 1fr 90px;
    }

    .import-options {
        grid-template-columns: 1fr;
    }

}

/* =========================================================
   HIDDEN NAMES MODE
========================================================= */

.header-btn.names-hidden-active {
    background: #eaf2ff;
    border-color: #bfd2ec;
    color: #315f98;
}

/* =========================================================
   WHEEL POINTER ANIMATION
========================================================= */

.wheel-pointer {
    transform-origin: 50% 0%;
}


/* Small tick while wheel is spinning */

.wheel-pointer.pointer-tick {
    animation: pointerTick 110ms ease-out;
}


@keyframes pointerTick {

    0% {
        transform:
            translateX(-50%)
            rotate(0deg);
    }

    35% {
        transform:
            translateX(-50%)
            rotate(8deg);
    }

    70% {
        transform:
            translateX(-50%)
            rotate(-3deg);
    }

    100% {
        transform:
            translateX(-50%)
            rotate(0deg);
    }

}


/* Stronger movement when the wheel stops */

.wheel-pointer.pointer-stop {
    animation: pointerStop 420ms ease-out;
}


@keyframes pointerStop {

    0% {
        transform:
            translateX(-50%)
            rotate(0deg)
            scale(1);
    }

    25% {
        transform:
            translateX(-50%)
            rotate(12deg)
            scale(1.08);
    }

    50% {
        transform:
            translateX(-50%)
            rotate(-6deg)
            scale(1.04);
    }

    75% {
        transform:
            translateX(-50%)
            rotate(3deg)
            scale(1.02);
    }

    100% {
        transform:
            translateX(-50%)
            rotate(0deg)
            scale(1);
    }

}
/* =========================================================
   RESULT CONFETTI
========================================================= */

.result-card {
    position: relative;
    overflow: hidden;
}


.confetti-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}


/*
   Keep the actual result content
   above the confetti.
*/

.result-card > *:not(.confetti-container) {
    position: relative;
    z-index: 2;
}


.confetti-piece {
    position: absolute;

    left: 50%;
    top: 42%;

    width: 8px;
    height: 14px;

    border-radius: 2px;

    opacity: 0;

    animation:
        confettiBurst
        1500ms
        cubic-bezier(.15,.7,.3,1)
        forwards;
}


@keyframes confettiBurst {

    0% {
        transform:
            translate(-50%, -50%)
            rotate(0deg)
            scale(0);

        opacity: 0;
    }


    10% {
        opacity: 1;
    }


    35% {
        transform:
            translate(
                calc(-50% + var(--x) * 0.65),
                calc(-50% + var(--y) * 0.65)
            )
            rotate(var(--rotation))
            scale(1);

        opacity: 1;
    }


    100% {
        transform:
            translate(
                calc(-50% + var(--x)),
                calc(-50% + var(--fall))
            )
            rotate(
                calc(
                    var(--rotation) + 240deg
                )
            )
            scale(0.8);

        opacity: 0;
    }

}

/* =========================================================
   SOFT CLASSROOM HEADER
========================================================= */

.top-bar {
    min-height: 86px;

    padding: 14px 32px;

    background:
        linear-gradient(
            110deg,
            #f4f8ff 0%,
            #f7fbff 45%,
            #f1faf8 100%
        );

    border-bottom: 1px solid #dfe9f2;

    box-shadow:
        0 3px 14px rgba(36, 65, 95, 0.05);
}


/* ---------------------------------------------------------
   BRAND
--------------------------------------------------------- */

.brand {
    gap: 14px;
}


.brand-icon {
    width: 56px;
    height: 56px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 18px;

    background:
        linear-gradient(
            145deg,
            #dce9ff,
            #e4f6f2
        );

    box-shadow:
        inset 0 0 0 1px
        rgba(83, 125, 170, 0.08);
}


.brand-dice {
    font-size: 30px;
    line-height: 1;

    color: #537ec5;

    transform: rotate(-8deg);
}


.brand h1 {
    color: #173756;

    font-weight: 800;

    letter-spacing: -0.5px;
}


.brand p {
    color: #8092a6;
}


/* ---------------------------------------------------------
   CURRENT CLASS
--------------------------------------------------------- */

.current-class {
    padding: 8px 18px;

    border-radius: 14px;

    background:
        rgba(255, 255, 255, 0.55);
}


.current-class-label {
    color: #91a2b4;
}


.current-class strong {
    color: #284766;
}


/* ---------------------------------------------------------
   HEADER BUTTONS
--------------------------------------------------------- */

.top-bar .header-btn {
    min-height: 48px;

    padding: 0 18px;

    border: 1px solid #d7e3ee;

    border-radius: 14px;

    background:
        rgba(255, 255, 255, 0.68);

    color: #45617d;

    font-weight: 700;

    box-shadow:
        0 2px 6px
        rgba(45, 75, 105, 0.025);

    transition:
        transform 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}


.top-bar .header-btn:hover {
    transform: translateY(-1px);

    background: #ffffff;

    border-color: #bfd1e1;

    box-shadow:
        0 5px 14px
        rgba(45, 75, 105, 0.08);
}


/* Hide Names active state */

.top-bar .header-btn.names-hidden-active {
    background: #e5efff;

    border-color: #bfd2ee;

    color: #3566a2;
}