/* ================================================
   Basketball Team Manager – Public CSS
   ================================================ */
.btm-public-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    max-width: 900px;
    margin: 0 auto;
    color: #2d3748;
}

/* ---- Header ---- */
.btm-pub-header {
    display: flex;
    align-items: center;
    gap: 18px;
    background: linear-gradient(135deg, #1a3a5c 0%, #0f2744 100%);
    color: #fff;
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}
.btm-pub-logo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,.3);
    flex-shrink: 0;
}
.btm-pub-header-info { flex: 1; min-width: 140px; }
.btm-pub-header-info h2 { margin: 0 0 4px; font-size: 22px; font-weight: 800; }
.btm-pub-header-info p  { margin: 0; opacity: .8; font-size: 14px; }
.btm-pub-badge {
    display: inline-block;
    margin-top: 6px;
    padding: 3px 12px;
    background: #e8732a;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
}
.btm-pub-coach {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,.12);
    border-radius: 10px;
    padding: 10px 14px;
    min-width: 160px;
}
.btm-pub-coach-photo {
    width: 48px; height: 48px; border-radius: 50%;
    object-fit: cover; border: 2px solid rgba(255,255,255,.5);
}
.btm-pub-coach div { display: flex; flex-direction: column; }
.btm-pub-coach strong { font-size: 14px; font-weight: 700; }
.btm-pub-coach span  { font-size: 11px; opacity: .8; }
.btm-pub-coach small { font-size: 10px; opacity: .6; margin-top: 2px; }

