/* ============================================================
   Clan Challenge — Labor Tech Factory shell (v3)
   ============================================================ */

:root {
  --cc-accent: #5b9cff;
  --cc-accent-hi: #8ec0ff;
  --cc-accent-2: #3dd6c8;
  --cc-panel: #070e18;
  --cc-panel-2: rgba(10, 18, 30, 0.92);
  --cc-line: rgba(66, 135, 245, 0.3);
  --cc-text: #e8f4ff;
  --cc-muted: rgba(170, 192, 214, 0.78);
  --cc-ok: #5ee0a0;
  --cc-bad: #ff7a85;
  --cc-gold: #e8b86a;
  --cc-font-display: "Orbitron", sans-serif;
  --cc-font-ui: "Barlow", sans-serif;
  --cc-radius: 16px;
  --cc-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
}

/* Standalone full-page only (not when embedded in /clan/challenge) */
body:has(> .cc-stage:not(.cc-embedded)) {
  height: 100%;
  overflow: hidden;
  font-family: var(--cc-font-ui);
  font-weight: 600;
  color: var(--cc-text);
  background: #03070e;
}

.cc-stage,
.cc-overlay {
  font-family: var(--cc-font-ui);
  font-weight: 600;
  color: var(--cc-text);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* ---------- Stage (page atmosphere) ---------- */

.cc-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  overflow: hidden;
  isolation: isolate;
}

/* Full-page stage only when not embedded */
body > .cc-stage:not(.cc-embedded) {
  height: 100vh;
  height: 100dvh;
}

.cc-stage__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

.cc-stage__glow--a {
  width: min(70vw, 720px);
  height: min(70vw, 720px);
  top: -12%;
  left: -8%;
  background: rgba(91, 156, 255, 0.22);
  animation: ccDrift 14s ease-in-out infinite alternate;
}

.cc-stage__glow--b {
  width: min(55vw, 520px);
  height: min(55vw, 520px);
  right: -6%;
  bottom: -10%;
  background: rgba(61, 214, 200, 0.14);
  animation: ccDrift 18s ease-in-out infinite alternate-reverse;
}

.cc-stage__grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(91, 156, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 156, 255, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%);
}

/* ---------- Modal shell ---------- */

.cc-modal {
  position: relative;
  z-index: 2;
  width: min(1080px, 100%);
  height: calc(100vh - 20px);
  height: calc(100dvh - 20px);
  max-height: calc(100dvh - 20px);
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 55% at 8% -5%, rgba(91, 156, 255, 0.2), transparent 50%),
    radial-gradient(ellipse 70% 45% at 100% 0%, rgba(61, 214, 200, 0.1), transparent 48%),
    linear-gradient(180deg, rgba(14, 24, 40, 0.98), var(--cc-panel));
  border: 1px solid rgba(126, 179, 255, 0.28);
  box-shadow:
    var(--cc-shadow),
    0 0 0 1px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: ccIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cc-shine {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, transparent 26%),
    linear-gradient(105deg, transparent 40%, rgba(91, 156, 255, 0.04) 50%, transparent 60%);
  z-index: 0;
}

.cc-modal > *:not(.cc-shine):not(.cc-frame) {
  position: relative;
  z-index: 1;
}

/* Tech corner brackets */
.cc-frame {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 3;
}

.cc-frame__c {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(91, 156, 255, 0.55);
}

.cc-frame__c--tl { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.cc-frame__c--tr { top: 10px; right: 10px; border-left: 0; border-bottom: 0; }
.cc-frame__c--bl { bottom: 10px; left: 10px; border-right: 0; border-top: 0; }
.cc-frame__c--br { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }

/* ---------- Header ---------- */

.cc-head {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
  flex-shrink: 0;
}

.cc-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.cc-brand__mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  background:
    radial-gradient(circle at 35% 30%, #8ec0ff, transparent 45%),
    linear-gradient(145deg, #5b9cff, #1e4a9a);
  border: 1px solid rgba(142, 192, 255, 0.45);
  box-shadow: 0 0 18px rgba(91, 156, 255, 0.35);
  position: relative;
}

.cc-brand__mark::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 3px;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  transform: rotate(45deg);
}

.cc-eyebrow,
.cc-kicker {
  margin: 0 0 3px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cc-accent);
}

