/* =========================
   SPINNER PAGE
========================= */

.spinner-page {
    min-height: calc(100vh - 80px);
    padding-bottom: 60px;
}


/* =========================
   PAGE HEADER
========================= */

.spinner-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.page-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 8px 14px;

    border-radius: 50px;

    background: #eef2ff;
    color: #6366f1;

    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;

    margin-bottom: 15px;
}

.spinner-header h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 12px;
}

.spinner-header h1 i {
    color: #6366f1;
}

.spinner-header p {
    color: #64748b;
    font-size: 17px;
    margin: 0;
}


/* =========================
   MAIN PANELS
========================= */

.spinner-panel {
    background: rgba(255, 255, 255, 0.9);

    border: 1px solid #e8edf5;

    border-radius: 28px;

    padding: 28px;

    box-shadow:
        0 10px 30px rgba(15, 23, 42, 0.05),
        0 30px 60px rgba(15, 23, 42, 0.04);
}


/* =========================
   EDITOR PANEL
========================= */

.editor-panel {
    height: 100%;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 25px;
}

.panel-heading h4 {
    font-weight: 700;
    margin-bottom: 5px;
}

.panel-heading p {
    color: #94a3b8;
    font-size: 14px;
    margin: 0;
}

.panel-icon {
    width: 50px;
    height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 16px;

    background: #eef2ff;
    color: #6366f1;

    font-size: 22px;
}


/* =========================
   ADD ITEM
========================= */

.add-item-box {
    display: flex;
    gap: 10px;

    margin-bottom: 15px;
}

.add-item-box input {
    height: 52px;

    border-radius: 14px;

    border: 1px solid #e2e8f0;

    padding-left: 18px;

    box-shadow: none;
}

.add-item-box input:focus {
    border-color: #6366f1;

    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.btn-add-item {
    width: 52px;
    height: 52px;

    border-radius: 14px;

    background: linear-gradient(
        135deg,
        #6366f1,
        #4f46e5
    );

    color: white;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 20px;

    border: none;

    transition: 0.25s;
}

.btn-add-item:hover {
    color: white;

    transform: scale(1.05);

    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}


/* =========================
   SEARCH
========================= */

.search-box {
    position: relative;

    margin-bottom: 20px;
}

.search-box i {
    position: absolute;

    left: 15px;
    top: 50%;

    transform: translateY(-50%);

    color: #94a3b8;

    z-index: 2;
}

.search-box input {
    padding-left: 42px;

    height: 45px;

    border-radius: 12px;

    border: 1px solid #e2e8f0;

    background: #f8fafc;
}


/* =========================
   ACTIVITY LIST
========================= */

.activity-list {
    max-height: 430px;

    overflow-y: auto;

    padding-right: 5px;
}

.activity-list::-webkit-scrollbar {
    width: 5px;
}

.activity-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;

    border-radius: 10px;
}


/* =========================
   FOOTER
========================= */

.editor-footer {
    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-top: 20px;

    padding-top: 20px;

    border-top: 1px solid #edf0f5;
}

.item-count {
    color: #64748b;

    font-size: 14px;
}

.item-count i {
    color: #6366f1;
}

.btn-clear {
    color: #ef4444;

    font-size: 14px;

    padding: 7px 12px;

    border-radius: 10px;
}

.btn-clear:hover {
    background: #fef2f2;

    color: #dc2626;
}


/* =========================
   WHEEL PANEL
========================= */

.wheel-panel {
    min-height: 100%;

    display: flex;

    flex-direction: column;
}

.wheel-panel-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    padding-bottom: 20px;

    border-bottom: 1px solid #edf0f5;
}

.wheel-label {
    display: block;

    color: #6366f1;

    font-size: 11px;

    font-weight: 700;

    letter-spacing: 1.5px;

    margin-bottom: 6px;
}

.wheel-panel-header h4 {
    font-weight: 700;

    margin: 0;
}


/* =========================
   LIVE INDICATOR
========================= */

.live-indicator {
    display: flex;

    align-items: center;

    gap: 8px;

    color: #64748b;

    font-size: 13px;
}

.live-indicator span {
    width: 9px;
    height: 9px;

    border-radius: 50%;

    background: #22c55e;

    box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.12);
}


/* =========================
   WHEEL STAGE
========================= */

.wheel-stage {
    position: relative;

    display: flex;

    align-items: center;

    justify-content: center;

    flex: 1;

    min-height: 580px;

    overflow: hidden;
}


/* Decorative background */

.wheel-stage::before {
    content: "";

    position: absolute;

    width: 420px;
    height: 420px;

    border-radius: 50%;

    background: radial-gradient(
        circle,
        rgba(99, 102, 241, 0.1),
        transparent 70%
    );
}


/* =========================
   WHEEL WRAPPER
========================= */

.wheel-wrapper {

    position: relative;

    z-index: 2;

    width: min(100%, 600px);

    aspect-ratio: 1 / 1;

    padding: 12px;

    border-radius: 50%;

    background: white;

    box-shadow:
        0 25px 60px rgba(15, 23, 42, 0.15),
        inset 0 0 0 8px #f8fafc;

}


/* Canvas */

#wheel {
    display: block;

    width: 100%;
    max-width: 600px;

    height: auto;

    aspect-ratio: 1 / 1;

    border-radius: 50%;
}


/* =========================
   POINTER
========================= */

.wheel-pointer {
    position: absolute;

    top: 0px;

    left: 50%;

    transform: translateX(-50%);

    z-index: 5;

    width: 58px;
    height: 58px;

    border-radius: 50%;

    background: linear-gradient(
        135deg,
        #ef4444,
        #dc2626
    );

    color: white;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 30px;

    box-shadow:
        0 10px 25px rgba(220, 38, 38, 0.35);

    border: 5px solid white;
}


/* =========================
   SPIN BUTTON
========================= */

.spin-action {
    text-align: center;

    padding-top: 10px;
}

.btn-spin {
    min-width: 260px;

    padding: 17px 35px;

    border-radius: 50px;

    border: none;

    background: linear-gradient(
        135deg,
        #6366f1,
        #4f46e5
    );

    color: white;

    font-weight: 700;

    letter-spacing: 0.8px;

    box-shadow:
        0 15px 30px rgba(99, 102, 241, 0.3);

    transition: 0.3s;
}

.btn-spin:hover {
    color: white;

    transform: translateY(-3px);

    box-shadow:
        0 20px 40px rgba(99, 102, 241, 0.4);
}

