/* =============================================================================
   Lumina OS — Feature Suite CSS
   Image bubbles · Trade widget · Duel Clash Wheel · Clan system
   Design language: VisionOS glass · Linear density · spring micro-interactions
   ============================================================================= */

/* ── Shared glass token ──────────────────────────────────────────────────── */
.lf-glass {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

/* ── Rarity color tokens ─────────────────────────────────────────────────── */
:root {
  --tier-common:    #9ca3af;
  --tier-uncommon:  #22c55e;
  --tier-rare:      #60a5fa;
  --tier-epic:      #a855f7;
  --tier-legendary: #f59e0b;
  --tier-mythic:    #ff008a;
}

/* ═══════════════════════════════════════════════════════════════════════════
   1. IMAGE BUBBLE
   ═══════════════════════════════════════════════════════════════════════════ */
.lc-bubble--image {
  padding: 0;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  overflow: hidden;
  border-radius: 18px;
}
.lc-image-bubble {
  display: block;
  max-width: 260px;
  max-height: 300px;
  min-width: 140px;
  border-radius: 16px;
  object-fit: cover;
  cursor: zoom-in;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
  transition: transform 250ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 250ms;
}
.lc-image-bubble:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}
.lc-image-bubble.is-loading {
  width: 200px;
  height: 140px;
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: lf-shimmer 1.4s ease-in-out infinite;
}
@keyframes lf-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Image lightbox */
.lf-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99000;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  animation: lf-lightbox-in 200ms ease both;
}
@keyframes lf-lightbox-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.lf-lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
  animation: lf-img-in 280ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes lf-img-in {
  from { transform: scale(0.88); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   2. INTERACTIVE TRADE CARD
   ═══════════════════════════════════════════════════════════════════════════ */
.lc-bubble--trade {
  padding: 0;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  max-width: 380px;
  width: 100%;
}
.lf-trade-card {
  background: rgba(14, 14, 14, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: lf-card-in 320ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes lf-card-in {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.lf-trade-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.lf-trade-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  font-family: 'JetBrains Mono', monospace;
}
.lf-trade-title .material-symbols-outlined {
  font-size: 16px;
  color: #a855f7;
}
.lf-trade-status-pill {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
}
.lf-trade-status-pill[data-status="pending"] {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.25);
}
.lf-trade-status-pill[data-status="accepted"] {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.25);
}
.lf-trade-status-pill[data-status="declined"],
.lf-trade-status-pill[data-status="cancelled"] {
  background: rgba(248, 113, 113, 0.12);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.22);
}

/* Two-column trade layout */
.lf-trade-body {
  display: grid;
  grid-template-columns: 1fr 40px 1fr;
  align-items: start;
  padding: 14px 12px 12px;
  gap: 8px;
}
.lf-trade-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lf-trade-side-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  font-family: 'JetBrains Mono', monospace;
  padding: 0 2px;
}
.lf-trade-items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}
.lf-trade-item {
  aspect-ratio: 1;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: border-color 200ms, transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}
.lf-trade-item--empty {
  color: rgba(255, 255, 255, 0.12);
  font-size: 16px !important;
}
.lf-trade-item:not(.lf-trade-item--empty):hover {
  transform: scale(1.06);
  border-color: rgba(168, 85, 247, 0.3);
}
.lf-trade-item-tier-dot {
  position: absolute;
  bottom: 3px;
  right: 3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

/* Divider arrow */
.lf-trade-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding-top: 22px;
}
.lf-trade-divider .material-symbols-outlined {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.25);
}

/* Lock buttons */
.lf-trade-lock-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background 200ms, border-color 200ms, color 200ms, transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.06em;
}
.lf-trade-lock-btn:hover {
  background: rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.25);
  color: #a855f7;
  transform: scale(1.02);
}
.lf-trade-lock-btn.is-locked {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
  color: #22c55e;
}
.lf-trade-lock-btn .material-symbols-outlined {
  font-size: 14px;
}