.cc-title {
  margin: 0;
  font-family: var(--cc-font-display);
  font-size: clamp(15px, 2vw, 19px);
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #fff;
  text-shadow: 0 0 22px rgba(66, 135, 245, 0.4);
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cc-tabs {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}

.cc-tab {
  border: 1px solid var(--cc-line);
  background: rgba(66, 135, 245, 0.06);
  color: var(--cc-muted);
  padding: 8px 14px;
  border-radius: 9px;
  font-family: var(--cc-font-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: 0.18s ease;
}

.cc-tab:hover {
  color: #fff;
  border-color: rgba(66, 135, 245, 0.55);
  background: rgba(66, 135, 245, 0.14);
}

.cc-tab.is-active {
  color: #fff;
  background: linear-gradient(180deg, #6aacff, #2f6fd4);
  border-color: #93c0ff;
  box-shadow: 0 6px 18px rgba(66, 135, 245, 0.38);
}

.cc-tab--clan {
  max-width: 128px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--cc-gold);
  border-color: rgba(232, 184, 106, 0.38);
  background: rgba(232, 184, 106, 0.08);
}

.cc-tab--clan.is-active {
  color: #fff;
  background: linear-gradient(180deg, #e0a04a, #b07020);
  border-color: #f0c070;
  box-shadow: 0 6px 18px rgba(224, 160, 74, 0.35);
}

.cc-head-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.cc-timer {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 1px;
  width: 112px;
  flex-shrink: 0;
  padding: 5px 10px;
  border-radius: 10px;
  border: 1px solid rgba(61, 214, 200, 0.28);
  background: rgba(0, 0, 0, 0.32);
}

.cc-timer__lbl {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--cc-muted);
}

.cc-timer__val {
  display: block;
  width: 100%;
  font-family: "Cascadia Mono", Consolas, "Courier New", monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--cc-accent-2);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  text-align: right;
  white-space: nowrap;
  line-height: 1.2;
}

.cc-close {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 122, 133, 0.16);
  border: 1px solid rgba(255, 122, 133, 0.42);
  border-radius: 10px;
  transition: 0.15s;
}

.cc-close:hover {
  background: rgba(255, 122, 133, 0.32);
  transform: scale(1.04);
}

.cc-close--sm {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  font-size: 18px;
  z-index: 4;
}

/* ---------- Body ---------- */

.cc-body {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* ---------- Sidebar ---------- */

.cc-sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.38));
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  min-height: 0;
}

.cc-help {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: var(--cc-accent);
  border: 1px solid var(--cc-line);
  background: rgba(66, 135, 245, 0.1);
  z-index: 2;
}

.cc-help:hover {
  color: #fff;
  background: rgba(66, 135, 245, 0.28);
}