.btn-spin:disabled {
    opacity: 0.7;

    transform: none;
}

.spin-icon {
    margin-right: 8px;
}

.spin-action p {
    color: #94a3b8;

    font-size: 13px;

    margin-top: 14px;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 991px) {

    .spinner-header h1 {
        font-size: 34px;
    }

    .wheel-stage {
        min-height: 500px;
    }

    .editor-panel {
        margin-bottom: 10px;
    }

}


@media (max-width: 576px) {

    .spinner-page {
        padding: 10px 0;
    }

    .spinner-panel {
        padding: 20px;

        border-radius: 22px;
    }

    .spinner-header h1 {
        font-size: 28px;
    }

    .spinner-header p {
        font-size: 15px;
    }

    .wheel-panel-header {
        align-items: flex-start;

        flex-direction: column;

        gap: 12px;
    }

    .wheel-stage {
        min-height: 380px;
    }

    .wheel-pointer {
        top: 25px;

        width: 50px;
        height: 50px;
    }

    .btn-spin {
        width: 100%;

        min-width: auto;
    }

}

/* =========================
   ACTIVITY ITEM
========================= */

.item-row {

    display: flex;

    align-items: center;

    gap: 12px;

    padding: 13px 12px;

    margin-bottom: 8px;

    border: 1px solid #eef0f5;

    border-radius: 14px;

    background: #ffffff;

    transition: 0.2s;

}


.item-row:hover {

    transform: translateY(-2px);

    border-color: #c7d2fe;

    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);

}


.drag-handle {

    cursor: grab;

    color: #94a3b8;

    font-size: 18px;

    display: flex;

    align-items: center;

}


.drag-handle:active {

    cursor: grabbing;

}


.color-box {

    width: 14px;

    height: 14px;

    min-width: 14px;

    border-radius: 50%;

}

.item-title {

    flex: 1;

    font-size: 15px;

    font-weight: 500;

    color: #334155;

    cursor: pointer;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

}


.remove-item {

    width: 32px;

    height: 32px;

    border: none;

    border-radius: 9px;

    background: transparent;

    color: #ef4444;

    display: flex;

    align-items: center;

    justify-content: center;

    transition: 0.2s;

}


.remove-item:hover {

    background: #fef2f2;

    color: #dc2626;

}

/* =========================
   WINNER CELEBRATION MODAL
========================= */

.winner-modal {
    position: fixed;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(15, 23, 42, 0.65);

    backdrop-filter: blur(8px);

    opacity: 0;
    visibility: hidden;

    transition: 0.3s ease;

    z-index: 9999;
}


.winner-modal.show {
    opacity: 1;
    visibility: visible;
}


.winner-modal-card {
    position: relative;

    width: 90%;
    max-width: 480px;

    padding: 55px 40px 45px;

    text-align: center;

    background: white;

    border-radius: 28px;

    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.25);

    transform: scale(0.8) translateY(30px);

    transition: 0.35s ease;

    overflow: hidden;
}


.winner-modal.show .winner-modal-card {
    transform: scale(1) translateY(0);
}


/* Close Button */

.winner-close {
    position: absolute;

    top: 18px;
    right: 18px;

    width: 38px;
    height: 38px;

    border: none;
    border-radius: 50%;

    background: #f1f5f9;

    color: #475569;

    cursor: pointer;

    font-size: 16px;

    transition: 0.2s ease;
}


.winner-close:hover {
    background: #ef4444;
    color: white;
}


/* Trophy */

.winner-trophy {
    font-size: 85px;

    margin-bottom: 12px;

    animation: trophyBounce 1s ease infinite alternate;
}


@keyframes trophyBounce {

    from {
        transform: translateY(0) rotate(-5deg);
    }

    to {
        transform: translateY(-12px) rotate(5deg);
    }

}


/* Winner Label */

.winner-label {
    font-size: 12px;

    font-weight: 700;

    letter-spacing: 3px;

    color: #6366f1;

    margin-bottom: 12px;
}


/* Winner Name */

#winnerName {
    font-size: 42px;

    font-weight: 800;

    color: #1e293b;

    margin-bottom: 12px;

    word-break: break-word;
}


.winner-message {
    color: #64748b;

    margin-bottom: 30px;

    font-size: 16px;
}


/* Spin Again */

.btn-spin-again {
    border: none;

    border-radius: 14px;

    padding: 14px 30px;

    background: linear-gradient(
        135deg,
        #6366f1,
        #4f46e5
    );

    color: white;

    font-weight: 700;

    letter-spacing: 1px;

    transition: 0.2s ease;
}


.btn-spin-again:hover {
    transform: translateY(-2px);

    box-shadow:
        0 12px 25px rgba(
            99,
            102,
            241,
            0.35
        );

    color: white;
}


/* =========================
   CONFETTI
========================= */

.confetti-container {
    position: absolute;

    inset: 0;

    pointer-events: none;

    overflow: hidden;
}


.confetti-container span {
    position: absolute;

    width: 10px;
    height: 16px;

    top: -30px;

    animation: confettiFall 3s linear infinite;
}


.confetti-container span:nth-child(1) {
    left: 10%;
    background: #6366f1;
    animation-delay: 0s;
}

.confetti-container span:nth-child(2) {
    left: 25%;
    background: #ec4899;
    animation-delay: 0.5s;
}

.confetti-container span:nth-child(3) {
    left: 40%;
    background: #f97316;
    animation-delay: 1s;
}

.confetti-container span:nth-child(4) {
    left: 55%;
    background: #14b8a6;
    animation-delay: 1.5s;
}

.confetti-container span:nth-child(5) {
    left: 70%;
    background: #8b5cf6;
    animation-delay: 0.7s;
}

.confetti-container span:nth-child(6) {
    left: 85%;
    background: #ef4444;
    animation-delay: 1.2s;
}

.confetti-container span:nth-child(7) {
    left: 18%;
    background: #facc15;
    animation-delay: 1.8s;
}

.confetti-container span:nth-child(8) {
    left: 78%;
    background: #22c55e;
    animation-delay: 2.1s;
}


@keyframes confettiFall {

    0% {
        transform:
            translateY(0)
            rotate(0deg);

        opacity: 1;
    }

    100% {
        transform:
            translateY(500px)
            rotate(720deg);

        opacity: 0;
    }

}

/* =========================
   FULL SCREEN CONFETTI
========================= */

.confetti-container {

    position: fixed;

    inset: 0;

    overflow: hidden;

    pointer-events: none;

    z-index: 10000;

}


