/* ==========================================================================
   DARTSCORE VIRTUAL MINI-BOARD (BOTTOM-LEFT BROADCAST OVERLAY)
   High-precision SVG Dartboard with Live Impact Telemetry & Animated Pins
   ========================================================================== */

.darts-miniboard-card {
    position: fixed;
    bottom: 25px;
    left: 25px;
    width: 220px;
    background: rgba(12, 16, 14, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    padding: 10px 10px 8px 10px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.8), 0 0 1px 1px rgba(255, 255, 255, 0.1);
    z-index: 99995;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, width 0.25s ease;
    user-select: none;
    pointer-events: auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.darts-miniboard-card:hover {
    border-color: rgba(218, 11, 11, 0.5);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 15px rgba(218, 11, 11, 0.2);
}

.darts-miniboard-card.inline {
    position: relative !important;
    inset: auto !important;
    bottom: auto !important;
    left: auto !important;
    top: auto !important;
    right: auto !important;
    margin: 0 auto;
    z-index: 10;
}

.darts-miniboard-card.is-dragging {
    cursor: grabbing !important;
    user-select: none;
    transition: none !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.95), 0 0 20px rgba(255, 215, 0, 0.4) !important;
}

/* Header bar */
.darts-miniboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    padding: 0 2px;
    cursor: grab;
}

.darts-miniboard-header:active {
    cursor: grabbing;
}

.darts-miniboard-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: #ffd700;
    text-transform: uppercase;
}

.darts-miniboard-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00ff88;
    box-shadow: 0 0 8px #00ff88;
    animation: miniboardPulse 1.5s infinite;
}

@keyframes miniboardPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

.darts-miniboard-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.darts-miniboard-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #aaa;
    border-radius: 4px;
    padding: 2px 5px;
    font-size: 0.65rem;
    cursor: pointer;
    line-height: 1;
    transition: all 0.15s ease;
}

.darts-miniboard-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

/* SVG Board Container */
.darts-miniboard-board-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, #181d19 0%, #0d100e 85%, #050605 100%);
    border-radius: 50%;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8), 0 4px 15px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.darts-miniboard-svg {
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.5));
}

/* SVG Dartboard Colors */
.dboard-double-treble-red { fill: #d91b24; }
.dboard-double-treble-green { fill: #009944; }
.dboard-single-black { fill: #1c1c1c; }
.dboard-single-white { fill: #f3ecdb; }
.dboard-bull-50 { fill: #d91b24; }
.dboard-bull-25 { fill: #009944; }
.dboard-spider-wire { stroke: #d0d5dd; stroke-width: 0.75; stroke-linecap: round; }
.dboard-number-ring { fill: #111412; }
.dboard-number-text { fill: #eaeaea; font-family: 'JetBrains Mono', 'Segoe UI', monospace; font-weight: 800; font-size: 13px; text-anchor: middle; dominant-baseline: central; }

/* Segment highlight pulse */
.dboard-segment-highlight {
    animation: segmentFlash 0.6s ease-out;
}

@keyframes segmentFlash {
    0% { filter: brightness(2.2) drop-shadow(0 0 8px #ffd700); }
    100% { filter: brightness(1) drop-shadow(0 0 0 transparent); }
}

/* Dart Pins Overlay */
.darts-miniboard-pins-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* Single Dart Pin Element */
.dart-pin {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.dart-pin-head {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fff 0%, #ffd700 40%, #ff8800 100%);
    box-shadow: 0 0 10px #ffd700, 0 0 4px #fff, inset 0 0 2px rgba(0,0,0,0.4);
    border: 1.5px solid #fff;
    position: relative;
    z-index: 2;
    animation: dartLand 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dart-pin-host .dart-pin-head {
    background: radial-gradient(circle at 35% 35%, #fff 0%, #ff3b30 40%, #a00 100%);
    box-shadow: 0 0 10px #ff3b30, 0 0 4px #fff;
}

.dart-pin-guest .dart-pin-head {
    background: radial-gradient(circle at 35% 35%, #fff 0%, #00d2ff 40%, #0066cc 100%);
    box-shadow: 0 0 10px #00d2ff, 0 0 4px #fff;
}

.dart-pin-num {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    font-weight: 900;
    color: #fff;
    background: rgba(0, 0, 0, 0.85);
    padding: 1px 4px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    white-space: nowrap;
    text-shadow: 0 1px 2px #000;
    line-height: 1;
    z-index: 3;
}

/* Landing ripple ring */
.dart-pin-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin-left: -12px;
    margin-top: -12px;
    border-radius: 50%;
    border: 2px solid #ffd700;
    opacity: 0;
    pointer-events: none;
    animation: dartRipple 0.65s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes dartLand {
    0% { transform: scale(2.8); opacity: 0; }
    60% { transform: scale(0.9); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes dartRipple {
    0% { transform: scale(0.2); opacity: 0.9; }
    100% { transform: scale(2.2); opacity: 0; }
}

/* Visit Summary Footer */
.darts-miniboard-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.darts-miniboard-dlist {
    display: flex;
    gap: 4px;
    align-items: center;
}

.darts-miniboard-dpill {
    font-size: 0.68rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    padding: 2px 5px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    color: #bbb;
    border: 1px solid rgba(255, 255, 255, 0.08);
    min-width: 28px;
    text-align: center;
}

.darts-miniboard-dpill.filled {
    background: rgba(218, 11, 11, 0.25);
    border-color: rgba(218, 11, 11, 0.6);
    color: #fff;
}

.darts-miniboard-dpill.highlight-gold {
    background: rgba(255, 215, 0, 0.25);
    border-color: #ffd700;
    color: #ffd700;
}

.darts-miniboard-total {
    font-size: 0.85rem;
    font-weight: 900;
    font-family: 'JetBrains Mono', monospace;
    color: #fff;
    padding: 1px 6px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.darts-miniboard-total.score-high {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* Minimized State */
.darts-miniboard-card.minimized {
    width: auto;
    padding: 6px 12px;
}

.darts-miniboard-card.minimized .darts-miniboard-board-wrap,
.darts-miniboard-card.minimized .darts-miniboard-footer {
    display: none;
}

.darts-miniboard-card.minimized .darts-miniboard-header {
    margin-bottom: 0;
}

/* Responsive Scaling */
@media (max-width: 768px) {
    .darts-miniboard-card {
        bottom: 85px;
        left: 12px;
        width: 170px;
        padding: 8px 8px 6px 8px;
    }
    .dboard-number-text {
        font-size: 11px;
    }
}