/* ---- Court ---- */
.btm-pub-court-wrap {
    margin-bottom: 28px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
    border: 4px solid #fff;
}
.btm-pub-court {
    position: relative;
    width: 100%;
    aspect-ratio: 8/5;
    background: #4A6FA5;
    overflow: hidden;
}
.btm-pub-court-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* ---- Tokens ---- */
.btm-pub-token {
    position: absolute;
    width: 74px;
    text-align: center;
    pointer-events: none;
}
.btm-pub-token-inner {
    background: #e8732a;
    border-radius: 10px;
    padding: 6px 3px 5px;
    border: 2px solid rgba(255,255,255,.9);
    box-shadow: 0 4px 12px rgba(0,0,0,.35);
}
.btm-pub-token.coach .btm-pub-token-inner { background: #1a3a5c; }
.btm-pub-token img {
    width: 38px; height: 38px;
    border-radius: 50%; object-fit: cover;
    border: 2px solid rgba(255,255,255,.8);
    display: block; margin: 0 auto 3px;
}
.btm-pub-token-num  { color: rgba(255,255,255,.7); font-size: 10px; font-weight: 900; }
.btm-pub-token-name { color: #fff; font-size: 10px; font-weight: 700; line-height: 1.2; }
.btm-pub-token-pos  { color: rgba(255,255,255,.75); font-size: 9px; }

/* ---- Roster ---- */
.btm-pub-roster h3 {
    font-size: 18px; font-weight: 700; margin: 0 0 14px;
    color: #1a3a5c; border-left: 4px solid #e8732a;
    padding-left: 12px;
}
.btm-pub-players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}
.btm-pub-player-card {
    background: #fff;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    padding: 14px 10px;
    text-align: center;
    transition: transform .2s, box-shadow .2s;
}
.btm-pub-player-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,.1);
    border-color: #e8732a;
}
.btm-pub-player-card img {
    width: 64px; height: 64px;
    border-radius: 50%; object-fit: cover;
    border: 3px solid #e2e8f0;
    margin: 0 auto 10px;
    display: block;
}
.btm-pub-player-placeholder {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 10px;
    font-size: 24px; font-weight: 700; color: #a0aec0;
}
.btm-pub-player-info { display: flex; flex-direction: column; gap: 2px; }
.btm-pub-player-info strong { font-size: 13px; color: #1a3a5c; font-weight: 700; }
.btm-pub-pos { font-size: 11px; color: #e8732a; font-weight: 600; }
.btm-pub-num { font-size: 11px; color: #718096; }
.btm-pub-bio { font-size: 11px; color: #718096; margin: 4px 0 0; }

/* ---- Stats ---- */
.btm-pub-stats {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
}
.btm-pub-stat { display: flex; flex-direction: column; align-items: center; }
.btm-pub-stat strong { font-size: 14px; color: #1a3a5c; font-weight: 800; }
.btm-pub-stat span   { font-size: 9px; color: #718096; text-transform: uppercase; letter-spacing: .4px; }

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .btm-pub-header { padding: 14px 16px; }
    .btm-pub-players-grid { grid-template-columns: repeat(2, 1fr); }
    .btm-pub-token { width: 56px; }
    .btm-pub-token img { width: 28px; height: 28px; }
    .btm-pub-token-name { font-size: 8px; }
    .btm-pub-token-pos  { font-size: 7px; }
}

/* ============================================================
   CHAMPIONSHIP PUBLIC PAGE
   ============================================================ */

.btm-pub-champ-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    max-width: 960px;
    margin: 0 auto;
    color: #2d3748;
}

/* ---- Champ Header ---- */
.btm-pub-champ-header {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, #1a3a5c 0%, #0f2744 100%);
    color: #fff;
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.btm-pub-champ-logo {
    width: 80px; height: 80px;
    border-radius: 14px; object-fit: cover;
    border: 3px solid rgba(255,255,255,.3);
    flex-shrink: 0;
}
.btm-pub-champ-logo-placeholder {
    width: 80px; height: 80px;
    border-radius: 14px; background: rgba(255,255,255,.15);
    display: flex; align-items: center; justify-content: center;
    font-size: 36px; flex-shrink: 0;
}
.btm-pub-champ-title { flex: 1; }
.btm-pub-champ-title h1 { margin: 0 0 6px; font-size: 26px; font-weight: 800; }
.btm-pub-champ-title p  { margin: 0; opacity: .8; font-size: 14px; }

/* ---- Nav ---- */
.btm-pub-nav {
    display: flex; gap: 6px; flex-wrap: wrap;
    margin-bottom: 22px;
}
.btm-pub-nav a {
    padding: 9px 18px; border-radius: 30px;
    background: #fff; border: 2px solid #e2e8f0;
    color: #1a3a5c; text-decoration: none;
    font-size: 13px; font-weight: 700;
    transition: all .2s;
}
.btm-pub-nav a:hover {
    background: #1a3a5c; color: #fff; border-color: #1a3a5c;
}

/* ---- Live banner ---- */
.btm-pub-live-banner {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    background: #fef2f2; border: 2px solid #fca5a5;
    border-radius: 10px; padding: 12px 18px; margin-bottom: 18px;
    font-size: 14px; color: #7f1d1d;
}
.btm-pub-live-dot {
    width: 12px; height: 12px; border-radius: 50%;
    background: #ef4444;
    animation: btm-pulse 1.2s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes btm-pulse {
    0%,100% { opacity:1; transform:scale(1); }
    50%      { opacity:.5; transform:scale(1.3); }
}

/* ---- Sections ---- */
.btm-pub-section { margin-bottom: 36px; }
.btm-pub-section-title {
    font-size: 20px; font-weight: 800; color: #1a3a5c;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 3px solid #e8732a;
    display: flex; align-items: center; gap: 8px;
}
.btm-pub-empty {
    padding: 30px; text-align: center;
    color: #a0aec0; background: #f7fafc; border-radius: 10px;
    font-size: 14px;
}

/* ---- Standings Table ---- */
.btm-pub-table-wrap { overflow-x: auto; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.btm-pub-table {
    width: 100%; border-collapse: collapse;
    background: #fff; font-size: 14px;
    min-width: 480px;
}
.btm-pub-table thead { background: #1a3a5c; color: #fff; }
.btm-pub-table th { padding: 12px 14px; text-align: center; font-size: 12px; letter-spacing: .5px; }
.btm-pub-table th:nth-child(3) { text-align: left; }
.btm-pub-table td { padding: 11px 14px; text-align: center; border-bottom: 1px solid #f0f4f8; }
.btm-pub-table td:nth-child(3) { text-align: left; }
.btm-pub-table tbody tr:hover td { background: #f7fafc; }
.btm-pos-num { font-weight: 800; font-size: 16px; color: #a0aec0; }
.btm-pts-col { background: rgba(232,115,42,.1); font-size: 16px; }
.btm-rank-1 td { background: linear-gradient(90deg, rgba(255,215,0,.12), transparent); }
.btm-rank-2 td { background: linear-gradient(90deg, rgba(192,192,192,.1), transparent); }
.btm-rank-3 td { background: linear-gradient(90deg, rgba(205,127,50,.1), transparent); }
.btm-rank-1 .btm-pos-num { color: #d97706; }
.btm-rank-2 .btm-pos-num { color: #6b7280; }
.btm-rank-3 .btm-pos-num { color: #92400e; }

/* ---- Match Cards ---- */
.btm-pub-matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}
.btm-pub-match-card {
    background: #fff; border-radius: 12px;
    border: 2px solid #e2e8f0; overflow: hidden;
    transition: box-shadow .2s;
}
.btm-pub-match-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.1); }
.btm-match-upcoming { border-top: 4px solid #3b82f6; }
.btm-match-finished { border-top: 4px solid #27ae60; }

.btm-pub-match-meta {
    display: flex; gap: 8px; flex-wrap: wrap;
    padding: 10px 14px; background: #f7fafc;
    font-size: 12px; color: #718096;
    border-bottom: 1px solid #e2e8f0;
}
.btm-pub-round {
    background: #1a3a5c; color: #fff;
    padding: 2px 8px; border-radius: 10px;
    font-weight: 700; font-size: 11px;
}

.btm-pub-match-teams {
    display: grid; grid-template-columns: 1fr auto 1fr;
    align-items: center; gap: 8px; padding: 16px 14px;
    text-align: center;
}
.btm-pub-match-team img {
    width: 36px; height: 36px; border-radius: 50%;
    object-fit: cover; display: block; margin: 0 auto 6px;
}
.btm-pub-match-team strong { font-size: 13px; color: #1a3a5c; display: block; }
.btm-pub-match-vs {
    font-weight: 900; font-size: 18px; color: #e2e8f0; text-align: center;
}

/* ---- Result scores ---- */
.btm-pub-match-result {
    display: grid; grid-template-columns: 1fr auto 1fr;
    align-items: center; padding: 14px 14px;
    text-align: center; gap: 6px;
}
.btm-pub-result-team { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.btm-pub-result-team img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.btm-pub-result-team.winner span { font-weight: 700; color: #1a3a5c; }
.btm-pub-result-score {
    display: flex; align-items: center; gap: 6px; font-size: 28px; font-weight: 900;
}
.btm-pub-result-dash { color: #e2e8f0; font-size: 22px; }
.winner-score { color: #27ae60; }
.btm-pub-result-score span { color: #a0aec0; }
.btm-pub-result-score .winner-score { color: #1a3a5c; }

/* ---- Quarter breakdown ---- */
.btm-pub-quarters {
    padding: 0 14px 12px;
}
.btm-pub-quarters table {
    width: 100%; border-collapse: collapse; font-size: 12px;
}
.btm-pub-quarters td {
    padding: 4px 8px; text-align: center;
    background: #f7fafc; border: 1px solid #e2e8f0;
}
.btm-pub-quarters td:first-child {
    text-align: left; font-weight: 700; color: #718096;
}
.btm-pub-match-notes {
    padding: 0 14px 12px; font-size: 12px; color: #718096; margin: 0;
}

/* ---- Teams Grid ---- */
.btm-pub-teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}
.btm-pub-team-card {
    background: #fff; border-radius: 12px;
    border: 2px solid #e2e8f0; padding: 20px 16px;
    text-align: center; transition: all .2s;
}
.btm-pub-team-card:hover { border-color: #e8732a; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.btm-pub-team-logo {
    width: 70px; height: 70px; border-radius: 50%;
    object-fit: cover; border: 3px solid #e2e8f0;
    margin: 0 auto 12px; display: block;
}
.btm-pub-team-logo-placeholder {
    width: 70px; height: 70px; border-radius: 50%;
    background: #e2e8f0; display: flex; align-items: center; justify-content: center;
    font-size: 28px; margin: 0 auto 12px;
}
.btm-pub-team-card h3 { margin: 0 0 4px; font-size: 15px; color: #1a3a5c; font-weight: 800; }
.btm-pub-team-card p  { margin: 0 0 12px; font-size: 12px; color: #718096; }
.btm-pub-team-stats {
    display: flex; justify-content: center; gap: 10px;
    padding-top: 10px; border-top: 1px solid #e2e8f0;
}
.btm-pub-team-stats div { display: flex; flex-direction: column; align-items: center; }
.btm-pub-team-stats strong { font-size: 16px; font-weight: 800; color: #1a3a5c; }
.btm-pub-team-stats span  { font-size: 10px; color: #a0aec0; text-transform: uppercase; }

/* ---- Player team heading ---- */
.btm-pub-team-heading {
    font-size: 16px; font-weight: 700; color: #1a3a5c;
    margin: 0 0 12px; padding-left: 12px;
    border-left: 4px solid #e8732a;
}

/* ---- Responsive champ ---- */
@media (max-width: 640px) {
    .btm-pub-champ-header { padding: 16px; }
    .btm-pub-champ-title h1 { font-size: 20px; }
    .btm-pub-matches-grid { grid-template-columns: 1fr; }
    .btm-pub-teams-grid   { grid-template-columns: repeat(2, 1fr); }
    .btm-pub-table th:nth-child(n+8):not(:last-child) { display: none; }
    .btm-pub-table td:nth-child(n+8):not(:last-child) { display: none; }
}

/* ============================================================
   STREAMING, PAYMENT & LIVE MATCH – Public Styles
   ============================================================ */

/* ---- Live match card ---- */
.btm-match-live {
    border-top: 4px solid #ef4444 !important;
    box-shadow: 0 0 0 2px rgba(239,68,68,.2), 0 6px 20px rgba(0,0,0,.1);
}
.btm-pub-live-tag {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 14px;
    background: #fef2f2;
    color: #dc2626;
    font-size: 12px; font-weight: 800;
    border-bottom: 1px solid #fecaca;
    letter-spacing: .5px;
}

/* ---- Live score in upcoming card ---- */
.btm-pub-match-score-live {
    display: flex; align-items: center; gap: 6px;
    font-size: 26px; font-weight: 900;
    color: #dc2626;
    animation: btm-pulse-score 1s ease-in-out infinite;
}
.btm-pub-match-score-live span { color: #e2e8f0; font-size: 20px; }
@keyframes btm-pulse-score {
    0%,100% { opacity:1; } 50% { opacity:.7; }
}

/* ---- Match action row ---- */
.btm-pub-match-actions {
    display: flex; flex-direction: column; gap: 8px;
    padding: 10px 14px 14px;
    border-top: 1px solid #e2e8f0;
}

/* ---- Stream button ---- */
.btm-pub-stream-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 9px 16px; border-radius: 8px;
    background: #1a3a5c; color: #fff;
    text-decoration: none; font-size: 13px; font-weight: 700;
    transition: all .2s; border: none; cursor: pointer;
    width: 100%; text-align: center;
}
.btm-pub-stream-btn:hover { background: #0f2744; color: #fff; transform: translateY(-1px); }

/* ---- Ticket button ---- */
.btm-pub-ticket-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 9px 16px; border-radius: 8px;
    background: #e8732a; color: #fff;
    font-size: 13px; font-weight: 700;
    border: none; cursor: pointer; transition: all .2s;
    width: 100%;
}
.btm-pub-ticket-btn:hover { background: #d45f1a; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(232,115,42,.4); }

/* ---- Free badge ---- */
.btm-pub-free-badge {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 7px 14px; border-radius: 8px;
    background: #f0fff4; color: #276749;
    font-size: 12px; font-weight: 700;
    border: 1.5px solid #a7f3d0;
    width: 100%; text-align: center;
}

/* ---- Copy button ---- */
.btm-pub-copy-btn {
    background: none; border: none; cursor: pointer;
    font-size: 14px; padding: 0 4px; vertical-align: middle;
    opacity: .7; transition: opacity .15s;
}
.btm-pub-copy-btn:hover { opacity: 1; }

/* ---- Ticket modal flex ---- */
#btm-ticket-modal { display: none; }
#btm-ticket-modal[style*="flex"] { display: flex !important; }