.cc-side-card {
  padding: 8px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.cc-side-card:not(.cc-side-card--identity) {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cc-side-card--identity {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 14px;
  background:
    radial-gradient(circle at 50% 0%, rgba(91, 156, 255, 0.14), transparent 55%),
    rgba(0, 0, 0, 0.28);
  border-color: rgba(91, 156, 255, 0.18);
}

.cc-clan-name-box {
  font-family: var(--cc-font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  padding: 10px 8px;
  border-radius: 10px;
  border: 1px solid rgba(91, 156, 255, 0.32);
  background: linear-gradient(180deg, rgba(91, 156, 255, 0.18), rgba(10, 18, 30, 0.9));
  color: #fff;
}

.cc-badge-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.cc-shield {
  width: 52px;
  height: 58px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 40% 28%, rgba(142, 192, 255, 0.35), transparent 50%),
    linear-gradient(180deg, #2a5088, #0e1c34);
  border: 1px solid rgba(91, 156, 255, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 8px 18px rgba(0, 0, 0, 0.35);
  clip-path: polygon(50% 0%, 100% 16%, 100% 68%, 50% 100%, 0% 68%, 0% 16%);
}

.cc-shield span {
  font-family: var(--cc-font-display);
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 14px rgba(91, 156, 255, 0.7);
}

.cc-slogan {
  font-size: 11px;
  color: var(--cc-muted);
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cc-bank,
.cc-profile-bank {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.cc-bank-lbl {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cc-muted);
  white-space: nowrap;
}

.cc-bank-chest {
  position: relative;
  width: 28px;
  height: 24px;
  border-radius: 4px;
  background: linear-gradient(180deg, #5b9cff, #2a5ab0);
  box-shadow: 0 2px 10px rgba(66, 135, 245, 0.4);
  flex-shrink: 0;
}

.cc-bank-chest::before {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: -6px;
  height: 10px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #8ec0ff, #4a80d0);
}

.cc-bank-chest::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: var(--cc-gold);
  box-shadow: 0 0 6px rgba(232, 184, 106, 0.7);
}

.cc-bank-chest--lg { width: 40px; height: 34px; }
.cc-bank-chest--lg::before { top: -8px; height: 12px; }
.cc-bank-chest--lg::after { top: 12px; width: 8px; height: 8px; margin-left: -4px; }

.cc-bank-value {
  font-family: var(--cc-font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--cc-gold);
  font-variant-numeric: tabular-nums;
}

.cc-mvp { margin-bottom: 8px; }

.cc-mvp-label {
  font-family: var(--cc-font-display);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--cc-gold);
  margin-bottom: 6px;
}

.cc-mvp-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
}

.cc-mvp-empty { color: var(--cc-muted); opacity: 0.7; }

.cc-avatar {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(145deg, #5b9cff, #2a5080);
  border: 1px solid rgba(126, 179, 255, 0.4);
  flex-shrink: 0;
  overflow: hidden;
}

.cc-avatar.has-ship {
  background: radial-gradient(circle at 50% 40%, #1a2a44, #0a1424);
  padding: 1px;
}

.cc-avatar-ship {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  position: relative;
  z-index: 1;
}

.cc-avatar-letter {
  display: none;
  position: absolute;
  inset: 0;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  z-index: 0;
}

.cc-avatar.is-fallback .cc-avatar-letter {
  display: grid;
}

.cc-online {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cc-ok);
  border: 2px solid #0a1220;
}

.cc-members {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cc-member {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 7px;
  border-radius: 8px;
  border: 1px solid rgba(91, 156, 255, 0.1);
  background: rgba(0, 0, 0, 0.22);
  font-size: 12px;
  transition: 0.15s;
}

.cc-member:hover {
  border-color: rgba(91, 156, 255, 0.4);
  background: rgba(91, 156, 255, 0.08);
}

.cc-member span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cc-bonus {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(61, 214, 200, 0.14), rgba(91, 156, 255, 0.1));
  border: 1px solid rgba(61, 214, 200, 0.35);
  box-shadow: 0 0 18px rgba(61, 214, 200, 0.12);
}

.cc-bonus.is-active {
  animation: ccBonusPulse 2.8s ease-in-out infinite;
}

.cc-bonus-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  line-height: 1.25;
}

.cc-bonus-copy strong {
  font-family: var(--cc-font-display);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #fff;
}

.cc-bonus-copy span {
  font-size: 9px;
  font-weight: 700;
  color: rgba(180, 230, 220, 0.88);
}

.cc-bonus-copy em {
  font-style: normal;
  color: var(--cc-accent-2);
  font-family: var(--cc-font-display);
}

.cc-bonus-plus {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 17px;
  background: linear-gradient(180deg, #5ee0a0, #2a9a70);
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(94, 224, 160, 0.35);
}

/* ---------- Buttons ---------- */

.cc-btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  font-family: var(--cc-font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(180deg, #6aacff, #2f6fd4);
  box-shadow: 0 6px 16px rgba(66, 135, 245, 0.28);
  transition: filter 0.15s, transform 0.15s;
  flex-shrink: 0;
}

.cc-btn:hover:not(:disabled) { filter: brightness(1.08); }
.cc-btn:active:not(:disabled) { transform: translateY(1px); }

.cc-btn--profile { width: 100%; }
.cc-btn--chat { min-width: 120px; }

.cc-btn--claim {
  width: 100%;
  max-width: 280px;
  height: 44px;
  margin-top: 8px;
  background: linear-gradient(180deg, #5ee0a0, #2a9a60);
  box-shadow: 0 8px 20px rgba(94, 224, 160, 0.28);
}

.cc-btn--claim:disabled {
  background: linear-gradient(180deg, #3a4a5a, #2a3545);
  box-shadow: none;
  color: var(--cc-muted);
}

.cc-btn--leave {
  width: 100%;
  background: linear-gradient(180deg, #ff8a94, #c04050);
  box-shadow: 0 8px 20px rgba(255, 122, 133, 0.25);
}

/* ---------- Main ---------- */

.cc-main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.14);
  overflow: hidden;
}

.cc-panel {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  padding: 10px 12px 12px;
  overflow: hidden;
  gap: 10px;
}

.cc-panel.is-active { display: flex; }

.cc-panel[data-panel="info"],
.cc-panel[data-panel="search"],
.cc-panel[data-panel="profile"] {
  overflow: auto;
}

.cc-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.cc-section-head h2,
.cc-clan-progress h2,
.cc-top h2,
.cc-info-card h2,
.cc-search label,
.cc-profile-hero h2 {
  margin: 0;
  font-family: var(--cc-font-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.cc-points {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border-radius: 0;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: none;
  border: none;
}

.cc-points strong {
  color: #fff;
  font-family: var(--cc-font-display);
  font-variant-numeric: tabular-nums;
  margin-left: 4px;
}

.cc-points-icon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: linear-gradient(145deg, #5b9cff, #2a60c0);
  clip-path: polygon(50% 0%, 100% 20%, 100% 70%, 50% 100%, 0% 70%, 0% 20%);
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(91, 156, 255, 0.45);
}

.cc-points-icon::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.35);
}

/* Progress panels — GoP3 Team Challenge style */
.cc-progress-top {
  padding: 14px 16px 12px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.04) 100%),
    repeating-conic-gradient(#c8d0dc 0% 25%, #b8c2d0 0% 50%) 0 0 / 22px 22px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18),
    0 10px 24px rgba(0, 0, 0, 0.28);
  flex: 1.15 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.cc-progress-top .cc-section-head h2 {
  color: #1a2433;
  text-shadow: none;
}

.cc-progress-top .cc-points {
  color: #243044;
}

.cc-progress-top .cc-points strong {
  color: #0f1724;
}

.cc-carousel {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-height: 0;
}

.cc-carousel-viewport {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
}

.cc-nav-arrow {
  width: 32px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 10px;
  font-size: 26px;
  line-height: 1;
  color: var(--cc-muted);
  border: 1px solid var(--cc-line);
  background: rgba(66, 135, 245, 0.08);
  transition: 0.15s;
}

.cc-nav-arrow:hover:not(:disabled) {
  color: #fff;
  border-color: rgba(66, 135, 245, 0.55);
  background: rgba(66, 135, 245, 0.2);
}

.cc-nav-arrow:disabled { opacity: 0.28; }

.cc-carousel-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  flex-shrink: 0;
}

.cc-page-dots { display: flex; gap: 5px; }

.cc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  padding: 0;
  background: rgba(255, 255, 255, 0.16);
  transition: 0.15s;
}

.cc-dot.is-active {
  background: var(--cc-accent);
  box-shadow: 0 0 10px rgba(91, 156, 255, 0.55);
  width: 18px;
  border-radius: 999px;
}

.cc-page-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--cc-muted);
  font-variant-numeric: tabular-nums;
}

.cc-chests {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  min-height: 148px;
  padding: 6px 2px 0;
}

.cc-chest {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
  padding: 18px 4px 6px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.cc-chest:hover {
  transform: translateY(-6px) scale(1.04);
  border-color: rgba(126, 182, 255, 0.28);
  background: rgba(66, 135, 245, 0.08);
}

.cc-chest.is-unlocked:not(.is-claimed) {
  border-color: rgba(126, 220, 160, 0.35);
  background: rgba(61, 207, 120, 0.08);
}

.cc-chest.is-locked {
  opacity: 1;
}

.cc-chest.is-claimed {
  border-color: rgba(100, 180, 130, 0.25);
  background: rgba(40, 90, 60, 0.12);
}

.cc-chest-tier { display: none; }

.cc-chest-badge {
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 999px;
  color: #0a1420;
  background: linear-gradient(180deg, #9ee0b8, #4caf78);
  border: 1px solid rgba(180, 255, 210, 0.5);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
  pointer-events: none;
}

.cc-chest-badge--ready {
  color: #0a1420;
  border-color: rgba(255, 230, 150, 0.65);
  background: linear-gradient(180deg, #ffe08a, #e0a020);
  animation: cc-badge-pulse 1.6s ease-in-out infinite;
}

@keyframes cc-badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(240, 193, 74, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(240, 193, 74, 0); }
}

.cc-chest-spacer { height: 0; min-height: 0; }

/* Soft pedestal + floating crate */
.cc-chest-glow {
  position: relative;
  display: grid;
  place-items: center;
  width: 118px;
  height: 112px;
  isolation: isolate;
}

.cc-chest-glow::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 4%;
  height: 26%;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 50%,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(126, 182, 255, 0.18) 50%,
    transparent 78%);
  filter: blur(2px);
  pointer-events: none;
}

.cc-chest-glow::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 2%;
  height: 10px;
  z-index: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  filter: blur(4px);
  pointer-events: none;
}

.cc-chest-img {
  position: relative;
  z-index: 1;
  display: block;
  width: 112px;
  height: 108px;
  object-fit: contain;
  object-position: center bottom;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.45));
  transition: filter 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