.confetti-piece {

    position: absolute;

    top: -20px;

    width: 10px;

    height: 16px;

    border-radius: 2px;

    animation-name: confettiFall;

    animation-timing-function: linear;

    animation-fill-mode: forwards;

}


@keyframes confettiFall {

    0% {

        transform:
            translateY(-30px)
            rotate(0deg);

        opacity: 1;

    }


    100% {

        transform:
            translateY(110vh)
            rotate(720deg);

        opacity: 0;

    }

}

/* =========================
   SOUND TOGGLE
========================= */

.spin-controls {

    display: flex;

    justify-content: center;

    align-items: center;

    gap: 12px;

}


.sound-toggle {

    width: 48px;

    height: 48px;

    border: none;

    border-radius: 50%;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #f1f5f9;

    color: #475569;

    font-size: 20px;

    cursor: pointer;

    transition: all 0.25s ease;

}


.sound-toggle:hover {

    transform: scale(1.08);

    background: #e2e8f0;

}


.sound-toggle.sound-off {

    color: #ef4444;

}

/* =========================
   ACTIVITY ADD AREA
========================= */

.activity-add-row {

    display: flex;

    align-items: center;

    gap: 10px;

    margin-bottom: 10px;

}


.activity-input {

    flex: 1;

    min-width: 0;

    height: 52px;

    border: 1px solid #dbe2ea;

    border-radius: 16px;

    padding: 0 18px;

    outline: none;

    font-size: 15px;

}


.activity-input:focus {

    border-color: #6366f1;

    box-shadow:
        0 0 0 3px
        rgba(99, 102, 241, 0.10);

}


.add-activity-button {

    width: 52px;

    height: 52px;

    flex-shrink: 0;

    border: none;

    border-radius: 16px;

    background: linear-gradient(
        135deg,
        #6366f1,
        #4f46e5
    );

    color: white;

    font-size: 22px;

    cursor: pointer;

    transition: all 0.2s ease;

}


.add-activity-button:hover {

    transform: translateY(-2px);

    box-shadow:
        0 8px 20px
        rgba(79, 70, 229, 0.25);

}


/* =========================
   BULK ADD TOGGLE
========================= */

.bulk-toggle-button {

    width: 100%;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 10px 4px;

    border: none;

    background: transparent;

    color: #6366f1;

    font-size: 14px;

    font-weight: 600;

    cursor: pointer;

    transition: 0.2s ease;

}


.bulk-toggle-button span {

    display: flex;

    align-items: center;

    gap: 8px;

}


.bulk-toggle-button:hover {

    color: #4f46e5;

}


.bulk-toggle-button.active
#bulkToggleIcon {

    transform: rotate(180deg);

}


/* =========================
   BULK ADD PANEL
========================= */

.bulk-add-panel {

    display: none;

    margin-top: 8px;

    padding: 16px;

    border-radius: 16px;

    background: #f8f9ff;

    border: 1px solid #e0e4ff;

    animation: bulkPanelOpen 0.25s ease;

}


.bulk-add-panel.show {

    display: block;

}


@keyframes bulkPanelOpen {

    from {

        opacity: 0;

        transform: translateY(-8px);

    }

    to {

        opacity: 1;

        transform: translateY(0);

    }

}


.bulk-add-description {

    margin-bottom: 12px;

    font-size: 12px;

    line-height: 1.5;

    color: #718096;

}


.bulk-items-input {

    width: 100%;

    min-height: 140px;

    padding: 12px;

    border: 1px solid #dbe2ea;

    border-radius: 12px;

    resize: vertical;

    outline: none;

    font-size: 14px;

    line-height: 1.6;

    background: white;

}


.bulk-items-input:focus {

    border-color: #6366f1;

    box-shadow:
        0 0 0 3px
        rgba(99, 102, 241, 0.1);

}


/* =========================
   BULK ACTIONS
========================= */

.bulk-actions {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 10px;

    margin-top: 12px;

}


.bulk-shortcut {

    font-size: 11px;

    color: #94a3b8;

}


.btn-bulk-add {

    padding: 10px 16px;

    border: none;

    border-radius: 10px;

    background: #6366f1;

    color: white;

    font-size: 13px;

    font-weight: 600;

    cursor: pointer;

    transition: 0.2s ease;

}


.btn-bulk-add:hover {

    background: #4f46e5;

    transform: translateY(-1px);

}

/* =========================
   WINNER REMOVAL OPTION
========================= */

.winner-option {

    display: flex;

    justify-content: center;

    margin: 14px 0 10px;

}


.winner-checkbox-label {

    display: flex;

    align-items: center;

    gap: 10px;

    padding: 10px 16px;

    border: 1px solid #e2e8f0;

    border-radius: 14px;

    background: #ffffff;

    cursor: pointer;

    transition: all 0.2s ease;

}


.winner-checkbox-label:hover {

    border-color: #6366f1;

    box-shadow:
        0 4px 14px
        rgba(99, 102, 241, 0.10);

}


.winner-checkbox-label input {

    display: none;

}


.custom-checkbox {

    width: 20px;

    height: 20px;

    flex-shrink: 0;

    border: 2px solid #cbd5e1;

    border-radius: 6px;

    position: relative;

    transition: all 0.2s ease;

}


.winner-checkbox-label input:checked
+ .custom-checkbox {

    background: #6366f1;

    border-color: #6366f1;

}


.winner-checkbox-label input:checked
+ .custom-checkbox::after {

    content: "";

    position: absolute;

    left: 5px;

    top: 1px;

    width: 5px;

    height: 10px;

    border: solid white;

    border-width: 0 2px 2px 0;

    transform: rotate(45deg);

}


.winner-option-text {

    display: flex;

    flex-direction: column;

}


.winner-option-text strong {

    font-size: 13px;

    color: #334155;

}


.winner-option-text small {

    margin-top: 2px;

    font-size: 11px;

    color: #94a3b8;

}

/* =========================
   SPINNER MODE
========================= */

.spinner-mode {

    display: flex;

    justify-content: center;

    gap: 6px;

    margin-bottom: 24px;

    padding: 5px;

    width: fit-content;

    margin-left: auto;

    margin-right: auto;

    background: #f1f5f9;

    border-radius: 14px;

}


.spinner-mode-button {

    border: none;

    background: transparent;

    padding: 10px 18px;

    border-radius: 10px;

    color: #64748b;

    font-weight: 600;

    cursor: pointer;

    transition: all 0.2s ease;

}


