/* ───────────────────────────────────────────────────────────────────────────
   Match Highlights tab — Twitter/X video clip grid + embed modal
   Standalone & revertable: remove the <link> to fall back cleanly.
   Theme: dark surface + electric-green (#00e676) signature.
─────────────────────────────────────────────────────────────────────────── */

.hl-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 2px 14px;
}
.hl-head-title {
    font-family: "Barlow Condensed", "Source Sans 3", system-ui, sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: #f2f5f7;
}
.hl-head-count {
    font-size: .8rem;
    font-weight: 600;
    color: #00e676;
    background: rgba(0, 230, 118, .1);
    border: 1px solid rgba(0, 230, 118, .28);
    padding: 2px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.hl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 14px;
}

.hl-card {
    display: flex;
    flex-direction: column;
    background: #11151c;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
    outline: none;
}
.hl-card:hover,
.hl-card:focus-visible {
    border-color: rgba(0, 230, 118, .5);
    box-shadow: 0 6px 22px rgba(0, 0, 0, .45);
    transform: translateY(-2px);
}
.hl-card:focus-visible {
    box-shadow: 0 0 0 2px rgba(0, 230, 118, .55);
}

.hl-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background-color: #05070d;
    background-size: cover;
    background-position: center;
}
.hl-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.55) 100%);
}
.hl-play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 230, 118, .92);
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .5);
    z-index: 1;
    transition: transform .18s ease, background .18s ease;
}
.hl-play svg path { fill: #05241a; }
.hl-card:hover .hl-play { transform: scale(1.08); }

.hl-body { padding: 10px 12px 12px; }
.hl-author {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 6px;
}
.hl-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
}
.hl-name {
    font-size: .8rem;
    font-weight: 600;
    color: #aeb6bf;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hl-verified { flex: 0 0 auto; }
.hl-text {
    margin: 0;
    font-size: .9rem;
    line-height: 1.4;
    color: #e7ebef;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Embed modal ── */
.hl-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.hl-modal[hidden] { display: none; }
.hl-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 4, 8, .82);
    backdrop-filter: blur(3px);
}
.hl-modal-box {
    position: relative;
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    overflow-y: auto;
    background: #0c0f15;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 16px;
    padding: 12px;
    z-index: 1;
}
.hl-modal-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    z-index: 3;
    transition: background .15s ease;
}
.hl-modal-close:hover { background: rgba(0, 0, 0, .8); }

.hl-modal-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}
.hl-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
    object-fit: contain;
}
.hl-video-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    background-size: cover;
    background-position: center;
    color: #fff;
}
.hl-video-fallback::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(2, 4, 8, .72);
}
.hl-fallback-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.hl-video-fallback p {
    position: relative;
    margin: 0;
    font-size: .92rem;
    font-weight: 600;
    color: #e7ebef;
    max-width: 320px;
}
.hl-fallback-next {
    position: relative;
    border: none;
    cursor: pointer;
    padding: 9px 18px;
    border-radius: 9px;
    font-weight: 700;
    font-size: .88rem;
    color: #05241a;
    background: #00e676;
    transition: filter .15s ease;
}
.hl-fallback-next:hover { filter: brightness(1.08); }

/* clips that failed playback get dimmed + a small badge so users skip them */
.hl-card-blocked { opacity: .5; }
.hl-card-blocked .hl-play { background: rgba(120, 130, 140, .85); }
.hl-card-blocked .hl-thumb::before {
    content: "Region blocked";
    position: absolute;
    z-index: 2;
    top: 6px;
    left: 6px;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(2, 4, 8, .72);
    padding: 2px 6px;
    border-radius: 5px;
}
.hl-modal-caption {
    margin: 12px 4px 4px;
    font-size: .92rem;
    line-height: 1.45;
    color: #cfd5dc;
}

@media (max-width: 480px) {
    .hl-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
    .hl-text { -webkit-line-clamp: 2; font-size: .82rem; }
    .hl-play { width: 44px; height: 44px; }
}