/* Execute button */
.lf-trade-footer {
  padding: 0 12px 14px;
}
.lf-trade-execute-btn {
  width: 100%;
  height: 44px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4);
  transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 200ms, filter 200ms;
}
.lf-trade-execute-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 28px rgba(168, 85, 247, 0.55);
}
.lf-trade-execute-btn:active {
  transform: scale(0.97);
}
.lf-trade-execute-btn:disabled {
  opacity: 0.35;
  cursor: default;
  transform: none;
  box-shadow: none;
}
.lf-trade-execute-btn .material-symbols-outlined {
  font-size: 18px;
}

/* Decline button */
.lf-trade-decline-btn {
  width: 100%;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(248, 113, 113, 0.2);
  background: transparent;
  color: rgba(248, 113, 113, 0.7);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
  transition: background 200ms, color 200ms;
}
.lf-trade-decline-btn:hover {
  background: rgba(248, 113, 113, 0.08);
  color: #f87171;
}

/* ═══════════════════════════════════════════════════════════════════════════
   3. DUEL CLASH WHEEL WIDGET
   ═══════════════════════════════════════════════════════════════════════════ */
.lc-bubble--duel {
  padding: 0;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  max-width: 340px;
  width: 100%;
}
.lf-duel-card {
  background: rgba(8, 8, 8, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 12px 60px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
}
.lf-duel-card.is-vibrating {
  animation: lf-vibrate 80ms ease-in-out;
}
@keyframes lf-vibrate {
  0%   { transform: translateX(0) rotate(0); }
  20%  { transform: translateX(-2px) rotate(-0.4deg); }
  40%  { transform: translateX(2px)  rotate(0.4deg); }
  60%  { transform: translateX(-1.5px) rotate(-0.3deg); }
  80%  { transform: translateX(1.5px)  rotate(0.3deg); }
  100% { transform: translateX(0) rotate(0); }
}
.lf-duel-bg-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 30% 50%, rgba(255, 0, 138, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 70% 50% at 70% 50%, rgba(96, 165, 250, 0.07) 0%, transparent 60%);
  filter: blur(30px);
  z-index: 0;
}

/* Header */
.lf-duel-header {
  position: relative;
  z-index: 1;
  padding: 12px 16px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.lf-duel-header-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  font-family: 'JetBrains Mono', monospace;
}
.lf-duel-header-title .material-symbols-outlined {
  font-size: 16px;
  color: #ff008a;
}
.lf-duel-wager {
  font-size: 11px;
  font-weight: 700;
  color: #f59e0b;
  font-family: 'JetBrains Mono', monospace;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.2);
  padding: 3px 9px;
  border-radius: 999px;
}

/* Combatants + Wheel layout */
.lf-duel-arena {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 140px 1fr;
  align-items: center;
  padding: 16px 12px 12px;
  gap: 8px;
}

/* Player card */
.lf-duel-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: opacity 600ms ease;
}
.lf-duel-player.is-loser {
  opacity: 0.2;
}
.lf-duel-player-av {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  position: relative;
  transition: border-color 400ms, box-shadow 400ms;
}
.lf-duel-player-av.is-winner {
  border-color: rgba(34, 197, 94, 0.6);
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.35);
}
.lf-duel-player-name {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80px;
}
.lf-duel-player-tier {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
  padding: 2px 7px;
  border-radius: 999px;
}
.lf-duel-player-prob {
  font-size: 18px;
  font-weight: 800;
  font-family: 'Hanken Grotesk', Inter, sans-serif;
}
.lf-duel-player.is-loser .lf-duel-player-av {
  filter: grayscale(1);
}
.lf-duel-loser-strike {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  border: none;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 400ms;
}
.lf-duel-player.is-loser .lf-duel-loser-strike {
  opacity: 1;
}

