/* Sports tools — aligned with Tooliak brand (#2563eb / #3b82f6) */

.gp-tool-wrap,
.wof-tool-wrap {
    --tl-primary: #2563eb;
    --tl-primary-light: #3b82f6;
    --tl-primary-dark: #1e40af;
    --tl-accent: #0ea5e9;
    --tl-primary-soft: #eff6ff;
    --tl-primary-border: #bfdbfe;
    --tl-gradient: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
    --tl-gradient-hero: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
    --tl-shadow: 0 4px 24px rgba(37, 99, 235, 0.08);
    --tl-radius: 1.25rem;
}

/* ── Shared buttons ── */
.sport-tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    background: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    color: #374151;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.15s, color 0.15s;
}
.sport-tool-btn:hover {
    background: var(--tl-primary-soft);
    border-color: var(--tl-primary-border);
    color: var(--tl-primary-dark);
    transform: translateY(-1px);
}
.sport-tool-btn--primary { border-color: var(--tl-primary-border); color: var(--tl-primary); }
.sport-tool-btn--primary:hover { background: var(--tl-primary-soft); }
.sport-tool-btn--muted { color: #6b7280; }
.sport-tool-btn--muted:hover { color: #374151; background: #f9fafb; border-color: #e5e7eb; }
.sport-tool-btn--full { width: 100%; }

/* ── Chips ── */
.sport-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    animation: sportChipIn 0.2s ease-out;
    max-width: 100%;
}
@keyframes sportChipIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}
.sport-chip--blue,
.sport-chip--emerald,
.sport-chip--violet,
.sport-chip--rose {
    background: var(--tl-primary-soft);
    border: 1px solid var(--tl-primary-border);
    color: var(--tl-primary-dark);
}
.sport-chip--blue .sport-chip-num,
.sport-chip--emerald .sport-chip-num,
.sport-chip--violet .sport-chip-num,
.sport-chip--rose .sport-chip-num {
    background: var(--tl-gradient);
}
.sport-chip--blue .sport-chip-remove,
.sport-chip--emerald .sport-chip-remove,
.sport-chip--violet .sport-chip-remove,
.sport-chip--rose .sport-chip-remove {
    color: var(--tl-primary);
}
.sport-chip-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 9999px;
    color: #fff;
    font-size: 0.7rem;
    flex-shrink: 0;
}
.sport-chip-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: min(12rem, 45vw);
}
.sport-chip-remove {
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 0 0.15rem;
    font-size: 1.1rem;
    line-height: 1;
    flex-shrink: 0;
}
.sport-chip-remove:hover { color: #dc2626 !important; }

/* ── Participant entry ── */
.sport-participant-entry { width: 100%; min-width: 0; }
.sport-pe-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 1rem;
}
.sport-pe-input-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.sport-pe-input {
    flex: 1;
    width: 100%;
    min-width: 0;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    background: #fff;
    font-size: 0.875rem;
    font-weight: 500;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.sport-pe-input:focus {
    outline: none;
    border-color: var(--tl-primary-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.sport-pe-btn-add {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.sport-pe-hint {
    font-size: 0.75rem;
    color: #9ca3af;
    margin: 0 0 0.75rem;
}
.sport-pe-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 3.5rem;
    padding: 0.75rem;
    border-radius: 0.75rem;
    border: 1px dashed #dbeafe;
    background: #fff;
    margin-bottom: 0.75rem;
}
.sport-pe-empty {
    font-size: 0.875rem;
    color: #9ca3af;
    align-self: center;
    width: 100%;
    text-align: center;
    padding: 0.5rem;
}
.sport-pe-empty.hidden { display: none; }
.sport-pe-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.sport-pe-count {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0 0 0.75rem;
}
.sport-pe-bulk {
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    background: #fff;
    overflow: hidden;
}
.sport-pe-bulk summary {
    cursor: pointer;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #374151;
    list-style: none;
}
.sport-pe-bulk summary::-webkit-details-marker { display: none; }
.sport-pe-bulk-body {
    padding: 0 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.sport-pe-bulk textarea {
    width: 100%;
    min-height: 5rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    font-size: 0.875rem;
    line-height: 1.5;
    resize: vertical;
}
.sport-pe-bulk textarea:focus {
    outline: none;
    border-color: var(--tl-primary-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

@media (min-width: 480px) {
    .sport-pe-input-row { flex-direction: row; align-items: stretch; }
    .sport-pe-btn-add { width: auto; padding-left: 1.5rem; padding-right: 1.5rem; }
}

/* ── Layout ── */
.sport-panel,
.wof-panel {
    background: #fafafa;
    border: 1px solid #f3f4f6;
    border-radius: var(--tl-radius);
    padding: 1rem;
    min-width: 0;
}
@media (min-width: 640px) {
    .sport-panel, .wof-panel { padding: 1.25rem; }
}

.sport-settings-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 1rem;
}
.sport-settings-card__title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.75rem;
}
.sport-settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid #f3f4f6;
}
.sport-settings-row:last-child { border-bottom: none; }
.sport-settings-row__label { font-size: 0.875rem; color: #374151; }
.sport-settings-check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem 0;
    cursor: pointer;
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.45;
}
.sport-settings-check input {
    margin-top: 0.2rem;
    flex-shrink: 0;
    accent-color: var(--tl-primary);
}

.sport-counter { display: inline-flex; align-items: center; gap: 0.35rem; }
.sport-counter__btn {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    background: #fff;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    color: var(--tl-primary);
    transition: background 0.15s, border-color 0.15s;
}
.sport-counter__btn:hover { background: var(--tl-primary-soft); border-color: var(--tl-primary-border); }
.sport-counter__input {
    width: 3.5rem;
    text-align: center;
    padding: 0.35rem 0.25rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    font-weight: 700;
    color: var(--tl-primary-dark);
}

.sport-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
}
.sport-workspace__side .sport-settings-card + .sport-actions { margin-top: 1rem; }

.sport-btn-primary {
    width: 100%;
    padding: 0.85rem 1.25rem;
    border: none;
    border-radius: 0.85rem;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--tl-gradient);
    color: #fff;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}
.sport-btn-primary:hover {
    filter: brightness(1.05);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}
.sport-btn-outline {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    background: #fff;
    border: 2px solid var(--tl-primary-border);
    color: var(--tl-primary);
    transition: background 0.15s;
}
.sport-btn-outline:hover { background: var(--tl-primary-soft); }
.sport-btn-outline--muted {
    border-color: #e5e7eb;
    color: #4b5563;
}
.sport-btn-outline--muted:hover { background: #f9fafb; }

.sport-workspace {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1.25rem;
}
.sport-workspace__cols {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
@media (min-width: 900px) {
    .sport-workspace__cols {
        flex-direction: row;
        align-items: flex-start;
        gap: 1.25rem;
    }
    .sport-workspace__main { flex: 1 1 60%; min-width: 0; }
    .sport-workspace__side { flex: 0 0 300px; width: 300px; max-width: 100%; }
}

/* ── Shared tool shell ── */
.gp-tool-wrap,
.wof-tool-wrap {
    background: #fff;
    border-radius: var(--tl-radius);
    overflow: hidden;
    box-shadow: var(--tl-shadow);
    margin-bottom: 2rem;
}

.tl-tool-hero {
    background: var(--tl-gradient-hero);
    padding: 1.25rem 1rem;
    color: #fff;
    position: relative;
    overflow: hidden;
}
@media (min-width: 640px) { .tl-tool-hero { padding: 1.5rem 1.75rem; } }
.tl-tool-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.18) 0%, transparent 55%);
    pointer-events: none;
}
.tl-tool-hero h2,
.tl-tool-hero p,
.tl-tool-hero .tl-badge-row { position: relative; z-index: 1; }
.tl-tool-hero h2 { font-size: 1.25rem; font-weight: 800; margin: 0; }
@media (min-width: 640px) { .tl-tool-hero h2 { font-size: 1.5rem; } }
.tl-tool-hero p { opacity: 0.95; margin: 0.35rem 0 0; font-size: 0.875rem; }
.tl-badge-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.85rem; }
.tl-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(4px);
}