.spinner-mode-button.active {

    background: white;

    color: #6366f1;

    box-shadow:
        0 2px 8px
        rgba(0, 0, 0, 0.08);

}


.spinner-mode-button:hover {

    color: #6366f1;

}


/* =========================
   TEAM MODE
========================= */

.team-mode {

    max-width: 1100px;

    margin: 0 auto;

}


.team-builder-card {

    background: white;

    border-radius: 24px;

    padding: 32px;

    border: 1px solid #e2e8f0;

    box-shadow:
        0 10px 35px
        rgba(0, 0, 0, 0.06);

}


.team-builder-header {

    display: flex;

    align-items: center;

    gap: 16px;

    margin-bottom: 28px;

}


.team-builder-icon {

    width: 58px;

    height: 58px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 16px;

    background: #eef2ff;

    font-size: 28px;

}


.team-builder-header h2 {

    margin: 0;

    font-size: 24px;

    font-weight: 700;

}


.team-builder-header p {

    margin: 4px 0 0;

    color: #64748b;

    font-size: 14px;

}


/* PLAYER COUNT */

.team-player-count {

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 16px 18px;

    background: #f8fafc;

    border-radius: 14px;

    margin-bottom: 20px;

}


.team-player-count span {

    color: #64748b;

}


.team-player-count strong {

    font-size: 24px;

    color: #6366f1;

}


/* SETTINGS */

.team-setting {

    margin-bottom: 18px;

}


.team-setting label {

    display: block;

    margin-bottom: 8px;

    font-size: 14px;

    font-weight: 600;

}


.team-setting select {

    border-radius: 12px;

    padding: 9px;

}


/* BALANCE */

.team-balance-option {

    display: flex;

    align-items: center;

    gap: 10px;

    margin-bottom: 22px;

    cursor: pointer;

    font-size: 14px;

}


.team-balance-option input {

    width: 18px;

    height: 18px;

    accent-color: #6366f1;

}


/* CREATE */

.create-teams-button {

    width: 100%;

    padding: 14px;

    border: none;

    border-radius: 14px;

    background: #6366f1;

    color: white;

    font-size: 15px;

    font-weight: 700;

    cursor: pointer;

    transition: all 0.2s ease;

}


.create-teams-button:hover {

    background: #4f46e5;

    transform: translateY(-1px);

}


/* RESULTS */

.team-results {

    margin-top: 30px;

}

/* ==========================================
   TEAM SHUFFLE AREA
========================================== */

.team-shuffle-area{
    margin-top:30px;
}

.shuffle-progress{
    margin-bottom:25px;
}

.shuffle-progress-top{
    display:flex;
    justify-content:space-between;
    margin-bottom:10px;
    font-weight:600;
}

.progress{
    height:10px;
    border-radius:20px;
    background:#eef2ff;
    overflow:hidden;
}

.progress-bar{
    background:linear-gradient(90deg,#6366F1,#8B5CF6);
    transition:width .5s ease;
}

.current-selection-card{

    background:linear-gradient(135deg,#EEF2FF,#F8FAFF);

    border-radius:20px;

    padding:25px;

    text-align:center;

    margin-bottom:30px;

    border:2px solid #DDE3FF;
}

.selection-label{
    font-size:13px;
    text-transform:uppercase;
    color:#6366F1;
    letter-spacing:1px;
}

.selected-player{

    font-size:38px;

    font-weight:700;

    color:#312E81;

    margin-top:8px;
}

.assigned-team{

    margin-top:10px;

    font-size:18px;

    color:#16A34A;

    font-weight:600;
}

/* TEAM GRID */

.team-results{

    display:grid;

    grid-template-columns:
        repeat(auto-fit,minmax(230px,1fr));

    gap:20px;
}

.team-card{

    background:white;

    border-radius:20px;

    padding:20px;

    border:2px solid #EEF2FF;

    box-shadow:0 8px 20px rgba(99,102,241,.08);

    animation:fadeIn .4s ease;
}

.team-card h4{

    color:#4F46E5;

    margin-bottom:15px;
}

.team-member{

    background:#F8FAFC;

    border-radius:12px;

    padding:10px 14px;

    margin-bottom:10px;

    display:flex;

    align-items:center;

    gap:10px;

    animation:slideUp .35s ease;
}

.team-member::before{
    content:"👤";
}

@keyframes slideUp{
    from{
        opacity:0;
        transform:translateY(10px);
    }
    to{
        opacity:1;
        transform:none;
    }
}

@keyframes fadeIn{
    from{opacity:0;}
    to{opacity:1;}
}

/* =========================================================
   TEAM BUILDER WHEEL ANIMATION
========================================================= */

.team-wheel-spinning {

    animation:
        teamWheelSpin
        1.3s
        cubic-bezier(.12,.8,.25,1);

}


@keyframes teamWheelSpin {

    0% {

        transform:
            rotate(0deg);

    }

    100% {

        transform:
            rotate(1080deg);

    }

}

/* =========================================================
   TEAM BUILDER - MAKE WHEEL VISIBLE
========================================================= */

#teamMode .wheel-panel {
    display: block;
}

#teamMode .wheel-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 620px;
    position: relative;
}

#teamMode .wheel-wrapper {
    width: 600px;
    height: 600px;
    max-width: 90vw;
    max-height: 90vw;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#teamMode #wheel {
    display: block !important;
    width: 600px;
    height: 600px;
    max-width: 100%;
    max-height: 100%;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative;
    z-index: 2;
    transform-origin: center center;
}

/* Keep the pointer above the wheel */

#teamMode .wheel-pointer {
    display: block !important;
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}


/* Smaller screens */

@media (max-width: 768px) {

    #teamMode .wheel-stage {
        min-height: auto;
        padding: 20px 0;
    }

    #teamMode .wheel-wrapper {
        width: 90vw;
        height: 90vw;
    }

    #teamMode #wheel {
        width: 90vw;
        height: 90vw;
    }

}

/* =========================================================
   TEAM BUILDER WHEEL
========================================================= */

.team-wheel-area {
    width: 100%;
    margin: 10px 0 30px;
}

.team-wheel-stage {
    position: relative;

    width: 100%;
    min-height: 520px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.team-wheel-wrapper {
    width: 500px;
    height: 500px;

    max-width: 80vw;
    max-height: 80vw;

    display: flex;
    align-items: center;
    justify-content: center;

    position: relative;
}

#teamWheel {
    display: block !important;

    width: 500px;
    height: 500px;

    max-width: 100%;
    max-height: 100%;

    visibility: visible !important;
    opacity: 1 !important;

    transform-origin: center center;

    will-change: transform;

    filter:
        drop-shadow(
            0 12px 25px rgba(99, 102, 241, 0.15)
        );
}


