/* Bob Time Sport — live scoreboard (screenshot theme) */

:root {
    --primary: #f99e1f;
    --primary-dark: #e88a00;
    --secondary: #101820;
    --secondary-2: #182738;
    --text: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;
    --card: #ffffff;
    --page-bg: #d1d5db;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background-color: var(--page-bg);
    color: var(--text);
    margin: 0;
    padding: 24px 16px;
    min-height: 100vh;
}

#container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
}

.live-scoreboard-box {
    background: var(--card);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 20px 18px 18px;
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
}

.live-scoreboard-box::before {
    content: "";
    display: block;
    height: 4px;
    margin: -20px -18px 16px;
    background: linear-gradient(135deg, #00a9ac 0%, #0081a3 50%, #006b92 100%);
}

.live-scoreboard-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.live-header-left {
    flex: 1;
    min-width: 200px;
}

.live-badge {
    background: var(--secondary);
    color: #fff;
    padding: 6px 12px;
    font-size: 11px;
    text-transform: uppercase;
    border-radius: 999px;
    display: inline-block;
    font-weight: 800;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}

.live-badge::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
    animation: live-pulse 1.5s ease-in-out infinite;
}

@keyframes live-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

#eventName {
    color: var(--secondary);
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.25;
    margin: 0;
    padding: 0;
}

#venue {
    display: none;
}

.live-time {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex-shrink: 0;
    min-width: 160px;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-2) 55%, #1f3248 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 10px 14px 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.live-time-label {
    display: block;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 6px;
    text-align: center;
}

#clock {
    float: none;
    background: rgba(0, 0, 0, 0.35);
    font-size: 2rem;
    font-weight: 800;
    font-family: ui-monospace, "Courier New", Consolas, monospace;
    text-align: center;
    color: var(--primary);
    letter-spacing: 0.08em;
    padding: 12px 10px;
    min-width: 0;
    border-radius: 10px;
    border: 2px solid rgba(249, 158, 31, 0.45);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4), 0 0 20px rgba(249, 158, 31, 0.15);
    line-height: 1.1;
    text-shadow: 0 0 12px rgba(249, 158, 31, 0.35);
    margin: 0;
}

.live-details-bar,
#details {
    padding: 12px 14px;
    margin: 0 0 4px;
    background: #fff8e7;
    border: 1px solid #fde68a;
    border-radius: 8px;
    font-size: 14px;
    color: #9a6700;
    line-height: 1.5;
    font-weight: normal;
}

.live-details-bar span,
#details span {
    margin-right: 18px;
    font-weight: 800;
    color: #111;
}

#results {
    margin-top: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.live-results-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    background: var(--card);
    box-shadow: none;
}

.live-results-table thead th {
    background: linear-gradient(135deg, var(--primary), #ffbe45);
    color: #111;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 8px;
    text-align: center;
    border: none;
    white-space: nowrap;
}

.live-results-table thead th.live-th-name,
.live-results-table thead th.live-th-team {
    text-align: left;
}

.live-results-table thead th.live-th-time {
    text-align: right;
}

.live-results-table tbody td {
    padding: 10px 8px;
    font-size: 14px;
    vertical-align: middle;
    border-top: 1px solid var(--border);
}

.live-results-table tbody tr:nth-of-type(odd) {
    background: #f8fafc;
}

.live-results-table tbody tr:hover {
    background: rgba(56, 189, 248, 0.08);
}

.live-col-center,
td.place,
td.lane,
td.number,
th.place,
th.lane,
th.number {
    text-align: center;
    font-weight: 700;
}

.live-col-name,
td.name {
    font-weight: 800;
    color: var(--secondary);
    text-align: left;
}

.live-col-team,
td.team {
    text-align: left;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

td.team .team-flag {
    height: 24px;
    width: 36px;
    flex-shrink: 0;
    object-fit: contain;
}

td.team .team-code {
    font-weight: 600;
    white-space: nowrap;
}

.live-col-time,
td.time,
td.delta {
    text-align: right;
    font-family: ui-monospace, "Courier New", monospace;
    font-weight: 700;
    font-size: 14px;
    color: #111;
}

@media (max-width: 768px) {
    body {
        padding: 12px 8px;
    }

    .live-scoreboard-header {
        flex-direction: column;
    }

    .live-time {
        width: 100%;
        min-width: 0;
    }

    #clock {
        width: 100%;
        font-size: 1.65rem;
    }

    #eventName {
        font-size: 1.15rem;
    }

    .live-details-bar span,
    #details span {
        display: inline-block;
        margin-right: 12px;
        margin-bottom: 4px;
    }

    .live-results-table thead th,
    .live-results-table tbody td {
        font-size: 11px;
        padding: 6px 4px;
    }
}
