@import url("./shared.css");

.boss-layout {
  max-width: 980px;
  margin: 0 auto;
}

.module-load-error {
  max-width: 980px;
  margin: 0 auto 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: rgba(69, 10, 10, 0.55);
  color: #fecaca;
  font-size: 0.85rem;
  line-height: 1.45;
}

.event-header-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.event-portal-link {
  color: #c4b5fd !important;
}

.event-inactive-note {
  max-width: 980px;
  margin: 0 auto 12px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.65);
  font-size: 0.82rem;
  color: var(--muted);
}

.event-page .event-dragon-banner {
  background: linear-gradient(135deg, rgba(46, 16, 101, 0.45), rgba(15, 23, 42, 0.85));
  border-color: rgba(167, 139, 250, 0.35);
}

.event-shop {
  border-color: rgba(167, 139, 250, 0.3);
  background: linear-gradient(160deg, rgba(46, 16, 101, 0.35), rgba(15, 23, 42, 0.92));
}

.event-emblem-collection {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.event-emblem-chip .emblem-chip-label {
  font-size: 0.58rem;
  line-height: 1.2;
  text-align: center;
  color: #c4b5fd;
}

.event-emblem-chip.current {
  box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.55);
}

.boss-event-schedule {
  max-width: 980px;
  margin: 0 auto 10px;
  padding: 0 4px;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}

.boss-event-banner {
  max-width: 980px;
  margin: 0 auto 14px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--event-accent, #a78bfa) 45%, transparent);
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--event-accent, #a78bfa) 18%, #0f172a),
    rgba(15, 23, 42, 0.92)
  );
}

.boss-event-banner.void-event {
  box-shadow: 0 0 24px rgba(124, 58, 237, 0.2);
}

.boss-event-badge {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #0f172a;
  background: var(--event-accent, #a78bfa);
}

.boss-event-title {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
}

.boss-event-meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}