/* Soft tier under-glow (GoP3) */
.cc-chest--bronze .cc-chest-glow::before {
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 200, 140, 0.75) 0%, rgba(180, 110, 50, 0.22) 55%, transparent 80%);
}
.cc-chest--silver .cc-chest-glow::before {
  background: radial-gradient(ellipse at 50% 50%, rgba(220, 235, 255, 0.8) 0%, rgba(130, 160, 200, 0.25) 55%, transparent 80%);
}
.cc-chest--gold .cc-chest-glow::before {
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 230, 120, 0.85) 0%, rgba(220, 160, 40, 0.28) 55%, transparent 80%);
}
.cc-chest--diamond .cc-chest-glow::before {
  background: radial-gradient(ellipse at 50% 50%, rgba(160, 245, 255, 0.9) 0%, rgba(70, 180, 255, 0.3) 55%, transparent 80%);
}
.cc-chest--ruby .cc-chest-glow::before {
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 140, 160, 0.8) 0%, rgba(200, 40, 70, 0.28) 55%, transparent 80%);
}
.cc-chest--emerald .cc-chest-glow::before {
  background: radial-gradient(ellipse at 50% 50%, rgba(140, 255, 190, 0.8) 0%, rgba(30, 170, 100, 0.28) 55%, transparent 80%);
}
.cc-chest--sapphire .cc-chest-glow::before {
  background: radial-gradient(ellipse at 50% 50%, rgba(170, 180, 255, 0.8) 0%, rgba(80, 90, 220, 0.28) 55%, transparent 80%);
}
.cc-chest--opal .cc-chest-glow::before {
  background: radial-gradient(ellipse at 50% 50%, rgba(220, 235, 255, 0.8) 0%, rgba(150, 190, 255, 0.26) 55%, transparent 80%);
}
.cc-chest--amber .cc-chest-glow::before {
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 200, 120, 0.85) 0%, rgba(230, 140, 30, 0.28) 55%, transparent 80%);
}
.cc-chest--amethyst .cc-chest-glow::before {
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 160, 240, 0.8) 0%, rgba(180, 50, 180, 0.28) 55%, transparent 80%);
}
.cc-chest--black .cc-chest-glow::before {
  background: radial-gradient(ellipse at 50% 50%, rgba(180, 230, 255, 0.85) 0%, rgba(80, 160, 255, 0.3) 55%, transparent 80%);
}