/* =========================================
   POINTER
========================================= */

.team-wheel-pointer {

    position: absolute;

    top: 0;
    left: 50%;

    transform:
        translateX(-50%);

    z-index: 20;

    width: 58px;
    height: 58px;

    border-radius: 50%;

    background: #EF4444;

    border: 5px solid #ffffff;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #ffffff;

    font-size: 25px;

    box-shadow:
        0 8px 22px rgba(239, 68, 68, .30);
}


/* =========================================
   SPINNING EFFECT
========================================= */

#teamWheel.team-wheel-spinning {

    filter:
        drop-shadow(
            0 15px 30px rgba(99, 102, 241, .25)
        );

}


/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 768px) {

    .team-wheel-stage {
        min-height: auto;
        padding: 15px 0;
    }

    .team-wheel-wrapper {

        width: 85vw;
        height: 85vw;

    }

    #teamWheel {

        width: 85vw;
        height: 85vw;

    }

    .team-wheel-pointer {

        width: 48px;
        height: 48px;

        font-size: 20px;

    }

}

/* =========================================================
   TEAM BUILDER - COMPACT DESKTOP DASHBOARD
========================================================= */

#teamMode {
    width: 100%;
}

#teamMode .team-builder-card {

    width: min(1180px, calc(100vw - 40px));

    margin: 0 auto;

    padding: 24px 28px 26px;

    display: grid;

    grid-template-columns:
        minmax(0, 1.45fr)
        minmax(300px, .75fr);

    grid-template-areas:

        "header header"

        "wheel controls"

        "results results";

    column-gap: 32px;

    row-gap: 18px;

    box-sizing: border-box;

}


/* =========================================================
   HEADER
========================================================= */

#teamMode .team-builder-header {

    grid-area: header;

    display: flex;

    align-items: center;

    gap: 14px;

    margin-bottom: 0;

    padding-bottom: 14px;

    border-bottom: 1px solid #e9edf5;

}


#teamMode .team-builder-header h2 {

    margin: 0;

    font-size: 24px;

    line-height: 1.15;

}


#teamMode .team-builder-header p {

    margin: 4px 0 0;

    font-size: 13px;

}


/* =========================================================
   WHEEL COLUMN
========================================================= */

#teamMode .team-wheel-area {

    grid-area: wheel;

    min-width: 0;

    display: flex;

    align-items: center;

    justify-content: center;

}


#teamMode .team-wheel-stage {

    width: 100%;

    height: 500px;

    min-height: 500px;

    display: flex;

    align-items: center;

    justify-content: center;

    position: relative;

}


#teamMode .team-wheel-wrapper {

    width: 470px;

    height: 470px;

    display: flex;

    align-items: center;

    justify-content: center;

    position: relative;

}


#teamMode #teamWheel {

    width: 470px;

    height: 470px;

    max-width: 100%;

    max-height: 100%;

    display: block !important;

    visibility: visible !important;

    opacity: 1 !important;

    transform-origin: center center;

}


/* Pointer */

#teamMode .team-wheel-pointer {

    position: absolute;

    top: 5px;

    left: 50%;

    transform: translateX(-50%);

    z-index: 20;

    width: 50px;

    height: 50px;

    border-radius: 50%;

    background: #ef4444;

    border: 4px solid #fff;

    display: flex;

    align-items: center;

    justify-content: center;

    color: #fff;

    font-size: 21px;

    box-shadow:
        0 7px 20px rgba(239, 68, 68, .28);

}


/* =========================================================
   RIGHT CONTROL COLUMN
========================================================= */

#teamMode .team-control-column {

    grid-area: controls;

    display: flex;

    flex-direction: column;

    justify-content: center;

    gap: 14px;

}


/* =========================================================
   PLAYER COUNT
========================================================= */

#teamMode .team-player-count {

    min-height: 62px;

    padding: 14px 18px;

    border-radius: 14px;

    background: #f7f8fc;

    display: flex;

    align-items: center;

    justify-content: space-between;

    border: 1px solid #eef0f7;

}


#teamMode .team-player-count span {

    font-size: 14px;

    color: #64748b;

}


#teamMode .team-player-count strong {

    font-size: 25px;

    color: #6366f1;

}


/* =========================================================
   TEAM SETTING
========================================================= */

#teamMode .team-setting {

    margin: 0;

}


#teamMode .team-setting label {

    display: block;

    margin-bottom: 7px;

    font-size: 13px;

    font-weight: 600;

    color: #172554;

}


#teamMode .team-setting select {

    width: 100%;

    min-height: 46px;

    border-radius: 10px;

}


/* =========================================================
   BALANCE CHECKBOX
========================================================= */

#teamMode .team-balance-option {

    display: flex;

    align-items: center;

    gap: 9px;

    margin: 0;

    padding: 4px 0;

    font-size: 13px;

}


#teamMode .team-balance-option input {

    width: 18px;

    height: 18px;

    accent-color: #6366f1;

}


/* =========================================================
   CREATE BUTTON
========================================================= */

#teamMode .create-teams-button {

    width: 100%;

    min-height: 48px;

    border: none;

    border-radius: 11px;

    background: #6366f1;

    color: white;

    font-weight: 700;

    font-size: 14px;

    cursor: pointer;

    transition:
        transform .15s ease,
        box-shadow .15s ease;

}


#teamMode .create-teams-button:hover:not(:disabled) {

    transform: translateY(-1px);

    box-shadow:
        0 8px 18px rgba(99, 102, 241, .22);

}


#teamMode .create-teams-button:disabled {

    opacity: .75;

    cursor: not-allowed;

}


/* =========================================================
   SELECTED PLAYER
========================================================= */

#teamMode #currentSelectedPlayer {

    margin-top: 2px;

}


#teamMode #currentAssignedTeam {

    margin-top: -8px;

}


/* =========================================================
   RESULTS
========================================================= */

#teamMode .team-results {

    grid-area: results;

    width: 100%;

    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(180px, 1fr)
        );

    gap: 14px;

    margin-top: 0;

}


/* =========================================================
   TEAM CARDS
========================================================= */

#teamMode .team-card {

    min-height: 110px;

    padding: 14px 16px;

    border-radius: 14px;

    border: 1px solid #e5e7ff;

    background: #fff;

    box-shadow:
        0 5px 15px rgba(30, 41, 59, .05);

}


