.volleyball-page {
    background:
        radial-gradient(circle at top left, rgba(255, 126, 95, 0.14), transparent 28%),
        radial-gradient(circle at top right, rgba(0, 113, 227, 0.14), transparent 32%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 248, 251, 0.98));
}

.volleyball-header {
    position: sticky;
    top: 0;
    background: #ffffff;
    border-bottom: 1px solid #d2d2d7;
}

.volleyball-header-content {
    gap: 16px;
}

.volleyball-header-left {
    gap: 12px;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 12px;
    color: #ff6b00;
    margin-bottom: 8px;
    font-weight: 700;
}

.login-shell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-status {
    font-size: 14px;
    color: var(--secondary-text);
}

.login-panel {
    margin-top: 18px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(210, 210, 215, 0.9);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.hidden {
    display: none !important;
}

.login-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto auto;
    gap: 14px;
    align-items: end;
}

.login-form label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    color: var(--secondary-text);
}

.login-form input {
    border: 1px solid rgba(210, 210, 215, 0.95);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    padding: 12px 14px;
    font: inherit;
    color: var(--text-color);
}

.login-form input:focus {
    outline: none;
    border-color: #0071e3;
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12);
}

.primary-button,
.ghost-button {
    border-radius: 999px;
    padding: 12px 18px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.primary-button {
    border: none;
    color: #ffffff;
    background: linear-gradient(135deg, #0071e3, #23a6d5);
    box-shadow: 0 14px 30px rgba(0, 113, 227, 0.22);
}

.ghost-button {
    background: transparent;
    border: 1px solid rgba(210, 210, 215, 0.95);
    color: var(--text-color);
}

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-1px);
}

.hint-text {
    color: var(--secondary-text);
    font-size: 13px;
    margin-top: 12px;
}

.hero-band {
    padding: 36px 0 10px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.95fr);
    gap: 24px;
}

.card-panel {
    border-radius: 28px;
    border: 1px solid rgba(210, 210, 215, 0.95);
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.07);
}

.hero-copy {
    padding: 32px;
}

.hero-copy h2 {
    font-size: 38px;
    line-height: 1.08;
    margin-bottom: 16px;
}

.hero-summary {
    font-size: 18px;
    color: #334155;
    max-width: 42rem;
}

.meta-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 28px;
}

.meta-row > div,
.turn-card > div {
    background: rgba(248, 250, 252, 0.95);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 18px;
    padding: 14px 16px;
}

.meta-label {
    display: block;
    color: var(--secondary-text);
    font-size: 12px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.rule-card {
    padding: 26px;
}

.rule-card-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.rule-card-header h3,
.section-heading h2 {
    font-size: 28px;
    margin: 0;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(255, 107, 0, 0.14);
    color: #c2410c;
    font-size: 13px;
    font-weight: 700;
}

.rule-list {
    padding-left: 20px;
    color: #334155;
    line-height: 1.8;
}

.control-strip {
    margin-top: 18px;
}

.admin-bar {
    margin-top: 14px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.admin-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-order-hint {
    margin: 0;
    color: var(--secondary-text);
    font-size: 13px;
}

.admin-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.download-bar {
    margin-top: 14px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.download-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.turn-card {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    padding: 16px;
}

.captains-section,
.players-section {
    padding-top: 34px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: end;
    margin-bottom: 18px;
}

.captain-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.captain-card {
    padding: 14px;
    position: relative;
    overflow: hidden;
}

.captain-card.is-sortable {
    cursor: grab;
}

.captain-card.is-sortable .draft-badge {
    background: rgba(0, 113, 227, 0.1);
    color: #005bb5;
}

.captain-card.is-dragging {
    opacity: 0.58;
    cursor: grabbing;
}

.captain-card.is-drop-target {
    border-color: rgba(0, 113, 227, 0.55);
    box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.18), 0 18px 34px rgba(0, 113, 227, 0.14);
}

.captain-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 6px;
    background: var(--captain-color, #0071e3);
}

.captain-card.is-active {
    border-color: rgba(0, 113, 227, 0.45);
    box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.22), 0 18px 34px rgba(0, 113, 227, 0.22), 0 0 28px rgba(0, 113, 227, 0.2);
}

.captain-card.is-me {
    transform: translateY(-6px);
}

.captain-card.is-active::after {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 22px;
    box-shadow: inset 0 0 0 1px rgba(0, 113, 227, 0.18), 0 0 24px rgba(0, 113, 227, 0.16);
    pointer-events: none;
}

.captain-header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
}

.captain-name {
    font-size: 18px;
    font-weight: 700;
}

.captain-role {
    color: var(--secondary-text);
    font-size: 12px;
    margin-top: 4px;
}

.draft-badge {
    border-radius: 14px;
    padding: 6px 10px;
    background: rgba(15, 23, 42, 0.06);
    font-size: 12px;
    font-weight: 700;
}

.captain-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.mini-pill {
    border-radius: 999px;
    padding: 5px 9px;
    background: rgba(15, 23, 42, 0.05);
    color: #334155;
    font-size: 11px;
    font-weight: 700;
}