.cc-chest-glow:has(.cc-chest-img--trophy) {
  width: 100%;
  height: 100%;
}

.cc-chest-glow:has(.cc-chest-img--trophy)::before {
  inset: auto;
  left: 10%;
  right: 10%;
  bottom: 2%;
  height: 40%;
}

.cc-chest-img--trophy {
  width: 100%;
  height: 100%;
  object-position: center;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.cc-chest-glow:has(.cc-chest-img--reward) {
  width: 140px;
  height: 132px;
}

.cc-chest-glow:has(.cc-chest-img--reward)::before {
  left: 14%;
  right: 14%;
  bottom: 4%;
  height: 32%;
}

.cc-chest-img--reward {
  width: 128px;
  height: 128px;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.4));
}

.cc-chest-name {
  display: block;
  margin-top: 4px;
  max-width: 100%;
  padding: 0 2px;
  font-family: "Orbitron", "Barlow Condensed", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  color: #c8daf0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.cc-chest.is-unlocked .cc-chest-name {
  color: #e8f4ff;
}

.cc-chest.is-claimed .cc-chest-name {
  color: #7ee0a8;
}

.cc-chest.is-unlocked:not(.is-claimed) .cc-chest-img {
  animation: cc-chest-float 2.8s ease-in-out infinite;
  filter:
    drop-shadow(0 10px 14px rgba(0, 0, 0, 0.45))
    drop-shadow(0 0 12px rgba(126, 220, 160, 0.35));
}

@keyframes cc-chest-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.cc-chest.is-locked .cc-chest-img {
  opacity: 1;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.45));
}

.cc-chest.is-locked .cc-chest-glow::before,
.cc-chest.is-locked .cc-chest-glow::after {
  opacity: 1;
  filter: none;
}

.cc-chest.is-locked .cc-chest-name {
  color: inherit;
}

.cc-chest.is-claimed .cc-chest-img {
  opacity: 0.92;
  filter:
    drop-shadow(0 8px 12px rgba(0, 0, 0, 0.4))
    drop-shadow(0 0 10px rgba(100, 220, 150, 0.25));
}

/* Progress track on light GoP3 panel */
.cc-progress-top .cc-track-bar {
  background: rgba(40, 55, 75, 0.35);
  border-color: rgba(30, 45, 70, 0.35);
}

.cc-progress-top .cc-milestones span {
  color: #1e2a3c;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.cc-progress-top .cc-milestones span.is-done {
  color: #0b3d8c;
  font-weight: 800;
}

.cc-progress-top .cc-page-label,
.cc-progress-top .cc-carousel-meta {
  color: #2a3648;
}

.cc-progress-top .cc-nav-arrow {
  color: #2a3648;
  border-color: rgba(30, 45, 70, 0.28);
  background: rgba(255, 255, 255, 0.35);
}

.cc-progress-top .cc-nav-arrow:hover:not(:disabled) {
  color: #0f1724;
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(30, 45, 70, 0.45);
}

.cc-progress-top .cc-dot {
  background: rgba(30, 45, 70, 0.28);
}

.cc-progress-top .cc-dot.is-active {
  background: #2f6edc;
}

.cc-track { position: relative; padding: 0 4px; }

