/* ═══ ARENA – gangster noir: svart/kol, guld, blodrött. Prefix ar- ═══ */
.ar-page, .ar-overlay, .ar-sheet-bg { --gold:#f5c518; --gold2:#d4a017; --red:#e02424; --red2:#9e0f0f; --ink:#0b0a09; --card:#141210; --line:#2c2415; --txt:#e8dcc0; --mut:#8f826a; }
.ar-page {
  max-width: 1180px; margin: 0 auto; padding: 14px 12px 60px; color: var(--txt); }
.ar-page, .ar-overlay, .ar-sheet { font-family: 'Roboto', system-ui, sans-serif; }
.ar-hero { text-align: center; padding: 26px 12px 18px; margin-bottom: 14px; position: relative;
  background: radial-gradient(ellipse at 50% 0%, rgba(176,18,18,.28), transparent 65%), repeating-linear-gradient(135deg, rgba(255,255,255,.015) 0 2px, transparent 2px 6px);
  border-bottom: 1px solid var(--line); }
.ar-hero-kicker { font-family: 'Oswald', sans-serif; color: var(--red); letter-spacing: .4em; font-size: 12px; text-transform: uppercase; }
.ar-hero h1 { font-family: 'Oswald', sans-serif; font-weight: 700; font-size: clamp(42px, 9vw, 72px); line-height: 1; margin: 6px 0;
  background: linear-gradient(180deg, #fff3c4, var(--gold) 45%, #8a5f06); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 3px 0 #2a0505); letter-spacing: .04em; }
.ar-hero p { color: var(--mut); margin: 0; font-size: 14px; }
.ar-empty { text-align: center; color: var(--mut); padding: 40px 10px; }

.ar-me { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; align-items: center; background: var(--card); border: 1px solid var(--line);
  border-left: 3px solid var(--gold2); border-radius: 4px; padding: 12px 14px; margin-bottom: 16px; }
.ar-me-id { display: flex; gap: 10px; align-items: center; }
.ar-me-ico { font-size: 28px; }
.ar-me-id b { display: block; font-family: 'Oswald', sans-serif; font-size: 18px; letter-spacing: .04em; }
.ar-me-id small, .ar-card-id small { color: var(--mut); font-size: 12px; }
.ar-me-stats { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.ar-me-stats span { background: rgba(0,0,0,.45); border: 1px solid var(--line); padding: 3px 9px; border-radius: 2px; font-weight: 700; font-size: 13px; }
.ar-me-note { grid-column: 1 / -1; font-size: 12px; color: var(--mut); }

.ar-section h2 { font-family: 'Oswald', sans-serif; font-size: 16px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin: 6px 0 10px; }
.ar-challenge { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--card);
  border: 1px solid var(--line); border-left: 3px solid var(--mut); border-radius: 4px; padding: 12px 14px; margin-bottom: 10px; }
.ar-challenge.in { border-left-color: var(--red); box-shadow: 0 0 24px rgba(224,36,36,.18); animation: arPulse 2s ease-in-out infinite; }
.ar-ch-main b { font-family: 'Oswald', sans-serif; font-size: 17px; margin-right: 6px; }
.ar-ch-main small { color: var(--mut); }
.ar-ch-tags { display: flex; gap: 10px; margin-top: 4px; font-size: 12px; color: var(--mut); }
.ar-ch-tags .gold, .gold { color: var(--gold); font-weight: 700; }
.ar-ch-actions { display: flex; gap: 8px; }
.ar-waiting { color: var(--mut); font-size: 12px; font-weight: 700; }

.ar-btn { font-family: 'Oswald', sans-serif; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; cursor: pointer;
  background: linear-gradient(180deg, #d61e1e, var(--red2)); color: #fff; border: 1px solid #5c0707; border-radius: 3px;
  padding: 9px 16px; font-size: 14px; box-shadow: 0 3px 0 #3d0404; transition: transform .12s, filter .12s; }
.ar-btn:hover:not(:disabled) { filter: brightness(1.12); }
.ar-btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 #3d0404; }
.ar-btn:disabled { opacity: .4; cursor: default; }
.ar-btn.ghost { background: transparent; color: var(--txt); border-color: var(--line); box-shadow: none; }
.ar-btn.full { width: 100%; margin-top: 10px; }
.ar-btn.sm { padding: 6px 10px; font-size: 12px; }
.ar-btn:focus-visible, .ar-tabs button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.ar-tabs { display: flex; gap: 6px; margin: 14px 0; overflow-x: auto; }
.ar-tabs button { flex: 1; min-width: max-content; font-family: 'Oswald', sans-serif; letter-spacing: .1em; text-transform: uppercase; font-size: 14px;
  background: var(--card); color: var(--mut); border: 1px solid var(--line); border-radius: 3px; padding: 10px 14px; cursor: pointer; }
.ar-tabs button.on { color: #140d02; background: linear-gradient(180deg, var(--gold), var(--gold2)); border-color: #6b4a06; }

.ar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.ar-card { background: linear-gradient(180deg, #171411, #0e0c0a); border: 1px solid var(--line); border-top: 2px solid var(--gold2); border-radius: 4px; padding: 12px; transition: transform .15s, box-shadow .15s; }
.ar-card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,.6), 0 0 0 1px rgba(245,197,24,.15); }
.ar-card-top { display: grid; grid-template-columns: 46px 1fr auto; gap: 10px; align-items: center; }
.ar-card-ava { width: 46px; height: 46px; border-radius: 3px; overflow: hidden; background: #000; border: 1px solid var(--line); display: grid; place-items: center; font-size: 24px; }
.ar-card-ava img { width: 100%; height: 100%; object-fit: cover; }
.ar-card-id b { display: block; font-family: 'Oswald', sans-serif; font-size: 17px; letter-spacing: .03em; }
.ar-odds { text-align: center; font-family: 'Oswald', sans-serif; font-size: 20px; font-weight: 700; color: var(--txt); line-height: 1; }
.ar-odds small { display: block; font-size: 9px; letter-spacing: .15em; text-transform: uppercase; color: var(--mut); margin-top: 3px; }
.ar-odds.good { color: #58d27a; } .ar-odds.bad { color: var(--red); }
.ar-bars { margin: 12px 0 8px; display: grid; gap: 6px; }
.ar-bar { display: grid; grid-template-columns: 20px 1fr 42px; gap: 8px; align-items: center; font-size: 13px; }
.ar-bar-track { position: relative; height: 8px; background: #000; border: 1px solid var(--line); border-radius: 2px; }
.ar-bar-track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 1px; }
.ar-bar-track i.them { background: linear-gradient(90deg, var(--red2), var(--red)); }
.ar-bar-track i.you { background: transparent; border-right: 2px solid var(--gold); height: 12px; top: -3px; }
.ar-bar b { text-align: right; font-weight: 700; } .ar-bar b.up { color: var(--red); } .ar-bar b.down { color: #58d27a; }
.ar-card-foot { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--mut); flex-wrap: wrap; }
.ar-card-foot b { color: var(--txt); }
.ar-streak { color: #ff8a3d; font-weight: 700; }

.ar-list { display: grid; gap: 6px; }
.ar-row { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 3px; padding: 9px 12px; }
.ar-row-tag { font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 16px; text-align: center; color: var(--mut); }
.ar-row.win .ar-row-tag { color: #58d27a; } .ar-row.loss .ar-row-tag { color: var(--red); } .ar-row.draw .ar-row-tag { color: var(--gold); }
.ar-row.win { border-left: 3px solid #2ea043; } .ar-row.loss { border-left: 3px solid var(--red2); } .ar-row.draw { border-left: 3px solid var(--gold2); }
.ar-row-main b { font-weight: 700; } .ar-row-main b.w { color: var(--gold); } .ar-row-main i { color: var(--mut); margin: 0 4px; font-style: normal; }
.ar-row-main small { color: var(--mut); font-size: 12px; }

/* utmaningsark */
.ar-sheet-bg { position: fixed; inset: 0; z-index: 1400; background: rgba(0,0,0,.78); display: flex; align-items: center; justify-content: center; padding: 12px; }
.ar-sheet { --gold:#f5c518; --red:#e02424; --line:#2c2415; --txt:#e8dcc0; --mut:#8f826a; color: var(--txt);
  width: min(100%, 420px); background: linear-gradient(180deg, #171411, #0b0a09); border: 1px solid var(--line); border-top: 3px solid #d4a017; border-radius: 5px; padding: 18px;
  animation: arSlam .35s cubic-bezier(.2,1.4,.4,1) both; }
.ar-sheet-head { text-align: center; margin-bottom: 12px; }
.ar-sheet-vs { display: flex; justify-content: center; align-items: center; gap: 14px; font-size: 30px; }
.ar-sheet-vs b { font-family: 'Oswald', sans-serif; color: var(--red); font-size: 22px; letter-spacing: .1em; }
.ar-sheet h3 { font-family: 'Oswald', sans-serif; margin: 6px 0 2px; font-size: 22px; letter-spacing: .04em; }
.ar-sheet small { color: var(--mut); }
.ar-lbl { display: block; font-family: 'Oswald', sans-serif; letter-spacing: .2em; text-transform: uppercase; font-size: 12px; color: var(--gold); margin: 6px 0; }
.ar-chips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.ar-chips button { font-family: 'Oswald', sans-serif; font-weight: 700; background: #000; color: var(--txt); border: 1px solid var(--line); border-radius: 3px; padding: 9px 0; cursor: pointer; }
.ar-chips button.on { background: linear-gradient(180deg, var(--gold), #b8860b); color: #140d02; border-color: #6b4a06; }
.ar-chips button:disabled { opacity: .3; cursor: default; }
.ar-input { width: 100%; box-sizing: border-box; margin-top: 8px; background: #000; color: var(--txt); border: 1px solid var(--line); border-radius: 3px; padding: 10px 12px; font-size: 16px; font-weight: 700; }
.ar-input:focus { outline: none; border-color: #d4a017; }
.ar-sheet-sum { display: flex; justify-content: space-between; font-size: 13px; color: var(--mut); margin: 10px 0 14px; gap: 8px; flex-wrap: wrap; }
.ar-sheet-actions { display: flex; gap: 8px; justify-content: flex-end; }
.ar-sheet-actions .ar-btn:last-child { flex: 1; }

/* ═══ STRIDEN (fullskärm) ═══ */
.ar-overlay { position: fixed; inset: 0; z-index: 1500; overflow-y: auto; color: #e8dcc0;
  background: radial-gradient(ellipse at 50% 30%, rgba(120,10,10,.45), rgba(0,0,0,.96) 70%), #000; display: flex; align-items: center; justify-content: center; padding: 14px; }
.ar-fight { width: min(100%, 760px); }
.ar-fight-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.ar-round { font-family: 'Oswald', sans-serif; letter-spacing: .3em; color: #f5c518; font-size: 15px; }
.ar-skip { background: transparent; border: 1px solid #3a2f1a; color: #8f826a; font-family: 'Oswald', sans-serif; letter-spacing: .1em; padding: 6px 12px; border-radius: 3px; cursor: pointer; }
.ar-ring { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; padding: 18px 10px; border-top: 1px solid #3a2f1a; border-bottom: 1px solid #3a2f1a;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.02) 0 1px, transparent 1px 40px); }
.ar-vs { font-family: 'Oswald', sans-serif; font-size: 34px; font-weight: 700; color: #e02424; text-shadow: 0 0 20px rgba(224,36,36,.6); }
.ar-fighter { text-align: center; transition: opacity .4s, filter .4s; }
.ar-fighter.down { opacity: .45; filter: grayscale(.9); }
.ar-avatar { position: relative; width: clamp(84px, 24vw, 140px); aspect-ratio: 1; margin: 0 auto 8px; border-radius: 4px; background: #000; border: 2px solid #3a2f1a;
  display: grid; place-items: center; font-size: clamp(42px, 12vw, 70px); overflow: visible; }
.ar-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 2px; }
.ar-fighter.me .ar-avatar { border-color: #d4a017; box-shadow: 0 0 22px rgba(245,197,24,.3); }
.ar-avatar.hit { animation: arShake .35s ease; }
.ar-avatar.crit { animation: arCrit .55s ease; }
.ar-avatar.dodge { animation: arDodge .45s ease; }
.ar-fighter.left .ar-avatar.atk { animation: arLungeR .3s ease; }
.ar-fighter.right .ar-avatar.atk { animation: arLungeL .3s ease; }
.ar-pop { position: absolute; left: 50%; top: -6px; transform: translateX(-50%); font-family: 'Oswald', sans-serif; font-style: normal; font-weight: 700; font-size: 22px;
  letter-spacing: .08em; pointer-events: none; animation: arPop .9s ease-out both; white-space: nowrap; }
.ar-pop.crit { color: #f5c518; text-shadow: 0 0 14px rgba(224,36,36,.9), 0 2px 0 #2a0505; font-size: 26px; }
.ar-pop.dodge { color: #cfc6b3; }
.ar-fname { font-family: 'Oswald', sans-serif; font-size: clamp(15px, 4vw, 20px); letter-spacing: .04em; }
.ar-fmeta { color: #8f826a; font-size: 12px; margin-bottom: 8px; }
.ar-hp { position: relative; height: 18px; background: #000; border: 1px solid #3a2f1a; border-radius: 2px; overflow: hidden; }
.ar-hp-fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(180deg, #f5c518, #b8860b); transition: width .45s cubic-bezier(.3,.8,.3,1); }
.ar-hp-fill.low { background: linear-gradient(180deg, #ff3b3b, #9e0f0f); }
.ar-hp span { position: relative; font-size: 11px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px #000; line-height: 18px; }
.ar-ticker { min-height: 110px; margin: 14px 0; display: grid; gap: 4px; }
.ar-tick { background: rgba(0,0,0,.5); border-left: 3px solid #3a2f1a; padding: 6px 10px; font-size: 14px; animation: arTick .3s ease both; }
.ar-tick.mine { border-left-color: #d4a017; } .ar-tick.theirs { border-left-color: #9e0f0f; }
.ar-tick.crit { font-weight: 700; color: #f5c518; }
.ar-tick.dodge { color: #8f826a; font-style: italic; }
.ar-tick:not(:first-child) { opacity: .55; }
.ar-result { text-align: center; padding: 16px 12px 6px; animation: arSlam .5s cubic-bezier(.2,1.5,.4,1) both; }
.ar-result-stamp { font-family: 'Oswald', sans-serif; font-weight: 700; font-size: clamp(44px, 12vw, 76px); line-height: 1; letter-spacing: .06em; }
.ar-result.win .ar-result-stamp { background: linear-gradient(180deg, #fff3c4, #f5c518 45%, #8a5f06); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 4px 0 #2a0505); }
.ar-result.loss .ar-result-stamp { color: #e02424; text-shadow: 0 4px 0 #2a0505, 0 0 30px rgba(224,36,36,.5); }
.ar-result.draw .ar-result-stamp { color: #e8dcc0; }
.ar-result-sub { color: #8f826a; letter-spacing: .2em; text-transform: uppercase; font-size: 12px; margin: 4px 0 14px; }
.ar-loot { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.ar-loot-item { background: rgba(0,0,0,.55); border: 1px solid #3a2f1a; border-radius: 3px; padding: 8px 14px; min-width: 110px; }
.ar-loot-item small { display: block; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: #8f826a; }
.ar-loot-item b { font-family: 'Oswald', sans-serif; font-size: 22px; }
.ar-loot-item.gold b { color: #f5c518; } .ar-loot-item.red b { color: #e02424; }
.ar-result .ar-btn { min-width: 220px; padding: 12px 20px; font-size: 16px; }

@keyframes arPulse { 0%,100% { box-shadow: 0 0 14px rgba(224,36,36,.12) } 50% { box-shadow: 0 0 28px rgba(224,36,36,.35) } }
@keyframes arSlam { 0% { opacity: 0; transform: scale(1.25) } 65% { opacity: 1; transform: scale(.97) } 100% { transform: none } }
@keyframes arShake { 0%,100% { transform: none } 20% { transform: translateX(-7px) rotate(-2deg) } 40% { transform: translateX(6px) rotate(2deg) } 60% { transform: translateX(-4px) } 80% { transform: translateX(3px) } }
@keyframes arCrit { 0% { transform: none; filter: none } 15% { transform: scale(1.08) translateX(-10px) rotate(-4deg); filter: brightness(2.2) sepia(1) hue-rotate(-30deg) saturate(5) } 40% { transform: translateX(9px) rotate(3deg) } 70% { transform: translateX(-5px) } 100% { transform: none; filter: none } }
@keyframes arDodge { 0%,100% { transform: none; opacity: 1 } 40% { transform: translateX(22px) skewX(-8deg); opacity: .5 } }
@keyframes arLungeR { 50% { transform: translateX(18px) scale(1.04) } }
@keyframes arLungeL { 50% { transform: translateX(-18px) scale(1.04) } }
@keyframes arPop { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.6) } 25% { opacity: 1; transform: translate(-50%, -8px) scale(1.15) } 100% { opacity: 0; transform: translate(-50%, -34px) scale(1) } }
@keyframes arTick { from { opacity: 0; transform: translateY(-6px) } to { opacity: 1; transform: none } }

@media (max-width: 700px) {
  .ar-me { grid-template-columns: 1fr; }
  .ar-me-stats { justify-content: flex-start; }
  .ar-overlay { align-items: flex-start; padding: 10px 8px; }
  .ar-ring { padding: 14px 4px; gap: 6px; }
  .ar-vs { font-size: 24px; }
  .ar-row { grid-template-columns: 24px 1fr auto; padding: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .ar-page *, .ar-overlay *, .ar-sheet { animation: none !important; transition: none !important; }
}

/* ── Utmaningspaneler (inkommande / skickade) ── */
.ar-chpanels { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:16px; }
@media (max-width:760px) { .ar-chpanels { grid-template-columns:1fr; } }
.ar-chpanel { background:linear-gradient(180deg,#120e0c,#0a0908); border:1px solid var(--line); border-radius:6px; padding:12px; min-width:0; }
.ar-chpanel.in { border-top:2px solid var(--red); box-shadow:0 0 30px rgba(224,36,36,.08) inset; }
.ar-chpanel.out { border-top:2px solid var(--gold2); }
.ar-chpanel h2 { font-family:'Oswald',sans-serif; font-size:15px; letter-spacing:.18em; text-transform:uppercase; color:var(--gold); margin:0 0 10px; display:flex; align-items:center; gap:8px; }
.ar-chpanel.in h2 { color:#ff5a4a; }
.ar-count { margin-left:auto; min-width:24px; text-align:center; padding:1px 8px; border-radius:999px; background:rgba(0,0,0,.6); border:1px solid var(--line); color:var(--txt); font-size:12px; letter-spacing:0; }
.ar-chpanel.in .ar-count { background:var(--red2); border-color:#5c0707; color:#fff; }
.ar-chempty { color:var(--mut); font-size:13px; padding:14px 6px; text-align:center; border:1px dashed var(--line); border-radius:4px; }
.ar-chpanel .ar-challenge { flex-wrap:nowrap; margin-bottom:8px; padding:10px; }
.ar-ch-ava { width:42px; height:42px; flex-shrink:0; border-radius:4px; overflow:hidden; background:#000; border:1px solid var(--line); display:grid; place-items:center; font-size:22px; }
.ar-ch-ava img { width:100%; height:100%; object-fit:cover; }
.ar-chpanel .ar-ch-main { flex:1; min-width:0; }
.ar-chpanel .ar-ch-main b { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ar-ch-timer { font-variant-numeric:tabular-nums; font-weight:700; color:var(--txt); }
.ar-ch-timer.low { color:#ff5a4a; }
.ar-ch-bar { height:3px; background:rgba(255,255,255,.06); border-radius:2px; margin-top:6px; overflow:hidden; }
.ar-ch-bar i { display:block; height:100%; background:linear-gradient(90deg,var(--red2),var(--red),var(--gold)); transition:width 1s linear; }
.ar-chpanel .ar-ch-actions { flex-direction:column; align-items:stretch; gap:6px; flex-shrink:0; }
.ar-chpanel .ar-waiting { text-align:center; }
.ar-active { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:8px 10px; border-radius:3px; border:1px solid var(--gold2); background:rgba(245,197,24,.06); font-size:12px; font-weight:700; color:var(--gold); }
.ar-active.in { border-color:var(--red); background:rgba(224,36,36,.1); color:#ff8a7a; animation:arPulse 2s ease-in-out infinite; }
.ar-active span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-variant-numeric:tabular-nums; }
.ar-chpanel .ar-ch-tags { flex-wrap:wrap; gap:4px 10px; }
.ar-chpanel .ar-ch-tags span { white-space:nowrap; }
@media (max-width:420px) { .ar-chpanel .ar-ch-actions .ar-btn { padding:8px 10px; } .ar-chpanel .ar-waiting { font-size:11px; } }