/* SVG Fate Wheel */
.lf-duel-wheel-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
}
.lf-duel-svg {
  display: block;
  width: 120px;
  height: 120px;
  transform: rotate(-90deg);
}
.lf-duel-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 12;
}
.lf-duel-ring-a {
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 0 283;
  transition: stroke-dasharray 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.lf-duel-ring-b {
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 0 283;
  transition: stroke-dasharray 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s;
}
/* Bead indicator orbiting the ring */
.lf-duel-bead {
  position: absolute;
  top: 0;
  left: 0;
  width: 120px;
  height: 120px;
  pointer-events: none;
}
.lf-duel-bead-dot {
  fill: #fff;
  filter: drop-shadow(0 0 5px #fff);
  transform-origin: 60px 60px;
}

/* Winning pulse on ring segment */
.lf-duel-ring-a.is-winner-pulse,
.lf-duel-ring-b.is-winner-pulse {
  animation: lf-ring-pulse 0.5s ease-in-out 3;
}
@keyframes lf-ring-pulse {
  0%, 100% { opacity: 1; filter: none; }
  50%       { opacity: 0.7; filter: brightness(1.6) drop-shadow(0 0 8px currentColor); }
}

/* Center text overlay */
.lf-duel-center-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}
.lf-duel-center-vs {
  font-size: 14px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.5);
  font-family: 'Hanken Grotesk', Inter, sans-serif;
  letter-spacing: 0.1em;
}
.lf-duel-center-result {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
  margin-top: 2px;
}

/* Duel action buttons */
.lf-duel-actions {
  position: relative;
  z-index: 1;
  padding: 4px 12px 14px;
  display: flex;
  gap: 8px;
}
.lf-duel-accept-btn {
  flex: 1;
  height: 42px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #ff008a, #c600ff);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 20px rgba(255, 0, 138, 0.4);
  transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 200ms;
  letter-spacing: 0.04em;
  font-family: 'JetBrains Mono', monospace;
}
.lf-duel-accept-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 28px rgba(255, 0, 138, 0.55);
}
.lf-duel-decline-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(248, 113, 113, 0.2);
  background: transparent;
  color: rgba(248, 113, 113, 0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 200ms, color 200ms;
}
.lf-duel-decline-btn:hover {
  background: rgba(248, 113, 113, 0.08);
  color: #f87171;
}

/* Duel status states */
.lf-duel-card[data-status="active"] .lf-duel-actions,
.lf-duel-card[data-status="completed"] .lf-duel-actions,
.lf-duel-card[data-status="declined"] .lf-duel-actions {
  display: none;
}
.lf-duel-card[data-status="completed"] .lf-duel-ring-a,
.lf-duel-card[data-status="completed"] .lf-duel-ring-b {
  transition: none;
}

/* Confetti canvas overlay */
.lf-confetti-canvas {
  position: absolute;
  inset: 0;
  border-radius: 22px;
  pointer-events: none;
  z-index: 10;
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════════════════
   4. CLAN / SYNDICATE CREATION MODAL
   ═══════════════════════════════════════════════════════════════════════════ */
.lf-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 98000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: lf-overlay-in 200ms ease both;
}
@keyframes lf-overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.lf-modal-overlay.is-closing {
  animation: lf-overlay-out 180ms ease both;
}
@keyframes lf-overlay-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}
.lf-modal {
  background: rgba(14, 14, 14, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: lf-modal-in 320ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes lf-modal-in {
  from { opacity: 0; transform: translateY(24px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.lf-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.lf-modal-title {
  font-family: 'Hanken Grotesk', Inter, sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.lf-modal-subtitle {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 2px;
}
.lf-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 200ms, color 200ms, transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}
.lf-modal-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transform: scale(1.08) rotate(90deg);
}
.lf-modal-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Cost gate banner */
.lf-cost-gate {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(168, 85, 247, 0.06) 100%);
  border: 1px solid rgba(245, 158, 11, 0.2);
}
.lf-cost-gate-icon {
  font-size: 24px;
  flex-shrink: 0;
}
.lf-cost-gate-text {
  flex: 1;
  min-width: 0;
}
.lf-cost-gate-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}
.lf-cost-gate-amount {
  font-size: 18px;
  font-weight: 800;
  color: #f59e0b;
  font-family: 'Hanken Grotesk', Inter, sans-serif;
}
.lf-cost-gate-bal {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
}

/* Avatar + emoji picker row */
.lf-clan-avatar-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.lf-clan-avatar-picker {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 2px dashed rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 200ms, background 200ms, transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}
.lf-clan-avatar-picker:hover {
  border-color: rgba(168, 85, 247, 0.4);
  background: rgba(168, 85, 247, 0.06);
  transform: scale(1.04);
}
.lf-clan-avatar-picker input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.lf-clan-color-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.lf-color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1), border-color 200ms;
}
.lf-color-swatch:hover { transform: scale(1.12); }
.lf-color-swatch.is-active { border-color: #fff; transform: scale(1.1); }

/* Form fields */
.lf-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lf-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.lf-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  font-family: 'JetBrains Mono', monospace;
}
.lf-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  outline: none;
  transition: border-color 200ms, box-shadow 200ms;
  font-family: inherit;
}
.lf-input:focus {
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.2);
}
.lf-input::placeholder { color: rgba(255, 255, 255, 0.2); }
.lf-textarea {
  height: auto;
  min-height: 76px;
  padding: 12px 14px;
  resize: none;
  line-height: 1.5;
}
.lf-input-hint {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.25);
  margin-top: 2px;
}