.cc-track-bar {
  height: 12px;
  border-radius: 999px;
  background: rgba(30, 50, 80, 0.9);
  border: 2px solid rgba(80, 140, 220, 0.3);
  overflow: visible;
  position: relative;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.35);
}

.cc-track-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f78e8, #4aa0ff 55%, #5bc0ff);
  box-shadow: 0 0 14px rgba(91, 156, 255, 0.45);
  transition: width 0.45s ease;
  position: relative;
  min-width: 0;
}

.cc-track-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 60%);
}

/* Aktuális pozíció jelölő a sáv végén */
.cc-track-fill::before {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--cc-accent-2);
  box-shadow: 0 0 10px rgba(61, 214, 200, 0.7);
  z-index: 2;
}

.cc-milestones {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 6px;
  text-align: center;
}

.cc-milestones span {
  font-size: 9px;
  font-weight: 700;
  color: var(--cc-muted);
  font-variant-numeric: tabular-nums;
}

.cc-milestones span.is-done {
  color: var(--cc-accent-2);
}

.cc-progress-bottom {
  flex-shrink: 0;
}

.cc-team-block {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(180px, 0.85fr);
  grid-template-areas:
    "clan top"
    "clan actions";
  gap: 12px 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background:
    radial-gradient(ellipse 60% 80% at 100% 0%, rgba(91, 156, 255, 0.1), transparent 50%),
    rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.07);
  align-items: start;
}

.cc-clan-progress {
  grid-area: clan;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  background: none;
  border: none;
}

.cc-top {
  grid-area: top;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  background: none;
  border: none;
  min-width: 0;
}

.cc-actions {
  grid-area: actions;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

.cc-clan-total {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.cc-mini-bar {
  position: relative;
  height: 28px;
  border-radius: 999px;
  background: rgba(20, 40, 70, 0.85);
  border: 2px solid rgba(80, 140, 220, 0.35);
  overflow: hidden;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35);
}

.cc-mini-fill {
  height: 100%;
  width: 0%;
  min-width: 0;
  background: linear-gradient(90deg, #2f78e8, #4aa0ff 55%, #5bc0ff);
  transition: width 0.45s ease;
  position: relative;
}

.cc-mini-fill::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 8px rgba(91, 156, 255, 0.8);
}

.cc-mini-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
  letter-spacing: 0.04em;
}

.cc-next-size {
  font-size: 12px;
  font-weight: 700;
  color: rgba(220, 232, 245, 0.9);
  letter-spacing: 0.04em;
}

.cc-next-size strong {
  color: #fff;
  font-family: var(--cc-font-display);
  letter-spacing: 0.08em;
  margin-left: 4px;
}

.cc-top-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cc-top-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-radius: 0;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.cc-top-list li.empty {
  justify-content: flex-start;
  color: var(--cc-muted);
  opacity: 0.7;
  border-bottom: none;
}

.cc-top-list .rank {
  width: auto;
  height: auto;
  border-radius: 0;
  display: inline;
  font-size: 13px;
  font-weight: 800;
  background: none;
  color: #fff;
  flex-shrink: 0;
  margin-right: 2px;
}

.cc-top-list li:nth-child(1) .rank {
  background: none;
  color: #fff;
}

.cc-top-list .pts {
  margin-left: auto;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.cc-btn--chat {
  min-width: 110px;
  height: 34px;
}

/* Profile / info / search */
.cc-profile {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 12px;
  min-height: 0;
  flex: 1;
}

.cc-profile-hero {
  position: relative;
  padding: 16px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 20% 0%, rgba(91, 156, 255, 0.14), transparent 50%),
    rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(91, 156, 255, 0.2);
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
}

.cc-profile-hero h2 {
  font-size: 17px;
  letter-spacing: 0.08em;
  padding-right: 28px;
}

.cc-profile-hero p {
  margin: 0;
  font-size: 12px;
  color: var(--cc-muted);
}

.cc-gear {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid var(--cc-line);
  background: rgba(66, 135, 245, 0.08);
  color: var(--cc-muted);
}