.captain-player-list {
    margin-top: 14px;
    min-height: 64px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-content: flex-start;
}

.empty-slot {
    color: var(--secondary-text);
    font-size: 14px;
}

.players-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: end;
    margin-bottom: 18px;
}

.players-toolbar-inline {
    align-items: center;
    flex-wrap: nowrap;
}

.players-toolbar-copy {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0;
}

.players-toolbar-copy .eyebrow {
    margin-bottom: 0;
    white-space: nowrap;
}

.players-toolbar-copy h2 {
    font-size: 28px;
    margin: 0;
    white-space: nowrap;
}

.toolbar-hint {
    margin-top: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.players-toolbar-inline .legend-row {
    flex: 0 0 auto;
    white-space: nowrap;
}

.legend-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    color: var(--secondary-text);
    font-size: 13px;
}

.legend-item {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.legend-dot.available {
    background: #94a3b8;
}

.legend-dot.picked {
    background: #ff6b00;
}

.legend-dot.mine {
    background: #0071e3;
}

.player-pool {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
    gap: 14px;
    padding-bottom: 40px;
}

.player-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(210, 210, 215, 0.95);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    padding: 14px 18px;
    width: 100%;
    min-height: 92px;
    min-width: 0;
    text-align: center;
    color: var(--text-color);
    cursor: default;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.player-chip strong {
    display: block;
    font-size: 18px;
    margin-bottom: 4px;
}

.player-chip span {
    font-size: 12px;
    color: var(--secondary-text);
    line-height: 1.35;
}

.player-chip.is-pickable {
    cursor: pointer;
    border-color: rgba(0, 113, 227, 0.5);
    box-shadow: 0 0 0 1px rgba(0, 113, 227, 0.22), 0 16px 26px rgba(0, 113, 227, 0.18), 0 0 22px rgba(0, 113, 227, 0.16);
}

.player-chip.is-pickable:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 0 0 1px rgba(0, 113, 227, 0.28), 0 18px 28px rgba(0, 113, 227, 0.22), 0 0 28px rgba(0, 113, 227, 0.22);
}

.player-chip.is-picked {
    opacity: 0.72;
    border-color: transparent;
    color: #ffffff;
    box-shadow: none;
}

.roster-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    border-radius: 999px;
    padding: 6px 10px;
    color: #ffffff;
    font-weight: 700;
    font-size: 12px;
    white-space: nowrap;
}

.toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 20;
    min-width: 220px;
    max-width: 360px;
    border-radius: 18px;
    padding: 14px 16px;
    background: rgba(15, 23, 42, 0.9);
    color: #ffffff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.28);
}

@media (prefers-color-scheme: dark) {
    .volleyball-page {
        background:
            radial-gradient(circle at top left, rgba(255, 126, 95, 0.2), transparent 28%),
            radial-gradient(circle at top right, rgba(0, 113, 227, 0.18), transparent 32%),
            linear-gradient(180deg, rgba(19, 24, 35, 0.98), rgba(13, 17, 27, 1));
    }

    .volleyball-header {
        background: #111928;
        border-color: rgba(71, 85, 105, 0.9);
    }

    .login-panel,
    .card-panel,
    .player-chip,
    .meta-row > div,
    .turn-card > div {
        background: rgba(17, 25, 40, 0.82);
        border-color: rgba(71, 85, 105, 0.7);
    }

    .hero-summary,
    .rule-list,
    .mini-pill {
        color: #d6deeb;
    }

    .ghost-button,
    .login-form input {
        background: rgba(15, 23, 42, 0.72);
        border-color: rgba(71, 85, 105, 0.8);
        color: #f5f5f7;
    }

    .draft-badge,
    .mini-pill {
        background: rgba(148, 163, 184, 0.14);
    }

    .player-chip.is-picked span,
    .roster-pill span {
        color: rgba(255, 255, 255, 0.78);
    }
}

@media (max-width: 980px) {
    .hero-grid,
    .turn-card {
        grid-template-columns: 1fr;
    }

    .players-toolbar,
    .section-heading,
    .rule-card-header,
    .captain-header,
    .volleyball-header-content,
    .admin-bar,
    .download-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .players-toolbar-inline {
        flex-wrap: wrap;
    }

    .players-toolbar-copy {
        flex-wrap: wrap;
    }

    .toolbar-hint {
        white-space: normal;
        overflow: visible;
    }

    .login-form {
        grid-template-columns: 1fr;
    }

    .login-shell {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 960px) {
    .captain-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .hero-copy,
    .rule-card,
    .captain-card {
        padding: 16px;
    }

    .hero-copy h2 {
        font-size: 30px;
    }

    .section-heading h2,
    .rule-card-header h3,
    .captain-name {
        font-size: 20px;
    }

    .meta-row {
        grid-template-columns: 1fr;
    }

    .captain-grid {
        grid-template-columns: 1fr;
    }

    .player-chip {
        width: 100%;
    }
}