/* ═══════════════════════════════════════════
   Dart Seed — Custom Styles
   Supplements Tailwind for bracket-specific UI
   ═══════════════════════════════════════════ */

/* ── Cast button ─────────────────────────── */
.cast-btn { cursor: pointer; background: transparent; }
.cast-btn.cast-available { color: #818cf8; border-color: rgba(129,140,248,.35); }
.cast-btn.cast-available:hover { color: #a5b4fc; border-color: rgba(165,180,252,.5); }
.cast-btn.cast-active { color: #4ade80; border-color: rgba(74,222,128,.4); animation: castPulse 2s ease-in-out infinite; }
@keyframes castPulse {
    0%,100% { opacity: 1; } 50% { opacity: .55; }
}

@keyframes castToastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(8px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Smooth page transitions */
main {
    animation: fadeIn 0.3s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Color swatch selector */
.color-swatch {
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}
.color-swatch:hover {
    transform: scale(1.05);
}
.color-swatch.selected {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    transform: scale(1.05);
}
.color-swatch input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Bracket horizontal scroll */
.bracket-scroll {
    overflow-x: auto;
    padding-bottom: 1rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.bracket-scroll::-webkit-scrollbar {
    height: 6px;
}
.bracket-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.bracket-scroll::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}

/* Match card interactions */
.match-player-slot {
    transition: background 0.15s ease;
}
.match-player-slot.clickable:hover {
    background: rgba(59, 130, 246, 0.08);
}
.match-player-slot.is-winner {
    background: rgba(34, 197, 94, 0.08);
}

/* ─── Bracket Connector Lines ─── */
/* Each round column is a fixed-width relative container */
.bracket-round-col {
    position: relative;
    flex-shrink: 0;
    width: 220px;
}

/* Match wrapper is absolutely positioned within the column */
.bracket-match-wrap {
    position: absolute;
    left: 12px;
    right: 12px;
}

/* Right-side horizontal stub leading to the vertical connector */
.bracket-match-wrap.has-right-connector::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -12px;
    width: 12px;
    height: 2px;
    background: rgba(255,255,255,0.12);
}

/* Left-side horizontal stub coming from previous column */
.bracket-match-wrap.has-left-connector::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -12px;
    width: 12px;
    height: 2px;
    background: rgba(255,255,255,0.12);
}

/* Vertical connector bar between rounds — absolutely positioned in the gap */
.bracket-vert-connector {
    position: absolute;
    width: 2px;
    background: rgba(255,255,255,0.12);
    right: 0;          /* sits at the right edge of the column, in the 12px gap */
    transform: translateX(1px);
}

/* Modal */
.modal-overlay {
    display: none;
    animation: modalFadeIn 0.2s ease-out;
}
.modal-overlay.active {
    display: flex;
}
@keyframes modalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Pulsing live badge */
@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.5; }
}
.live-pulse {
    animation: livePulse 2s ease-in-out infinite;
}

/* TV View specific */
.tv-glow {
    animation: glowText 2s ease-in-out infinite alternate;
}
@keyframes glowText {
    from { text-shadow: 0 0 10px var(--win), 0 0 20px var(--win); }
    to   { text-shadow: 0 0 20px var(--win), 0 0 40px var(--win), 0 0 60px var(--win); }
}

/* Form focus rings */
input:focus, select:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

/* Staggered card animations */
.stagger-item {
    opacity: 0;
    animation: staggerIn 0.4s ease-out forwards;
}
@keyframes staggerIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