/* Privacy toggle */
.lf-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.lf-toggle-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lf-toggle-label-main {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}
.lf-toggle-label-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
}
.lf-toggle {
  position: relative;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}
.lf-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.lf-toggle-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  transition: background 200ms;
  cursor: pointer;
}
.lf-toggle input:checked + .lf-toggle-track {
  background: linear-gradient(135deg, #a855f7, #ec4899);
}
.lf-toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.lf-toggle input:checked + .lf-toggle-track::after {
  transform: translateX(20px);
}

/* Emoji picker mini-grid */
.lf-emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
}
.lf-emoji-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.04);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1), background 200ms;
}
.lf-emoji-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: scale(1.15);
}

/* Modal footer */
.lf-modal-footer {
  padding: 0 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lf-modal-error {
  font-size: 12px;
  color: #f87171;
  text-align: center;
  min-height: 16px;
  font-family: 'JetBrains Mono', monospace;
}
.lf-btn-primary {
  width: 100%;
  height: 50px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.03em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 24px rgba(168, 85, 247, 0.4);
  transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 200ms;
}
.lf-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(168, 85, 247, 0.55);
}
.lf-btn-primary:disabled {
  opacity: 0.4;
  cursor: default;
  transform: none;
}
.lf-btn-primary.is-loading {
  pointer-events: none;
}
.lf-btn-primary .material-symbols-outlined { font-size: 18px; }

/* ═══════════════════════════════════════════════════════════════════════════
   5. CLAN MODULE PAGE (inside lcModuleHost)
   ═══════════════════════════════════════════════════════════════════════════ */
