/* Watch page: a channel's stream inside the game UI. Builds on play.css (frames, fonts, chat, bags). */

.topnav .navlink { color: #cfc3a6; font: 400 .95rem var(--font-body); padding: 8px 10px; text-decoration: none; text-shadow: 0 1px 1px #000; border-radius: 6px; }
.topnav .navlink:hover { color: var(--wow-gold); background: rgba(255, 209, 0, .07); }

/* the stream */
.player-slot, .player-slot iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-slot .overlay-preview { color-scheme: normal; background: transparent; pointer-events: none; }
.offline { position: absolute; inset: auto 0 0; padding: 18px; text-align: center; color: var(--wow-text); background: linear-gradient(transparent, rgba(0, 0, 0, .82)); text-shadow: 0 1px 2px #000; }
.offline .off-title { font: 400 1.6rem/1.1 var(--font-display); color: var(--wow-gold); }
.offline.is-note { inset: 8px 8px auto auto; max-width: min(420px, 70%); padding: 8px 12px; text-align: left; font-size: .82rem; background: rgba(0, 0, 0, .7); border-left: 3px solid var(--wow-gold); }

.support-links { flex: none; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.claim-note { margin: -4px 4px 0; font-size: .86rem; color: #b8ac90; }
.claim-note b { color: var(--wow-gold); font-weight: 400; letter-spacing: .06em; }

/* names are units: click or right-click */
.unit { display: inline; padding: 0; margin: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; text-decoration: none; }
.unit:hover, .unit:focus-visible { text-decoration: underline; outline: none; }
.chatlog .unit { font-weight: 400; }
.cm.is-event .unit { color: #fff; }

/* boss card */
.bossrow { display: flex; gap: 12px; align-items: center; }
.bossrow .bb-skull { width: 46px; height: 46px; }
.bossrow .bb-name { font: 400 1.3rem/1 var(--font-display); color: var(--wow-gold); text-shadow: 0 2px 0 #000; }
.topdmg, .lb, .feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.topdmg li, .lb li { display: flex; align-items: center; gap: 8px; padding: 4px 6px; background: rgba(0, 0, 0, .35); }
.topdmg li b, .lb li b { margin-left: auto; font-weight: 400; color: #fff; font-variant-numeric: tabular-nums; }
.rank { flex: none; width: 22px; text-align: center; color: #a99d82; font-variant-numeric: tabular-nums; }
.lb .r1 { color: #ff8000; } .lb .r2 { color: #a335ee; } .lb .r3 { color: #3f9bff; }
.lb .class-icon { font-size: 20px; }

/* side tabs */
.wtabs { display: flex; gap: 4px; margin: -2px 0 8px; border-bottom: 1px solid rgba(255, 209, 0, .18); }
.wtab { background: none; border: 0; border-bottom: 3px solid transparent; color: #a99d82; font: 400 .98rem var(--font-body); padding: 6px 10px 7px; cursor: pointer; }
.wtab[aria-selected="true"] { color: var(--wow-gold); border-bottom-color: var(--wow-gold); }
.lb-by { display: flex; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; }
.lb-by button { background: rgba(0, 0, 0, .4); border: 1px solid rgba(255, 209, 0, .18); color: #cfc3a6; font: 400 .8rem var(--font-body); padding: 4px 10px; cursor: pointer; }
.lb-by button[aria-pressed="true"] { color: var(--wow-gold); border-color: var(--wow-gold); background: rgba(255, 209, 0, .08); }
.feed li { padding: 5px 6px; font-size: .88rem; background: rgba(0, 0, 0, .3); color: #e6e0d0; }
.feed li small { color: #a99d82; }
.feed a { text-decoration: none; }

.me { margin-top: 0; }
.me-guest { display: grid; gap: 10px; justify-items: start; }

/* chat gate (sign in / connect chat) */
.chat-gate { padding: 10px 2px 2px; border-top: 1px solid rgba(255, 255, 255, .12); display: grid; gap: 8px; justify-items: start; color: #cfc3a6; }

/* unit menu: the game's right-click dropdown */
.unitmenu {
  position: fixed; z-index: 95; min-width: 170px; padding: 4px 4px 6px;
  border: 8px solid transparent; border-image: url('/assets/textures/nine_tooltip.png') 16 / 8px stretch;
  background: rgba(4, 6, 12, .97); background-clip: padding-box; box-shadow: 0 12px 30px rgba(0, 0, 0, .7);
}
.um-name { padding: 2px 8px 4px; color: var(--wow-gold); font-size: 1rem; border-bottom: 1px solid rgba(255, 255, 255, .1); margin-bottom: 3px; }
.unitmenu button { display: block; width: 100%; padding: 6px 8px; text-align: left; background: none; border: 0; color: #fff; font: 400 .92rem var(--font-body); cursor: pointer; }
.unitmenu button:hover, .unitmenu button:focus-visible { background: rgba(64, 199, 235, .18); outline: none; }
.unitmenu button[disabled] { color: #6b6b6b; cursor: default; background: none; }

/* incoming duel: like the game's duel request */
.duel-ask {
  position: fixed; z-index: 96; left: 50%; top: 84px; transform: translateX(-50%); width: min(380px, calc(100vw - 24px)); padding: 6px 10px 10px; text-align: center;
  border: 14px solid transparent; border-image: url('/assets/textures/nine_gold.png') 32 / 14px stretch;
  background: linear-gradient(rgba(10, 9, 7, .8), rgba(6, 6, 5, .92)), url('/assets/textures/marble.png') 0 0 / 256px; background-clip: padding-box;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .75); animation: ask-in .35s cubic-bezier(.3, 1.4, .5, 1);
}
.duel-ask p { color: #fff; font-size: 1.05rem; }
.duel-ask p b { color: var(--wow-gold); font-weight: 400; }
.duel-ask .cluster { justify-content: center; margin-top: 8px; }
.da-timer { display: block; height: 4px; margin: 8px 0 2px; background: rgba(0, 0, 0, .6); }
.da-timer i { display: block; height: 100%; background: linear-gradient(90deg, #ff4a3d, var(--wow-gold)); transform-origin: 0 50%; }
@keyframes ask-in { from { opacity: 0; transform: translateX(-50%) translateY(-16px) scale(.95); } }

/* the duel, played out over the stream for everyone watching */
.duel-arena {
  position: absolute; left: 50%; top: 50%; z-index: 5; width: min(560px, 92%); transform: translate(-50%, -50%); padding: 6px 10px 10px;
  border: 14px solid transparent; border-image: url('/assets/textures/nine_gold.png') 32 / 14px stretch;
  background: linear-gradient(rgba(10, 9, 7, .82), rgba(6, 6, 5, .94)), url('/assets/textures/marble.png') 0 0 / 256px; background-clip: padding-box;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .8); animation: ask-in .4s cubic-bezier(.3, 1.4, .5, 1);
}
.ar-x { position: absolute; top: -6px; right: -4px; width: 32px; height: 32px; border: 0; background: none; color: #b8ac90; font-size: 1.4rem; cursor: pointer; }
.ar-title { text-align: center; font: 400 1.5rem/1 var(--font-display); color: var(--wow-gold); text-shadow: 0 2px 0 #000; }
.ar-fighters { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 8px 0; }
.ar-vs { font: 400 1.6rem/1 var(--font-display); color: #ff4a3d; text-shadow: 0 2px 0 #000; }
.fighter { position: relative; display: flex; align-items: center; gap: 8px; min-width: 0; }
.f-b { flex-direction: row-reverse; text-align: right; }
.fighter .pp-crest { width: 44px; height: 44px; font-size: 34px; }
.f-main { flex: 1; min-width: 0; }
.f-name { color: #fff; font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-sub { color: #a99d82; font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-hp { position: relative; height: 14px; margin-top: 3px; background: #14070c; border: 1px solid #000; }
.f-hp i { position: absolute; inset: 0; background: linear-gradient(180deg, #5dff6a, #1b9b2c); transform-origin: 0 50%; transition: transform .2s; }
.f-b .f-hp i { transform-origin: 100% 50%; }
.f-hp span { position: absolute; inset: 0; display: grid; place-items: center; font-size: .66rem; color: #fff; text-shadow: 0 1px 1px #000; }
.f-float { position: absolute; left: 50%; top: -6px; font: 400 1.35rem/1 var(--font-display); text-shadow: 0 2px 0 #000, 0 0 4px #000; opacity: 0; pointer-events: none; }
.f-float.dmg { color: #fff; } .f-float.crit { color: #ffd84d; font-size: 1.7rem; } .f-float.heal { color: #3dff3d; } .f-float.miss { color: #bbb; }
.f-float.is-on { animation: float-up .9s ease-out; }
@keyframes float-up { 0% { opacity: 0; transform: translate(-50%, 6px) scale(.7); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -26px) scale(1); } }
.fighter.is-winner .pp-crest { box-shadow: 0 0 0 2px #000, 0 0 18px 4px rgba(255, 209, 0, .7); }
.ar-log { list-style: none; margin: 0; padding: 0; min-height: 7.5em; display: grid; align-content: start; gap: 2px; font-size: .84rem; color: #e6e0d0; }
.ar-log li:first-child { color: #fff; }
.ar-log li:nth-child(n+4) { opacity: .55; }
.ar-result { margin-top: 6px; text-align: center; font: 400 1.8rem/1 var(--font-display); color: var(--wow-gold); text-shadow: 0 2px 0 #000; animation: ask-in .4s ease-out; }

/* inspect */
dialog.inspect { width: min(560px, calc(100% - 24px)); }
.ins-head { display: flex; align-items: center; gap: 12px; margin: 4px 0 10px; }
.ins-head .pp-crest { width: 56px; height: 56px; font-size: 44px; }
.ins-head h2 { margin: 0 !important; }
.ins-sub { color: #cfc3a6 !important; font-size: .92rem; }
.ins-sub b { color: var(--wow-gold); font-weight: 400; }
.ins-gear { display: grid; gap: 6px; margin-top: 12px; }
.ins-slot { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ins-slot > span:last-child { display: grid; min-width: 0; }
.ins-slot a { text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ins-slot small { color: #a99d82; font-size: .76rem; }
.ins-actions { margin-top: 14px; }

.notfound { padding: 80px 16px; }

@media (max-width: 1099px) { .support-links { justify-content: flex-start; } }
@media (max-width: 760px) {
  .support-links { width: 100%; padding: 0 0 4px; }
  .claim-note { margin: 0 12px; }
  .me, .me-guest { margin: 0 6px; }
  .ar-fighters { grid-template-columns: 1fr; }
  .ar-vs { text-align: center; }
  .f-b { flex-direction: row; text-align: left; }
  .duel-arena { width: 96%; padding: 4px 6px 6px; }
  .ar-log { min-height: 4.5em; }
}

/* profile and item pages */
.page-narrow { width: min(760px, 100%); margin: 0 auto; padding: 24px 16px 40px; }
.profile { display: grid; gap: 14px; }
.prof-name { font: 400 2.2rem/1 var(--font-display); color: var(--wow-gold); text-shadow: 0 2px 0 #000; }
.prof-recent { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.prof-recent .item-tip { width: 100%; }
.item-page { display: grid; justify-items: center; gap: 14px; padding: 40px 0; }
.item-page .item-tip { width: min(100%, 380px); }
.item-owner { color: #cfc3a6; }
.item-owner a { color: #40c7eb; }

/* boss bar (the game's boss frame, compact) */
.bb-skull {
  position: relative; width: 46px; height: 46px; flex: none; border-radius: 50%;
  background: radial-gradient(circle at 50% 32%, #33202c, #0b0710 70%); border: 2px solid #c9a25b; box-shadow: 0 0 0 3px rgba(201, 162, 91, .16), inset 0 0 10px #000;
}
.bb-skull::before {
  content: ''; position: absolute; inset: 8px; background: #efe2c4;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M5 16c3-4 7-6 11-6s7 2 9 6c-2 4-5 6-9 6s-8-2-11-6zm4 0c2 2 4 3 7 3V13c-3 0-5 1-7 3z'/%3E%3Cpath d='M2 12l4 4-4 4zM12 9v-4M15 9V5M12 23v4M15 23v4' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M5 16c3-4 7-6 11-6s7 2 9 6c-2 4-5 6-9 6s-8-2-11-6zm4 0c2 2 4 3 7 3V13c-3 0-5 1-7 3z'/%3E%3Cpath d='M2 12l4 4-4 4zM12 9v-4M15 9V5M12 23v4M15 23v4' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.bb-main { flex: 1; min-width: 0; }
.bb-top { display: flex; align-items: baseline; gap: 8px; }
.bb-tier { font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: #ff8a6a; border: 1px solid rgba(255, 138, 106, .5); padding: 1px 6px; }
.bb-pct { margin-left: auto; color: #fff; font-variant-numeric: tabular-nums; }
.bb-hp { position: relative; height: 18px; margin-top: 5px; background: #14070c; border: 1px solid #000; overflow: hidden; box-shadow: inset 0 2px 5px rgba(0, 0, 0, .7); }
.bb-fill { position: absolute; inset: 0; transform-origin: 0 50%; background: linear-gradient(180deg, #ff7a68, #d22f22 50%, #8e1510); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4); transition: transform .5s ease-out; }
.bb-ticks { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(25% - 1px), rgba(0, 0, 0, .55) calc(25% - 1px) 25%); }
.bb-hptext { position: absolute; inset: 0; display: grid; place-items: center; font-size: .78rem; color: #fff; text-shadow: 0 1px 2px #000, 0 0 3px #000; font-variant-numeric: tabular-nums; }
.bb-rage { height: 5px; margin-top: 3px; background: rgba(0, 0, 0, .55); overflow: hidden; }
.bb-rage i { display: block; height: 100%; background: linear-gradient(90deg, #ffb347, #ff4f2e); transform-origin: 0 50%; transition: transform .3s; }
.bb-goal { margin-top: 4px; font-size: .84rem; color: #cfc3a6; }
.boss-card .bp-label { margin-top: 12px; }
.inspect .bp-stats, .profile .bp-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 560px) { .inspect .bp-stats, .profile .bp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* one column: chat right under the stream, like the Twitch app */
@media (max-width: 1099px) {
  .watchpage .watch { display: flex; flex-direction: column; }
  .watchpage .stage { display: contents; }
  .watchpage .player { order: 1; }
  .watchpage .stream-info { order: 2; }
  .watchpage .claim-note { order: 3; }
  .watchpage .chatcol { order: 4; height: 340px; }
  .watchpage .below { order: 5; }
  .watchpage .me, .watchpage .me-guest { order: 6; }
}
