/* ============================================================
   HIGHLIGHTS PAGE
   ============================================================ */

.hl-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.hl-title {
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}
.hl-title svg { color: #e8192c; }

/* League filter tabs */
.hl-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.hl-filter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid transparent;
    background: var(--card-bg, #1a1a2e);
    color: var(--text-muted, #9ca3af);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
}
.hl-filter-btn:hover { border-color: #e8192c; color: #fff; }
.hl-filter-btn.active { background: #e8192c; color: #fff; border-color: #e8192c; }
.hl-filter-btn img { width: 18px; height: 18px; object-fit: contain; background: #fff; border-radius: 4px; padding: 2px; }

/* Grid */
.hl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* Card */
.hl-card {
    background: var(--card-bg, #1a1a2e);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border, rgba(255,255,255,.08));
    cursor: pointer;
    transition: transform .15s, border-color .15s;
}
.hl-card:hover { transform: translateY(-2px); border-color: rgba(232,25,44,.4); }

/* Thumbnail area */
.hl-card__thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #0d0d1a;
}
.hl-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .2s;
}
.hl-card:hover .hl-card__thumb img { transform: scale(1.04); }

/* Play button overlay */
.hl-card__play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.35);
    transition: background .15s;
}
.hl-card:hover .hl-card__play { background: rgba(0,0,0,.25); }
.hl-card__play-icon {
    width: 52px;
    height: 52px;
    background: rgba(232,25,44,.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,.5);
    transition: transform .15s, background .15s;
}
.hl-card:hover .hl-card__play-icon { transform: scale(1.08); background: #e8192c; }
.hl-card__play-icon svg { margin-left: 3px; }

/* Card body */
.hl-card__body {
    padding: 12px 14px;
}
.hl-card__match {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.hl-card__team {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
    color: #f3f4f6;
}
.hl-card__team img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}
.hl-card__vs {
    font-size: 11px;
    color: var(--text-muted, #6b7280);
    padding: 0 4px;
}
.hl-card__league {
    font-size: 11px;
    color: var(--text-muted, #6b7280);
    margin-bottom: 4px;
}
.hl-card__title {
    font-size: 13px;
    color: var(--text-muted, #9ca3af);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hl-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-muted, #6b7280);
}
.hl-card__source {
    display: flex;
    align-items: center;
    gap: 4px;
}
.hl-card__source svg { color: #ff0000; }

/* Modal overlay */
.hl-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.88);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: hlFadeIn .15s ease;
}
@keyframes hlFadeIn { from { opacity:0 } to { opacity:1 } }

.hl-modal {
    background: #0d0d1a;
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
    max-width: 860px;
    border: 1px solid rgba(255,255,255,.1);
}
.hl-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.hl-modal__title {
    font-size: 14px;
    font-weight: 600;
    color: #f3f4f6;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hl-modal__close {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    margin-left: 10px;
    transition: background .15s;
}
.hl-modal__close:hover { background: rgba(255,255,255,.16); }
.hl-modal__video {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
}
.hl-modal__video iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}
/* Fallback for non-embed links */
.hl-modal__ext {
    padding: 40px 20px;
    text-align: center;
}
.hl-modal__ext a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e8192c;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.hl-modal__yt-link {
    text-align: center;
    padding: 10px 16px 14px;
    border-top: 1px solid rgba(255,255,255,.08);
}
.hl-modal__yt-link a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #9ca3af;
    text-decoration: none;
    transition: color .15s;
}
.hl-modal__yt-link a:hover { color: #fff; }

/* Loading / Empty */
.hl-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}
.hl-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255,255,255,.1);
    border-top-color: #e8192c;
    border-radius: 50%;
    animation: hlSpin .7s linear infinite;
}
@keyframes hlSpin { to { transform: rotate(360deg) } }

.hl-empty {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
    font-size: 14px;
}

/* Light mode */
@media (prefers-color-scheme: light) {
    .hl-card { background: #fff; border-color: rgba(0,0,0,.08); }
    .hl-card__thumb { background: #f3f4f6; }
    .hl-filter-btn { background: #f3f4f6; color: #374151; }
    .hl-filter-btn:hover { color: #111; }
    .hl-modal { background: #fff; }
    .hl-modal__header { border-bottom-color: rgba(0,0,0,.08); }
    .hl-modal__close { background: rgba(0,0,0,.06); }
    .hl-modal__close:hover { background: rgba(0,0,0,.12); }
    .hl-card__team { color: #111827; }
    .hl-modal__title { color: #111; }
}

@media (max-width: 600px) {
    .hl-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .hl-card__body { padding: 8px 10px; }
    .hl-card__match { flex-wrap: wrap; gap: 4px; }
}
@media (max-width: 400px) {
    .hl-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   HIGHLIGHTS WIDGET (embedded on other pages)
   ============================================================ */

/* Section header */
.hlw-section {
    margin-top: 32px;
    margin-bottom: 0;
}
.hlw-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.hlw-section__title {
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--color-text, #1a1a1a);
}
.hlw-section__title svg { color: #e8192c; flex-shrink: 0; }
.hlw-section__more {
    font-size: 12px;
    color: var(--text-muted, #6b7280);
    text-decoration: none;
}
.hlw-section__more:hover { color: #e8192c; }

/* Grid mode (fullstory + match tab): 4 small cards in a row */
.hlw-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.hlw-card {
    background: var(--color-bg-card, #fff);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--color-border, #e5e7eb);
    cursor: pointer;
    transition: transform .15s, border-color .15s;
}
.hlw-card:hover { transform: translateY(-2px); border-color: rgba(232,25,44,.4); }

.hlw-card__thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #e5e7eb;
}
.hlw-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .2s;
}
.hlw-card:hover .hlw-card__thumb img { transform: scale(1.04); }
.hlw-card__play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.4);
    transition: background .15s;
}
.hlw-card:hover .hlw-card__play { background: rgba(0,0,0,.25); }
.hlw-card__play svg {
    background: rgba(232,25,44,.9);
    border-radius: 50%;
    padding: 8px;
    box-sizing: content-box;
    box-shadow: 0 2px 8px rgba(0,0,0,.5);
    margin-left: 2px;
}

.hlw-card__body { padding: 7px 9px; }
.hlw-card__teams {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text, #1a1a1a);
    white-space: nowrap;
    overflow: hidden;
}
.hlw-card__teams img {
    width: 14px;
    height: 14px;
    object-fit: contain;
    flex-shrink: 0;
}
.hlw-card__teams span {
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.hlw-vs { color: var(--color-text-muted, #6b7280); padding: 0 2px; flex-shrink: 0; }
.hlw-card__league {
    font-size: 10px;
    color: var(--color-text-muted, #6b7280);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Row mode (sidebar): horizontal compact cards */
.hlw-rows { display: flex; flex-direction: column; gap: 6px; }

.hlw-row-card {
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    padding: 6px 2px;
    border-radius: 6px;
    transition: background .12s;
}
.hlw-row-card:hover { background: rgba(255,255,255,.04); }

.hlw-row-card__thumb {
    position: relative;
    width: 72px;
    flex-shrink: 0;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 5px;
    background: #0d0d1a;
}
.hlw-row-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hlw-play-sm {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.45);
}
.hlw-play-sm svg {
    background: rgba(232,25,44,.85);
    border-radius: 50%;
    padding: 4px;
    box-sizing: content-box;
    margin-left: 1px;
}

.hlw-row-card__body { min-width: 0; flex: 1; }
.hlw-row-card__teams {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text, #1a1a1a);
    flex-wrap: wrap;
    line-height: 1.3;
}
.hlw-row-card__teams img {
    width: 14px;
    height: 14px;
    object-fit: contain;
    flex-shrink: 0;
}
.hlw-row-card__league {
    font-size: 10px;
    color: var(--color-text-muted, #6b7280);
    margin-top: 2px;
}

.hlw-row-card:hover { background: rgba(0,0,0,.04); }

/* Responsive grid */
@media (max-width: 900px) {
    .hlw-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
    .hlw-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .hlw-card__body { padding: 6px 8px; }
}