#teamMode .team-card h4 {

    margin: 0 0 10px;

    font-size: 17px;

    color: #4f46e5;

}


#teamMode .team-members {

    display: flex;

    flex-wrap: wrap;

    gap: 6px;

}


#teamMode .team-member {

    display: inline-flex;

    align-items: center;

    gap: 5px;

    padding: 6px 9px;

    border-radius: 8px;

    background: #f8fafc;

    font-size: 12px;

    color: #334155;

}


/* =========================================================
   PROGRESS
========================================================= */

#teamMode #shuffleProgress {

    margin: 0;

}


/* =========================================================
   COMPACT PROGRESS ELEMENTS
========================================================= */

#teamMode .team-progress {

    margin: 0;

    padding: 10px 14px;

    border-radius: 10px;

    background: #f8f9ff;

}


/* =========================================================
   DESKTOP HEIGHT OPTIMIZATION
========================================================= */

@media (min-width: 992px) {

    #teamMode .team-builder-card {

        min-height: 700px;

    }

}


/* =========================================================
   LAPTOP / SMALL DESKTOP
========================================================= */

@media (min-width: 992px) and (max-width: 1200px) {

    #teamMode .team-builder-card {

        width: min(1080px, calc(100vw - 30px));

        grid-template-columns:
            minmax(0, 1.25fr)
            minmax(280px, .75fr);

        column-gap: 22px;

    }


    #teamMode .team-wheel-stage {

        height: 450px;

        min-height: 450px;

    }


    #teamMode .team-wheel-wrapper {

        width: 420px;

        height: 420px;

    }


    #teamMode #teamWheel {

        width: 420px;

        height: 420px;

    }

}


/* =========================================================
   TABLET / MOBILE
========================================================= */

@media (max-width: 991px) {

    #teamMode .team-builder-card {

        width: calc(100vw - 24px);

        padding: 20px;

        grid-template-columns: 1fr;

        grid-template-areas:

            "header"

            "wheel"

            "controls"

            "results";

        row-gap: 18px;

    }


    #teamMode .team-wheel-stage {

        height: auto;

        min-height: 0;

        padding: 10px 0;

    }


    #teamMode .team-wheel-wrapper {

        width: min(75vw, 460px);

        height: min(75vw, 460px);

    }


    #teamMode #teamWheel {

        width: min(75vw, 460px);

        height: min(75vw, 460px);

    }


    #teamMode .team-wheel-pointer {

        width: 46px;

        height: 46px;

        font-size: 19px;

    }


    #teamMode .team-results {

        grid-template-columns:
            repeat(
                auto-fit,
                minmax(160px, 1fr)
            );

    }

}


/* =========================================================
   VERY SMALL SCREENS
========================================================= */

@media (max-width: 576px) {

    #teamMode .team-builder-card {

        padding: 16px;

    }


    #teamMode .team-builder-header h2 {

        font-size: 21px;

    }


    #teamMode .team-wheel-wrapper,
    #teamMode #teamWheel {

        width: 82vw;

        height: 82vw;

    }


    #teamMode .team-results {

        grid-template-columns: 1fr;

    }

}

/* =========================================================
   TEAM BUILDER - TWO COLUMN GAME LAYOUT
========================================================= */

#teamMode {
    width: 100%;
}

#teamMode .team-builder-card {
    width: min(1180px, calc(100vw - 32px));

    margin: 0 auto;

    padding: 22px 26px 26px;

    background: #ffffff;

    border: 1px solid #e3e8f2;

    border-radius: 24px;

    box-shadow:
        0 12px 35px rgba(30, 41, 59, 0.07);

    box-sizing: border-box;
}


/* =========================================================
   HEADER
========================================================= */

#teamMode .team-builder-header {
    display: flex;

    align-items: center;

    gap: 14px;

    padding-bottom: 15px;

    border-bottom: 1px solid #edf0f6;

    margin-bottom: 18px;
}

#teamMode .team-builder-header h2 {
    margin: 0;

    font-size: 24px;

    line-height: 1.2;

    color: #172554;
}

#teamMode .team-builder-header p {
    margin: 4px 0 0;

    font-size: 13px;

    color: #8a99b2;
}


/* =========================================================
   MAIN TWO-COLUMN LAYOUT
========================================================= */

#teamMode .team-game-layout {
    display: grid;

    grid-template-columns:
        minmax(500px, 1fr)
        minmax(390px, .85fr);

    gap: 26px;

    align-items: stretch;
}


/* =========================================================
   LEFT PLAY COLUMN
========================================================= */

#teamMode .team-play-column {
    display: flex;

    flex-direction: column;

    min-width: 0;

    padding: 4px 8px 0;
}


/* =========================================================
   WHEEL
========================================================= */

#teamMode .team-wheel-area {
    width: 100%;

    margin: 0;
}

#teamMode .team-wheel-stage {
    position: relative;

    height: 400px;

    min-height: 400px;

    display: flex;

    align-items: center;

    justify-content: center;
}

#teamMode .team-wheel-wrapper {
    width: 370px;

    height: 370px;

    display: flex;

    align-items: center;

    justify-content: center;
}

#teamMode #teamWheel {
    width: 370px;

    height: 370px;

    max-width: 100%;

    max-height: 100%;

    display: block !important;

    visibility: visible !important;

    opacity: 1 !important;

    transform-origin: center center;

    filter:
        drop-shadow(
            0 12px 22px rgba(99, 102, 241, .15)
        );
}


/* =========================================================
   POINTER
========================================================= */

#teamMode .team-wheel-pointer {
    position: absolute;

    top: 5px;

    left: 50%;

    transform:
        translateX(-50%);

    z-index: 10;

    width: 48px;

    height: 48px;

    border-radius: 50%;

    background: #ef4444;

    border: 4px solid #ffffff;

    color: #ffffff;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 20px;

    box-shadow:
        0 7px 18px rgba(239, 68, 68, .28);
}


/* =========================================================
   PLAYER COUNT
========================================================= */

#teamMode .team-player-count {
    min-height: 52px;

    padding: 10px 15px;

    margin-bottom: 10px;

    border-radius: 11px;

    background: #f7f8fc;

    border: 1px solid #edf0f6;

    display: flex;

    align-items: center;

    justify-content: space-between;
}

#teamMode .team-player-count span {
    font-size: 13px;

    color: #64748b;
}

#teamMode .team-player-count strong {
    font-size: 22px;

    color: #6366f1;
}


/* =========================================================
   TEAM SETTING
========================================================= */