.gp-body,
.wof-body { padding: 1rem; }
@media (min-width: 640px) { .gp-body, .wof-body { padding: 1.5rem 1.75rem; } }

/* ── Giveaway slot machine ── */
.gp-slot-machine-wrap {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    border-radius: var(--tl-radius);
    padding: 1.25rem 0.75rem 1.5rem;
    border: 1px solid #334155;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    position: relative;
}
.gp-slot-machine-wrap::before {
    content: 'GIVEAWAY';
    position: absolute;
    top: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.25em;
    color: rgba(147, 197, 253, 0.55);
}
.gp-slot-machine {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    max-width: 420px;
    margin: 1.25rem auto 0;
    width: 100%;
}
.gp-reel {
    flex: 1;
    min-width: 0;
    background: #0f172a;
    border: 2px solid var(--tl-primary-light);
    border-radius: 0.75rem;
    padding: 0.75rem 0.35rem;
    min-height: 4.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 4px 16px rgba(0, 0, 0, 0.6), 0 0 16px rgba(59, 130, 246, 0.2);
    overflow: hidden;
    position: relative;
}
@media (min-width: 480px) {
    .gp-reel { padding: 1rem 0.5rem; min-height: 5rem; }
}
.gp-reel::before,
.gp-reel::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 28%;
    pointer-events: none;
    z-index: 2;
}
.gp-reel::before { top: 0; background: linear-gradient(to bottom, #0f172a, transparent); }
.gp-reel::after { bottom: 0; background: linear-gradient(to top, #0f172a, transparent); }
.gp-reel-text {
    font-size: clamp(0.85rem, 3.5vw, 1.25rem);
    font-weight: 800;
    color: #93c5fd;
    text-align: center;
    text-shadow: 0 0 12px rgba(59, 130, 246, 0.45);
    line-height: 1.3;
    word-break: break-word;
    z-index: 1;
}
.gp-reel-text.gp-reel-spinning {
    animation: gpReelShake 0.1s ease-in-out infinite alternate;
}
@keyframes gpReelShake {
    from { transform: translateY(-2px); }
    to { transform: translateY(2px); }
}

.gp-start-btn { /* extends sport-btn-primary */ }
.gp-btn-outline-primary { border-color: var(--tl-primary-border); color: var(--tl-primary); }
.gp-btn-outline-primary:hover { background: var(--tl-primary-soft); }

.gp-winner-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--tl-primary-soft);
    border: 1px solid var(--tl-primary-border);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
}
.gp-winner-rank {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background: var(--tl-gradient);
    color: #fff;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
.gp-results-block { margin-top: 1.5rem; }
.gp-results-block__title {
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.gp-results-block__title .fa-trophy { color: #f59e0b; }
.gp-history-list {
    max-height: 12rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

/* ── Wheel of Fortune ── */
.wof-arena {
    background: linear-gradient(180deg, var(--tl-primary-soft) 0%, #dbeafe 100%);
    border-radius: var(--tl-radius);
    padding: 1.5rem 0.75rem 1.25rem;
    margin-bottom: 1.25rem;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--tl-primary-border);
    display: flex;
    flex-direction: column;
    align-items: center;
}
.wof-arena-glow {
    position: absolute;
    width: min(320px, 85vw);
    height: min(320px, 85vw);
    background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.wof-wheel-mount {
    position: relative;
    width: 100%;
    max-width: 340px;
    display: flex;
    justify-content: center;
}
.wof-pointer {
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    filter: drop-shadow(0 2px 4px rgba(37, 99, 235, 0.35));
}
.wof-pointer polygon { fill: var(--tl-primary); }
.wof-wheel-ring {
    display: inline-block;
    padding: 6px;
    border-radius: 50%;
    background: var(--tl-gradient);
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.25);
}
.wof-wheel-inner {
    background: #fff;
    border-radius: 50%;
    padding: 4px;
}
#wof-canvas {
    display: block;
    max-width: min(calc(100vw - 3rem), 340px);
    width: 100%;
    height: auto;
    border-radius: 50%;
}
.wof-spin-btn {
    margin-top: 1.25rem;
    padding: 0.9rem 2.25rem;
    border: none;
    border-radius: 0.85rem;
    font-size: 1.0625rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--tl-gradient);
    color: #fff;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
    max-width: 100%;
}
.wof-spin-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(37, 99, 235, 0.4);
}
.wof-spin-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.wof-winner-spotlight {
    margin-top: 1rem;
    padding: 0.6rem 1.1rem;
    border-radius: 9999px;
    background: #fff;
    border: 1px solid var(--tl-primary-border);
    color: #475569;
    font-size: 0.8125rem;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem 0.5rem;
    max-width: 100%;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}
.wof-winner-spotlight strong {
    color: var(--tl-primary);
    font-size: 0.9375rem;
    font-weight: 800;
}
.wof-spotlight-sep { color: #cbd5e1; }

/* ── Winner modal ── */
.wof-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.wof-modal.tool-hidden { display: none; }
.wof-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.wof-modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 22rem;
    animation: wofModalIn 0.35s cubic-bezier(0.34, 1.2, 0.64, 1);
}
@keyframes wofModalIn {
    from { opacity: 0; transform: scale(0.92) translateY(16px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.wof-winner-modal-card {
    background: #fff;
    border-radius: 1.25rem;
    padding: 2rem 1.5rem 1.5rem;
    text-align: center;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.2), 0 0 0 1px rgba(37, 99, 235, 0.08);
    overflow: hidden;
    position: relative;
}
.wof-winner-modal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--tl-gradient);
}
.wof-modal-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: var(--tl-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}
.wof-modal-label {
    font-size: 1rem;
    font-weight: 700;
    color: #374151;
    margin: 0 0 0.5rem;
}
.wof-modal-winner {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--tl-primary);
    margin: 0 0 1.5rem;
    line-height: 1.35;
    word-break: break-word;
}
@media (min-width: 480px) {
    .wof-modal-winner { font-size: 2rem; }
}
.wof-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.wof-modal-btn-primary {
    width: 100%;
    padding: 0.85rem 1.25rem;
    border: none;
    border-radius: 0.85rem;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    background: var(--tl-gradient);
    color: #fff;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
    transition: transform 0.15s, box-shadow 0.15s;
}
.wof-modal-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}
.wof-modal-close {
    width: 100%;
    padding: 0.75rem 1.25rem;
    border-radius: 0.85rem;
    border: 2px solid #e5e7eb;
    background: #fff;
    font-weight: 700;
    font-size: 0.9375rem;
    color: #4b5563;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.wof-modal-close:hover { background: #f9fafb; border-color: #d1d5db; }

@media (max-width: 899px) {
    .wof-arena { margin-bottom: 1rem; }
    .sport-workspace__side { width: 100%; }
}