.shop-section-title.event-limited {
  color: var(--event-accent, #c4b5fd);
  border-top-color: color-mix(in srgb, var(--event-accent, #c4b5fd) 35%, transparent);
}

.shop-section-title.weekly-store {
  color: #fcd34d;
  border-top-color: rgba(252, 211, 77, 0.25);
}

.shop-section-title.weekly-owned {
  color: #86efac;
}

.shop-weekly-note {
  margin: -4px 0 10px;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
}

.shop-weekly-banner,
.weekly-store-banner .shop-weekly-banner {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(252, 211, 77, 0.35);
  background: rgba(69, 26, 3, 0.35);
  font-size: 0.8rem;
  line-height: 1.45;
  color: #fde68a;
}

.shop-weekly-banner strong {
  color: #fcd34d;
}

.shop-item.weekly-item {
  border-color: rgba(252, 211, 77, 0.28);
}

.shop-item.weekly-item.equipped {
  border-color: rgba(252, 211, 77, 0.65);
  box-shadow: 0 0 0 1px rgba(252, 211, 77, 0.25);
}

.shop-limited-note {
  margin: 0 0 6px;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.35;
}

.shop-item.limited-item {
  border-color: color-mix(in srgb, var(--event-accent, #a78bfa) 28%, transparent);
}

.shop-item.limited-item.equipped {
  border-color: var(--event-accent, #a78bfa);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--event-accent, #a78bfa) 35%, transparent);
}

.boss-lobby,
.boss-raid {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: 20px;
}

.hidden {
  display: none !important;
}

.boss-banner {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 22px;
  padding: 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.35), rgba(30, 27, 75, 0.5));
  border: 1px solid rgba(248, 113, 113, 0.35);
}

.boss-emblem-large {
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  color: #f97316;
  filter: drop-shadow(0 0 12px var(--emblem-glow, rgba(249, 115, 22, 0.45)));
}

.boss-emblem-large svg {
  width: 100%;
  height: 100%;
}

.boss-limited-edition {
  margin: 0 0 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fbbf24;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.boss-month {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.boss-banner h2 {
  margin: 0 0 6px;
  font-size: 1.5rem;
}

.boss-blurb {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.boss-gallery-link {
  color: #fb923c;
}

.lobby-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 18px;
  align-items: start;
}

.lobby-grid {
  display: grid;
  gap: 14px;
}

.boss-shop {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(251, 191, 36, 0.25);
  background: linear-gradient(160deg, rgba(69, 26, 3, 0.35), rgba(15, 23, 42, 0.9));
}

.shop-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}

.shop-header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.token-balance {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.token-balance strong {
  color: #fbbf24;
  font-size: 1rem;
}

.shop-note {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.shop-note strong {
  color: #fbbf24;
}

.emblem-collection-wrap {
  margin-bottom: 14px;
}

.emblem-collection-wrap h4 {
  margin: 0 0 8px;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}

.emblem-collection {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.emblem-chip {
  display: grid;
  gap: 2px;
  place-items: center;
  padding: 6px 4px;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: var(--surface-deep);
  opacity: 0.45;
}

.emblem-chip svg {
  width: 28px;
  height: 28px;
}

.emblem-chip span {
  font-size: 0.62rem;
  color: var(--muted);
}

.emblem-chip.unlocked {
  opacity: 1;
  cursor: pointer;
}

button.emblem-chip {
  margin: 0;
  font: inherit;
  color: inherit;
}

.emblem-chip.equipped {
  border-color: #34d399;
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.45);
}

.emblem-chip.current {
  border-color: #fbbf24;
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.35);
}

.emblem-chip.locked svg {
  filter: grayscale(0.85);
}

.shop-preview {
  display: grid;
  place-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--panel-border);
}

.preview-hero {
  position: relative;
  width: 56px;
  height: 56px;
}

.preview-body {
  position: absolute;
  inset: 10px 8px 8px;
  background: var(--hero-body);
  border-radius: 4px;
  z-index: 0;
}

.preview-emblem {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 22px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
  filter: drop-shadow(0 0 4px var(--emblem-glow, rgba(255, 255, 255, 0.35)));
}

.preview-emblem svg {
  display: block;
  width: 100%;
  height: 100%;
}

.preview-gun {
  position: absolute;
  right: -2px;
  top: 18px;
  width: 10px;
  height: 18px;
  background: var(--hero-gun);
  border-radius: 2px;
  box-shadow: 0 0 0 2px var(--hero-outline);
  z-index: 1;
}

.preview-hat {
  position: absolute;
  left: 50%;
  top: 2px;
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
}

.preview-hat-party-red {
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 16px solid #ef4444;
}

.preview-hat-party-red::before {
  content: '';
  position: absolute;
  left: -11px;
  top: 14px;
  width: 22px;
  height: 4px;
  background: #fca5a5;
  border-radius: 2px;
}

.preview-hat-party-red::after {
  content: '';
  position: absolute;
  left: -4px;
  top: -6px;
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
}

.preview-hat-crown-mini {
  width: 20px;
  height: 10px;
  background: linear-gradient(180deg, #fbbf24, #eab308);
  clip-path: polygon(0 100%, 15% 20%, 30% 100%, 50% 15%, 70% 100%, 85% 20%, 100% 100%);
}

.preview-hat-wizard-purple {
  width: 0;
  height: 0;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-bottom: 18px solid #7c3aed;
}

.preview-hat-wizard-purple::after {
  content: '';
  position: absolute;
  left: -12px;
  top: 16px;
  width: 24px;
  height: 4px;
  background: #c4b5fd;
  border-radius: 2px;
}

.preview-caption {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.shop-grid {
  display: grid;
  gap: 8px;
  max-height: 340px;
  overflow: auto;
}

.shop-section-title {
  margin: 10px 0 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(167, 139, 250, 0.25);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c4b5fd;
}

.shop-grid .shop-section-title.event-limited {
  color: var(--event-accent, #c4b5fd);
  border-top-color: color-mix(in srgb, var(--event-accent, #c4b5fd) 35%, transparent);
}

.shop-item.void-item {
  border-color: rgba(167, 139, 250, 0.2);
}

.shop-item.void-item.equipped {
  border-color: #a78bfa;
  box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.35);
}

.shop-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: var(--surface-deep);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.shop-item:hover:not(:disabled) {
  border-color: #fbbf24;
}

.shop-item.equipped {
  border-color: #4ade80;
  box-shadow: inset 0 0 0 1px rgba(74, 222, 128, 0.35);
}

.shop-item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.shop-swatch {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.shop-item-copy {
  display: grid;
  gap: 2px;
}

.shop-item-copy strong {
  font-size: 0.88rem;
}

.shop-item-copy span {
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: capitalize;
}

.shop-item-action {
  font-size: 0.72rem;
  color: #fbbf24;
  white-space: nowrap;
}

.shop-message {
  min-height: 1.2em;
  margin: 10px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.shop-message[data-state="ok"] {
  color: #86efac;
}

.shop-message[data-state="err"] {
  color: #fca5a5;
}

.lobby-field {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.lobby-field input {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: var(--surface-deep);
  color: var(--text);
  font: inherit;
}

.lobby-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text);
}

.party-list {
  margin: 0;
  padding: 12px 16px;
  list-style: none;
  border-radius: 12px;
  background: var(--surface-deep);
  border: 1px solid var(--panel-border);
  min-height: 80px;
}

.party-list li {
  padding: 6px 0;
  border-bottom: 1px solid rgba(45, 58, 79, 0.5);
  font-size: 0.92rem;
}

.party-list li:last-child {
  border-bottom: none;
}

.party-list em {
  color: #fbbf24;
  font-style: normal;
  font-size: 0.82rem;
}

.party-empty {
  color: var(--muted);
}

.lobby-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.lobby-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.lobby-actions button {
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: var(--surface-deep);
  color: var(--text);
  cursor: pointer;
  font: inherit;
}

.lobby-actions button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.lobby-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.friend-room-panel {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--panel-border);
}

.friend-room-panel h3 {
  margin: 0 0 6px;
  font-size: 0.92rem;
}

.friend-room-panel p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.82rem;
}

.friend-room-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.friend-room-row input {
  width: 88px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: var(--surface-deep);
  color: var(--text);
  font: inherit;
  text-transform: uppercase;
}

.friend-room-row button {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: var(--surface-deep);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.friend-room-status {
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: #93c5fd;
}

.raid-start {
  background: linear-gradient(135deg, #dc2626, #991b1b) !important;
  border-color: #ef4444 !important;
}

.raid-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

#raid-hud-text {
  font-size: 0.95rem;
  color: var(--text);
}

#back-lobby-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: var(--surface-deep);
  color: var(--text);
  cursor: pointer;
  font: inherit;
}

.raid-canvas-wrap {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--panel-border);
}

#raid-canvas {
  display: block;
  width: 100%;
  height: min(62vh, 540px);
  background: #1c1917;
}

.raid-controls {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

@media (max-width: 820px) {
  .lobby-columns {
    grid-template-columns: 1fr;
  }
}