.cc-gear:hover { color: #fff; background: rgba(66, 135, 245, 0.2); }

.cc-trophies { display: flex; flex-wrap: wrap; gap: 4px; }

.cc-trophy {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  opacity: 0.4;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.cc-trophy.is-on {
  opacity: 1;
  background: rgba(91, 156, 255, 0.12);
  box-shadow: 0 0 8px rgba(91, 156, 255, 0.25);
}

.cc-meta { margin: 0; display: grid; gap: 6px; }

.cc-meta > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 9px;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.cc-meta dt {
  font-size: 10px;
  font-weight: 700;
  color: var(--cc-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cc-meta dd {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
}

.cc-profile-members {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.26);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.cc-profile-row {
  display: grid;
  grid-template-columns: 28px 32px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(91, 156, 255, 0.1);
}

.cc-profile-row .rank {
  font-family: var(--cc-font-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--cc-accent);
  text-align: center;
}

.cc-profile-row .name {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cc-profile-row .role { font-size: 10px; color: var(--cc-muted); }

.cc-profile-row .score {
  font-family: var(--cc-font-display);
  font-size: 12px;
  color: var(--cc-accent-2);
}

.cc-profile-row .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cc-ok);
  justify-self: end;
}

.cc-info-card,
.cc-search {
  max-width: 680px;
  padding: 18px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 0% 0%, rgba(91, 156, 255, 0.12), transparent 45%),
    rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(91, 156, 255, 0.2);
}

.cc-info-card ul {
  margin: 12px 0;
  padding-left: 18px;
  color: var(--cc-muted);
  font-size: 13px;
  line-height: 1.6;
}

.cc-info-card li strong { color: #fff; }

.cc-info-sub {
  margin: 16px 0 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cc-accent, #7eb6ff);
}

.cc-info-lead {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--cc-muted);
  line-height: 1.5;
}

.cc-info-formula {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(66, 135, 245, 0.12);
  border: 1px solid rgba(126, 182, 255, 0.35);
  overflow-x: auto;
}

.cc-info-formula code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  font-weight: 700;
  color: #7ec8ff;
  white-space: nowrap;
  background: transparent !important;
  background-color: transparent !important;
  padding: 0 !important;
  border: none !important;
}

.cc-info-rules,
.cc-info-examples {
  margin: 8px 0 12px;
}

.cc-info-calc {
  margin: 0 0 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--cc-muted);
  background: rgba(0, 0, 0, 0.28);
  border: 1px dashed rgba(126, 182, 255, 0.25);
}

.cc-info-note {
  margin: 0;
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 12px;
  color: var(--cc-accent-2);
  background: rgba(61, 214, 200, 0.08);
  border: 1px solid rgba(61, 214, 200, 0.22);
}

.cc-search { display: flex; flex-direction: column; gap: 10px; }

.cc-search-row { display: flex; gap: 8px; }

.cc-search-row input[type="search"] {
  flex: 1;
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  font: inherit;
  outline: none;
}

.cc-search-row input[type="search"]:focus {
  border-color: rgba(91, 156, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(91, 156, 255, 0.14);
}

.cc-search-result {
  padding: 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--cc-muted);
  font-size: 13px;
}

/* Reward overlay */
.cc-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(2, 6, 12, 0.78);
  backdrop-filter: blur(10px);
  animation: fadeIn 0.25s ease both;
}

.cc-overlay[hidden] { display: none !important; }

