/* UFC Fights v1.4.0 — styled after Google's UFC results widget */
:root{
  --bg:#111214; --card:#1c1d20; --line:#2e3034; --text:#e8eaed; --muted:#9aa0a6; --dim:#6f7378;
  --red:#d20a0a; --red-dark:#b30909; --green:#81c995; --green-ring:#34a853; --live:#f28b82;
  --avatar:#2a2c30;
}
*{box-sizing:border-box}
html,body{margin:0;background:var(--bg);color:var(--text);font:16px/1.4 "Google Sans",Roboto,Arial,Helvetica,sans-serif;-webkit-font-smoothing:antialiased;font-variant-numeric:tabular-nums}
a{color:inherit;text-decoration:none}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}

.brand{background:var(--red);color:#fff;position:sticky;top:0;z-index:5}
.brand-inner{display:flex;align-items:center;gap:14px;padding:14px 16px;max-width:900px;margin:0 auto}
.brand-logo{height:18px;width:auto;display:block;flex:0 0 auto;margin-right:2px;opacity:.96}
.brand-title{font-size:19px;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.picker{position:relative;display:inline-flex;align-items:center}
.picker select{appearance:none;-webkit-appearance:none;background:rgba(0,0,0,.25);color:#fff;border:1px solid rgba(255,255,255,.35);border-radius:8px;padding:8px 30px 8px 12px;font:inherit;font-size:14px;max-width:46vw}
.picker select:focus{outline:2px solid #fff;outline-offset:1px}
.picker-caret{position:absolute;right:10px;pointer-events:none;font-size:12px}

.event-tabs{display:flex;overflow-x:auto;scrollbar-width:none;background:var(--red);border-top:1px solid rgba(0,0,0,.15)}
.event-tabs::-webkit-scrollbar{display:none}
.event-tabs .tab{flex:0 0 auto;padding:14px 20px;text-transform:uppercase;font-size:14px;letter-spacing:.3px;color:rgba(255,255,255,.85);border-bottom:3px solid transparent;white-space:nowrap}
.event-tabs .tab.active{color:#fff;font-weight:700;border-bottom-color:#fff}

.card{max-width:900px;margin:0 auto;background:var(--card)}
.segment-tabs{display:flex;border-bottom:1px solid var(--line)}
.segment-tabs .tab{flex:1;padding:14px 8px;font-size:17px;color:var(--muted);border-bottom:3px solid transparent;white-space:nowrap}
.segment-tabs .tab.active{color:var(--text);border-bottom-color:var(--text)}
.segment-tabs .tab:disabled{opacity:.4;cursor:default}

.fights{min-height:200px}
.fight{padding:16px 16px 18px;border-bottom:1px solid var(--line)}
.fight-when{color:var(--muted);font-size:14px}
.fight-head{display:flex;justify-content:space-between;align-items:baseline;gap:8px;margin:2px 0 12px}
.fight-class{font-size:17px}
.fight-class .wlimit{color:var(--muted);font-size:14px;margin-left:2px;letter-spacing:.2px}
.fight-class .role{color:var(--muted)}
.fight-status{font-size:17px;white-space:nowrap}
.fight-status.live{color:var(--live);font-weight:700}
.fight-status.live::before{content:"";display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--live);margin-right:6px;animation:pulse 1.2s infinite}
@keyframes pulse{50%{opacity:.3}}

.matchup{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.fighter{display:flex;align-items:center;gap:12px;border-radius:12px;padding:4px;margin:-4px}
a.fighter:hover{background:rgba(255,255,255,.06)}
.fighter.tba{cursor:default;opacity:.7}
.fighter.right{flex-direction:row-reverse;text-align:right}
.avatar{position:relative;flex:0 0 auto;width:60px;height:60px;border-radius:50%;background:var(--avatar);border:2px solid #4a4d52;overflow:hidden}
.avatar img{width:100%;height:100%;object-fit:cover;object-position:top;display:block;background:#4a4d51}
.avatar .fallback{width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:700;color:var(--muted)}
.fighter.winner .avatar{border-color:var(--green-ring);overflow:visible}
.fighter.winner .avatar img,.fighter.winner .avatar .fallback{border-radius:50%}
.fighter.winner .avatar::after{content:"";position:absolute;right:-3px;bottom:-1px;width:22px;height:22px;border-radius:50%;background:var(--green-ring);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");background-size:14px 14px;background-repeat:no-repeat;background-position:center;box-shadow:0 0 0 2px var(--card)}
.fighter.loser{opacity:.75}
.fname{font-size:17px;line-height:1.25;color:var(--text)}
.fighter.loser .fname{color:var(--muted)}
.frecord{color:var(--muted);font-size:15px;margin-top:3px;line-height:1.2}
.fheight{color:var(--dim);font-size:13px;margin-top:2px;line-height:1.2;min-height:1.2em;letter-spacing:.2px}
.fighter .info{min-width:0}

.result{margin-top:10px;color:var(--green);font-size:17px}
.result .detail{color:var(--muted);font-size:14px;margin-left:4px}

.card-footer{display:flex;justify-content:space-between;gap:12px;padding:14px 16px;color:var(--muted);font-size:14px}
.updated{white-space:nowrap}
.empty,.error{padding:32px 16px;text-align:center;color:var(--muted)}
.error{color:var(--live)}
.skeleton{padding:16px}
.skeleton div{height:14px;border-radius:7px;background:var(--line);margin:12px 0;animation:pulse 1.5s infinite}

.credit{max-width:900px;margin:16px auto 32px;padding:0 16px;color:var(--muted);font-size:13px;text-align:center}

@media (max-width:480px){
  .brand-title{font-size:16px}
  .avatar{width:54px;height:54px}
  .fname{font-size:16px}
  .frecord{font-size:14px}
  .fheight{font-size:12px}
  .fight-class .wlimit{font-size:13px}
  .matchup{gap:8px}
  .brand-title{display:none}
  .brand-inner{padding:10px 16px;gap:12px}
  .brand-logo{height:16px}
  .picker{flex:1}
  .picker select{max-width:none;width:100%;font-size:14px}
}
@media (min-width:640px){
  .card{border-radius:12px;margin-top:16px;overflow:hidden}
}