.lf-clan-module {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 24px 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.lf-clan-module-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.lf-clan-module-title {
  font-family: 'Hanken Grotesk', Inter, sans-serif;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.lf-clan-module-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 2px;
}
.lf-btn-create-clan {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: 12px;
  border: 1px solid rgba(168, 85, 247, 0.3);
  background: rgba(168, 85, 247, 0.1);
  color: #a855f7;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 200ms, border-color 200ms, transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 200ms;
}
.lf-btn-create-clan:hover {
  background: rgba(168, 85, 247, 0.18);
  border-color: rgba(168, 85, 247, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.25);
}
.lf-btn-create-clan .material-symbols-outlined { font-size: 17px; }

/* My clan card */
.lf-my-clan-card {
  padding: 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  animation: lf-card-in 280ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.lf-my-clan-av {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
}
.lf-my-clan-name {
  font-size: 18px;
  font-weight: 800;
  font-family: 'Hanken Grotesk', Inter, sans-serif;
  letter-spacing: -0.01em;
}
.lf-my-clan-tag {
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 2px;
}
.lf-my-clan-stats {
  display: flex;
  gap: 20px;
}
.lf-clan-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.lf-clan-stat-val {
  font-size: 18px;
  font-weight: 800;
  font-family: 'Hanken Grotesk', Inter, sans-serif;
}
.lf-clan-stat-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
}

/* Clan member list */
.lf-member-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lf-member-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  transition: background 150ms;
}
.lf-member-row:hover {
  background: rgba(255, 255, 255, 0.03);
}
.lf-member-av {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.lf-member-name {
  font-size: 13px;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lf-member-joined {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  white-space: nowrap;
}
.lf-role-badge {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
  flex-shrink: 0;
}
.lf-role-badge[data-role="leader"]  { background: rgba(255,0,138,0.15);   color: #ff008a; border: 1px solid rgba(255,0,138,0.25); }
.lf-role-badge[data-role="deputy"]  { background: rgba(168,85,247,0.15);  color: #a855f7; border: 1px solid rgba(168,85,247,0.25); }
.lf-role-badge[data-role="veteran"] { background: rgba(245,158,11,0.15);  color: #f59e0b; border: 1px solid rgba(245,158,11,0.25); }
.lf-role-badge[data-role="member"]  { background: rgba(96,165,250,0.1);   color: #60a5fa; border: 1px solid rgba(96,165,250,0.18); }

/* Role dropdown */
.lf-role-select {
  height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  outline: none;
  cursor: pointer;
}
.lf-role-select:focus {
  border-color: rgba(168, 85, 247, 0.35);
}

/* Clan explore grid */
.lf-clan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.lf-clan-card {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: background 200ms, border-color 200ms, transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 200ms;
  animation: lf-card-in 280ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.lf-clan-card:hover {
  background: rgba(168, 85, 247, 0.05);
  border-color: rgba(168, 85, 247, 0.18);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}
.lf-clan-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.lf-clan-card-av {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.lf-clan-card-name {
  font-size: 14px;
  font-weight: 800;
  font-family: 'Hanken Grotesk', Inter, sans-serif;
}
.lf-clan-card-tag {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  font-family: 'JetBrains Mono', monospace;
}
.lf-clan-card-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}
.lf-clan-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  font-family: 'JetBrains Mono', monospace;
}

/* Section title */
.lf-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 10px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   6. RIGHT PANEL — CLAN DASHBOARD VIEW
   ═══════════════════════════════════════════════════════════════════════════ */
.lf-clan-panel {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.lf-clan-panel-hero {
  text-align: center;
  padding: 16px 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.lf-clan-panel-av {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.lf-clan-panel-name {
  font-size: 16px;
  font-weight: 800;
  font-family: 'Hanken Grotesk', Inter, sans-serif;
}
.lf-clan-panel-tag {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  font-family: 'JetBrains Mono', monospace;
  margin-top: 2px;
}
.lf-clan-panel-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.5;
  margin-top: 8px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   7. COMPOSE BAR WIDGET BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */
.lf-compose-widget-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 200ms, color 200ms, border-color 200ms, transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}
.lf-compose-widget-btn:hover {
  background: rgba(168, 85, 247, 0.1);
  color: #a855f7;
  border-color: rgba(168, 85, 247, 0.25);
  transform: scale(1.08);
}
.lf-compose-widget-btn .material-symbols-outlined {
  font-size: 17px;
}
.lf-compose-separator {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  margin: 0 2px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   8. WIDGET COMPOSER POPOVERS (Trade / Duel initiation)
   ═══════════════════════════════════════════════════════════════════════════ */
.lf-popover {
  position: absolute;
  bottom: calc(100% + 12px);
  right: 0;
  width: 300px;
  background: rgba(14, 14, 14, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.7);
  z-index: 500;
  animation: lf-pop-in 220ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
  overflow: hidden;
}
@keyframes lf-pop-in {
  from { opacity: 0; transform: translateY(10px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.lf-popover-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.lf-popover-title {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
}
.lf-popover-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lf-popover-close {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: background 150ms, transform 150ms;
}
.lf-popover-close:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(90deg);
}
.lf-popover-footer {
  padding: 0 16px 14px;
}
.lf-poxy-slot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.lf-poxy-slot {
  aspect-ratio: 1;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: border-color 150ms, background 150ms, transform 150ms;
}
.lf-poxy-slot:hover {
  background: rgba(168, 85, 247, 0.08);
  border-color: rgba(168, 85, 247, 0.25);
  transform: scale(1.06);
}
.lf-poxy-slot.is-selected {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.3);
}