.cc-reward-modal {
  position: relative;
  width: min(460px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 22px 18px 18px;
  border-radius: 14px;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(91, 156, 255, 0.18), transparent 55%),
    var(--cc-panel);
  border: 1px solid rgba(126, 179, 255, 0.28);
  box-shadow: var(--cc-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  animation: ccIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cc-reward-modal > *:not(.cc-shine):not(.cc-frame) { position: relative; z-index: 1; }

.cc-reward-modal h2 {
  margin: 4px 0 0;
  font-family: var(--cc-font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #fff;
}

.cc-reward-sub {
  margin: 0;
  font-size: 12px;
  color: var(--cc-muted);
}

.cc-reward-chest {
  position: relative;
  width: auto;
  height: auto;
  margin: 8px 0;
  display: grid;
  place-items: center;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.cc-reward-chest::before,
.cc-reward-chest::after {
  content: none !important;
  display: none !important;
}

.cc-reward-chest--img {
  background: transparent;
}

.cc-reward-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  margin: 4px 0;
  max-height: min(240px, 36vh);
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(91, 156, 255, 0.45) transparent;
}

.cc-reward-grid::-webkit-scrollbar { width: 6px; }
.cc-reward-grid::-webkit-scrollbar-thumb {
  background: rgba(91, 156, 255, 0.4);
  border-radius: 999px;
}

.cc-reward-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cc-reward-card .lbl {
  font-size: 10px;
  font-weight: 700;
  color: var(--cc-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cc-reward-card .amt {
  font-family: var(--cc-font-display);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.cc-reward-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
}

.cc-reward-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--cc-font-display);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.cc-reward-icon.uri { background: linear-gradient(145deg, #70c0ff, #2060c0); }
.cc-reward-icon.cre { background: linear-gradient(145deg, #90e080, #308030); }
.cc-reward-icon.coin { background: linear-gradient(145deg, #ffe080, #c08020); color: #5a3808; }
.cc-reward-icon.ammo { background: linear-gradient(145deg, #ffb070, #c05020); }
.cc-reward-icon.gun { background: linear-gradient(145deg, #c0d0ff, #4060c0); }
.cc-reward-icon.item { background: linear-gradient(145deg, #e0c0ff, #8040b0); }
.cc-reward-icon.prem { background: linear-gradient(145deg, #ffe8a0, #d0a020); color: #402800; }

.cc-reward-empty {
  grid-column: 1 / -1;
  text-align: center;
  opacity: 0.7;
  padding: 12px;
  color: var(--cc-muted);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes ccIn {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

@keyframes ccDrift {
  from { transform: translate(0, 0); }
  to { transform: translate(24px, 18px); }
}

@keyframes ccBonusPulse {
  0%, 100% { box-shadow: 0 0 14px rgba(61, 214, 200, 0.12); }
  50% { box-shadow: 0 0 24px rgba(61, 214, 200, 0.28); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Responsive */
@media (max-width: 960px) {
  .cc-head {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand meta"
      "tabs tabs";
  }
  .cc-brand { grid-area: brand; }
  .cc-head-meta { grid-area: meta; }
  .cc-tabs { grid-area: tabs; justify-content: flex-start; }
}

@media (max-width: 820px) {
  html, body { overflow: auto; }
  .cc-stage {
    height: auto;
    min-height: 100dvh;
    overflow: auto;
    align-items: flex-start;
  }
  .cc-modal {
    height: auto;
    max-height: none;
    min-height: calc(100dvh - 20px);
  }
  .cc-body { grid-template-columns: 1fr; overflow: visible; }
  .cc-sidebar {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    max-height: none;
    overflow: visible;
  }
  .cc-members { max-height: 90px; }
  .cc-progress-bottom { grid-template-columns: 1fr; }
  .cc-team-block {
    grid-template-columns: 1fr;
    grid-template-areas:
      "clan"
      "top"
      "actions";
  }
  .cc-actions { justify-content: stretch; }
  .cc-btn--chat { width: 100%; }
  .cc-profile { grid-template-columns: 1fr; }
  .cc-chests { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cc-milestones { grid-template-columns: repeat(2, 1fr); }
  .cc-panel { overflow: auto; }
}

@media (max-width: 520px) {
  .cc-stage { padding: 10px; }
  .cc-modal { max-height: 96vh; border-radius: 12px; }
  .cc-head { padding: 12px; }
  .cc-tab { padding: 7px 10px; font-size: 9px; }
  .cc-panel { padding: 10px; }
  .cc-nav-arrow { width: 28px; height: 52px; font-size: 22px; }
  .cc-frame__c { width: 12px; height: 12px; }
  .cc-reward-img { width: 40px; height: 40px; }
}

/* ---------- Embedded in /clan/challenge (xg-clan-page) ---------- */

.xg-clan-page--challenge {
  max-width: 1120px;
}

.xg-clan-page--challenge .clan-navigation {
  margin-bottom: 8px;
}

.cc-stage.cc-embedded {
  height: 100%;
  min-height: 0;
  max-height: 100%;
  padding: 0;
  flex: 1 1 auto;
  overflow: hidden;
  align-items: stretch;
  justify-content: stretch;
}

.cc-stage.cc-embedded .cc-stage__glow {
  opacity: 0.55;
}

.cc-stage.cc-embedded .cc-modal {
  width: 100%;
  height: 100%;
  max-height: 100%;
  border-radius: 12px;
  animation: none;
}

.cc-stage.cc-embedded .cc-close[hidden] {
  display: none !important;
}

.cc-stage.cc-embedded .cc-head {
  padding: 8px 12px;
}

.cc-stage.cc-embedded .cc-sidebar {
  width: auto;
}

@media (max-width: 820px) {
  .cc-stage.cc-embedded {
    height: auto;
    min-height: 480px;
    overflow: auto;
  }
  .cc-stage.cc-embedded .cc-modal {
    height: auto;
    min-height: 480px;
  }
}

/* Clan-only lock overlay */
.cc-modal.cc-locked {
  filter: grayscale(0.35) brightness(0.72);
  pointer-events: none;
  user-select: none;
}
.cc-clan-gate {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(3, 8, 16, 0.72);
  backdrop-filter: blur(6px);
}
.cc-clan-gate__card {
  max-width: 380px;
  text-align: center;
  padding: 22px 20px;
  border-radius: 14px;
  background: rgba(8, 16, 28, 0.96);
  border: 1px solid rgba(91, 156, 255, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.cc-clan-gate__card h2 {
  margin: 0 0 8px;
  font-family: var(--cc-font-display);
  font-size: 16px;
  letter-spacing: 0.08em;
  color: #fff;
}
.cc-clan-gate__card p {
  margin: 0 0 16px;
  color: var(--cc-muted);
  font-size: 13px;
  line-height: 1.45;
}
.cc-clan-gate__card .cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  min-width: 160px;
}