#teamMode .team-setting {
    margin-bottom: 10px;
}

#teamMode .team-setting label {
    display: block;

    margin-bottom: 5px;

    font-size: 12px;

    font-weight: 700;

    color: #334155;
}

#teamMode .team-setting select {
    width: 100%;

    height: 42px;

    border-radius: 9px;

    border-color: #dfe4ee;
}


/* =========================================================
   BALANCE
========================================================= */

#teamMode .team-balance-option {
    display: flex;

    align-items: center;

    gap: 8px;

    margin: 0 0 10px;

    font-size: 12px;

    color: #475569;
}

#teamMode .team-balance-option input {
    width: 17px;

    height: 17px;

    accent-color: #6366f1;
}


/* =========================================================
   CREATE BUTTON
========================================================= */

#teamMode .create-teams-button {
    width: 100%;

    height: 44px;

    border: none;

    border-radius: 10px;

    background: #6366f1;

    color: #ffffff;

    font-size: 13px;

    font-weight: 700;

    cursor: pointer;

    transition:
        transform .15s ease,
        box-shadow .15s ease;
}

#teamMode .create-teams-button:hover:not(:disabled) {
    transform: translateY(-1px);

    box-shadow:
        0 7px 18px rgba(99, 102, 241, .23);
}


/* =========================================================
   PROGRESS
========================================================= */

#teamMode .team-shuffle-progress {
    margin-top: 13px;

    padding: 11px 13px;

    border-radius: 11px;

    background: #f8f9ff;

    border: 1px solid #edf0ff;
}

#teamMode .team-progress-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 7px;

    font-size: 12px;

    font-weight: 600;

    color: #475569;
}

#teamMode .team-progress-header strong {
    color: #6366f1;
}

#teamMode .team-progress-bar {
    height: 6px;

    overflow: hidden;

    border-radius: 10px;

    background: #e9edff;
}

#teamMode .team-progress-fill {
    width: 0%;

    height: 100%;

    border-radius: inherit;

    background:
        linear-gradient(
            90deg,
            #6366f1,
            #8b5cf6
        );

    transition: width .25s ease;
}


/* =========================================================
   CURRENT SELECTION
========================================================= */

#teamMode .team-current-selection {
    margin-top: 10px;

    padding: 11px 14px;

    text-align: center;

    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            #f5f7ff,
            #faf9ff
        );

    border: 1px solid #dfe4ff;
}

#teamMode .selection-label {
    font-size: 10px;

    letter-spacing: 1px;

    font-weight: 700;

    color: #6366f1;

    margin-bottom: 3px;
}

#teamMode .selected-player {
    font-size: 22px;

    font-weight: 800;

    color: #312e81;
}

#teamMode .assigned-team {
    margin-top: 1px;

    font-size: 12px;

    font-weight: 700;

    color: #16a34a;
}


/* =========================================================
   RIGHT RESULTS COLUMN
========================================================= */

#teamMode .team-results-column {
    min-width: 0;

    padding: 16px;

    border-radius: 18px;

    background: #f8faff;

    border: 1px solid #e7ebf5;

    display: flex;

    flex-direction: column;
}


/* =========================================================
   RESULTS HEADER
========================================================= */

#teamMode .team-results-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    padding-bottom: 12px;

    margin-bottom: 12px;

    border-bottom: 1px solid #e5eaf3;
}

#teamMode .team-results-label {
    font-size: 10px;

    letter-spacing: 1px;

    font-weight: 700;

    color: #6366f1;
}

#teamMode .team-results-header h3 {
    margin: 2px 0 0;

    font-size: 20px;

    color: #172554;
}

#teamMode .team-results-count {
    font-size: 11px;

    color: #64748b;
}

#teamMode .team-results-count span {
    font-weight: 800;

    font-size: 16px;

    color: #6366f1;
}


/* =========================================================
   TEAM RESULTS
========================================================= */

#teamMode .team-results {
    flex: 1;

    display: grid;

    grid-template-columns: 1fr;

    gap: 10px;

    align-content: start;

    overflow-y: auto;

    max-height: 510px;

    padding-right: 3px;
}


/* =========================================================
   TEAM CARD
========================================================= */

#teamMode .team-card {
    padding: 13px 14px;

    border-radius: 12px;

    background: #ffffff;

    border: 1px solid #e3e8f5;

    box-shadow:
        0 4px 12px rgba(30, 41, 59, .04);
}

#teamMode .team-card h4 {
    margin: 0 0 8px;

    font-size: 16px;

    color: #4f46e5;
}

#teamMode .team-members {
    display: flex;

    flex-wrap: wrap;

    gap: 6px;
}

#teamMode .team-member {
    display: inline-flex;

    align-items: center;

    gap: 5px;

    padding: 5px 8px;

    border-radius: 7px;

    background: #f8fafc;

    font-size: 11px;

    color: #334155;
}


/* =========================================================
   MANY TEAMS
   4+ teams use two columns
========================================================= */

#teamMode .team-results:has(.team-card:nth-child(4)) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}


/* =========================================================
   DESKTOP
========================================================= */

@media (min-width: 1200px) {

    #teamMode .team-wheel-stage {
        height: 390px;

        min-height: 390px;
    }

    #teamMode .team-wheel-wrapper,
    #teamMode #teamWheel {
        width: 360px;

        height: 360px;
    }

}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 991px) {

    #teamMode .team-game-layout {
        grid-template-columns: 1fr;
    }

    #teamMode .team-results-column {
        min-height: 300px;
    }

    #teamMode .team-results {
        max-height: none;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 576px) {

    #teamMode .team-builder-card {
        width: calc(100vw - 20px);

        padding: 16px;
    }

    #teamMode .team-wheel-stage {
        height: 330px;

        min-height: 330px;
    }

    #teamMode .team-wheel-wrapper,
    #teamMode #teamWheel {
        width: 300px;

        height: 300px;
    }

    #teamMode .team-results:has(.team-card:nth-child(4)) {
        grid-template-columns: 1fr;
    }

}

/* =========================================================
   TEAM BUILDER - COMPACT SINGLE SCREEN LAYOUT
========================================================= */

#teamMode .team-builder-card {
    width: min(1180px, calc(100vw - 32px));
    margin: 0 auto;

    padding: 20px 24px 22px;

    box-sizing: border-box;
}


/* =========================================================
   HEADER
========================================================= */

#teamMode .team-builder-header {
    padding-bottom: 12px;
    margin-bottom: 14px;
}


/* =========================================================
   MAIN LAYOUT
========================================================= */

#teamMode .team-game-layout {
    display: grid;

    grid-template-columns:
        minmax(480px, 1.05fr)
        minmax(380px, .95fr);

    gap: 22px;

    align-items: start;
}


/* =========================================================
   LEFT SIDE
========================================================= */

#teamMode .team-play-column {
    min-width: 0;

    display: flex;
    flex-direction: column;

    padding: 0 4px;
}


/* =========================================================
   WHEEL
========================================================= */

#teamMode .team-wheel-area {
    margin: 0;
    padding: 0;
}

#teamMode .team-wheel-stage {
    height: 340px;
    min-height: 340px;

    display: flex;

    align-items: center;
    justify-content: center;

    position: relative;
}

#teamMode .team-wheel-wrapper,
#teamMode #teamWheel {
    width: 320px;
    height: 320px;
}

#teamMode #teamWheel {
    display: block !important;

    max-width: 100%;
    max-height: 100%;

    visibility: visible !important;
    opacity: 1 !important;

    transform-origin: center center;
}


/* =========================================================
   POINTER
========================================================= */

#teamMode .team-wheel-pointer {
    top: 0;

    width: 44px;
    height: 44px;

    font-size: 18px;
}


/* =========================================================
   PLAYER COUNT
========================================================= */

#teamMode .team-player-count {
    min-height: 44px;

    padding: 7px 13px;

    margin: 0 0 7px;

    border-radius: 9px;
}

#teamMode .team-player-count strong {
    font-size: 20px;
}


/* =========================================================
   NUMBER OF TEAMS
========================================================= */

#teamMode .team-setting {
    margin-bottom: 7px;
}

#teamMode .team-setting label {
    margin-bottom: 4px;
    font-size: 11px;
}

#teamMode .team-setting select {
    height: 38px;
    min-height: 38px;

    border-radius: 8px;

    font-size: 13px;
}


/* =========================================================
   BALANCE
========================================================= */

#teamMode .team-balance-option {
    margin: 0 0 7px;

    font-size: 11px;

    gap: 7px;
}


/* =========================================================
   CREATE BUTTON
========================================================= */

#teamMode .create-teams-button {
    height: 40px;
    min-height: 40px;

    border-radius: 8px;

    font-size: 12px;
}


/* =========================================================
   PROGRESS
========================================================= */

#teamMode .team-shuffle-progress {
    margin-top: 8px;

    padding: 8px 11px;

    border-radius: 9px;
}

#teamMode .team-progress-header {
    margin-bottom: 5px;

    font-size: 11px;
}

#teamMode .team-progress-bar {
    height: 5px;
}


/* =========================================================
   CURRENT SELECTION
========================================================= */

#teamMode .team-current-selection {
    margin-top: 7px;

    padding: 8px 12px;

    border-radius: 9px;
}

#teamMode .selection-label {
    font-size: 9px;

    margin-bottom: 2px;
}

#teamMode .selected-player {
    font-size: 18px;
}

#teamMode .assigned-team {
    font-size: 11px;
}


/* =========================================================
   RIGHT SIDE - RESULTS
========================================================= */

#teamMode .team-results-column {
    width: 100%;
    box-sizing: border-box;

    padding: 18px;

    /*
     * IMPORTANT:
     * Do NOT stretch this column to the
     * height of the wheel column.
     */
    height: auto;
    min-height: 0;

    border-radius: 15px;

    background: #f8faff;
}


/* =========================================================
   RESULTS HEADER
========================================================= */

#teamMode .team-results-header {
    padding-bottom: 9px;

    margin-bottom: 9px;
}

#teamMode .team-results-header h3 {
    font-size: 18px;
}


/* =========================================================
   TEAM RESULTS
========================================================= */

#teamMode .team-results {
    display: grid;

    grid-template-columns: 1fr;

    gap: 8px;

    /*
     * Remove the artificial tall area.
     */
    height: auto;
    max-height: none;

    overflow: visible;

    align-content: start;
}


/* =========================================================
   TEAM CARD
========================================================= */

#teamMode .team-card {
    min-height: 0;

    padding: 13px 15px;

    border-radius: 11px;

    box-shadow:
        0 2px 8px rgba(30, 41, 59, .04);
}

#teamMode .team-card h4 {
    margin: 0 0 6px;

    font-size: 14px;
}

#teamMode .team-members {
    gap: 5px;
}

#teamMode .team-member {
    padding: 6px 9px;

    border-radius: 7px;

    font-size: 11px;
}


/* =========================================================
   4+ TEAMS
========================================================= */

#teamMode .team-results:has(.team-card:nth-child(4)) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}


/* =========================================================
   LARGE DESKTOP
========================================================= */

@media (min-width: 1200px) {

    #teamMode .team-game-layout {
        grid-template-columns:
            minmax(500px, 1.08fr)
            minmax(400px, .92fr);
    }

    #teamMode .team-wheel-stage {
        height: 350px;
        min-height: 350px;
    }

    #teamMode .team-wheel-wrapper,
    #teamMode #teamWheel {
        width: 330px;
        height: 330px;
    }

}


/* =========================================================
   LAPTOP
========================================================= */

@media (min-width: 992px) and (max-width: 1199px) {

    #teamMode .team-game-layout {
    display: grid;

    grid-template-columns:
        minmax(420px, .82fr)
        minmax(500px, 1.18fr);

    gap: 24px;

    align-items: start;
}

    #teamMode .team-wheel-stage {
        height: 320px;
        min-height: 320px;
    }

    #teamMode .team-wheel-wrapper,
    #teamMode #teamWheel {
        width: 300px;
        height: 300px;
    }

}


/* =========================================================
   TABLET / MOBILE
========================================================= */

@media (max-width: 991px) {

    #teamMode .team-game-layout {
        grid-template-columns: 1fr;
    }

    #teamMode .team-wheel-stage {
        height: 360px;
        min-height: 360px;
    }

    #teamMode .team-wheel-wrapper,
    #teamMode #teamWheel {
        width: 320px;
        height: 320px;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 576px) {

    #teamMode .team-builder-card {
        width: calc(100vw - 16px);
        padding: 14px;
    }

    #teamMode .team-wheel-stage {
        height: 300px;
        min-height: 300px;
    }

    #teamMode .team-wheel-wrapper,
    #teamMode #teamWheel {
        width: 270px;
        height: 270px;
    }

    #teamMode .team-results:has(.team-card:nth-child(4)) {
        grid-template-columns: 1fr;
    }

}