/* ============================================================
   Clan Challenge — X-Galaxy dark HUD (matches clan pages)
   ============================================================ */

.cc-modal--gop3 {
  --xg-panel: rgba(8, 16, 28, 0.96);
  --xg-panel-2: rgba(12, 22, 40, 0.98);
  --xg-side: #0a1528;
  --xg-side-2: #07101c;
  --xg-border: rgba(66, 135, 245, 0.38);
  --xg-accent: #4287f5;
  --xg-accent-hi: #7eb6ff;
  --xg-cyan: #3dd6c8;
  --xg-text: #e8f4ff;
  --xg-muted: rgba(170, 195, 220, 0.72);
  --xg-gold: #f0c14a;
  --xg-warn: #ff7a85;
  --cc-font-display: "Orbitron", "Barlow Condensed", sans-serif;
  --cc-font-ui: "Barlow", "Segoe UI", sans-serif;
  font-family: var(--cc-font-ui);
  color: var(--xg-text);
  border: 1px solid var(--xg-border) !important;
  border-radius: 14px !important;
  background:
    linear-gradient(165deg, rgba(14, 26, 46, 0.98) 0%, rgba(6, 12, 22, 0.99) 55%, rgba(4, 8, 16, 0.99) 100%) !important;
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(126, 182, 255, 0.12),
    0 0 0 1px rgba(0, 0, 0, 0.35) !important;
  overflow: hidden;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
}

.cc-modal--gop3 .cc-body {
  display: grid !important;
  grid-template-columns: 200px minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) !important;
  flex: 1 1 auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: 100% !important;
  background: transparent;
  overflow: hidden !important;
}

/* ---------- Sidebar ---------- */

.cc-modal--gop3 .cc-sidebar {
  display: flex !important;
  flex-direction: column;
  gap: 6px;
  padding: 0 8px 8px;
  background:
    linear-gradient(180deg, #0f1e36 0%, var(--xg-side) 45%, var(--xg-side-2) 100%) !important;
  border-right: 1px solid var(--xg-border) !important;
  color: var(--xg-text);
  min-height: 0 !important;
  max-height: 100% !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(66, 135, 245, 0.4) transparent;
}

.cc-modal--gop3 .cc-clan-banner {
  margin: 0 -10px 8px;
  padding: 12px 10px;
  text-align: center;
  font-family: var(--cc-font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 0 12px rgba(66, 135, 245, 0.45);
  background: linear-gradient(90deg, rgba(66, 135, 245, 0.35), rgba(61, 214, 200, 0.18));
  border-bottom: 1px solid var(--xg-border);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.35);
}

.cc-modal--gop3 .cc-side-hero {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 4px;
  background: transparent !important;
  border: none !important;
}

.cc-modal--gop3 .cc-clan-rank {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(126, 182, 255, 0.35));
}

.cc-modal--gop3 .cc-clan-rank__img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
}

.cc-modal--gop3 .cc-rank-name {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--xg-gold, #f0c14a);
  line-height: 1.2;
}

.cc-modal--gop3 .cc-rank-next {
  margin-top: 2px;
  font-size: 9px;
  color: var(--xg-muted);
  line-height: 1.25;
  opacity: 0.9;
}

.cc-modal--gop3 .cc-slogan {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--xg-text);
}

.cc-modal--gop3 .cc-badge-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px 2px 6px;
  flex-shrink: 0;
}

.cc-modal--gop3 .cc-badge-chip {
  width: 30px;
  height: 30px;
  padding: 1px;
  border: 1px solid rgba(66, 135, 245, 0.2);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  cursor: default;
  opacity: 0.28;
  filter: grayscale(0.85);
  transition: 0.15s ease;
}

.cc-modal--gop3 .cc-badge-chip img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.cc-modal--gop3 .cc-badge-chip.is-on {
  opacity: 1;
  filter: none;
  border-color: rgba(126, 182, 255, 0.4);
  box-shadow: 0 0 8px rgba(66, 135, 245, 0.2);
}

.cc-modal--gop3 .cc-badge-chip.is-current {
  border-color: rgba(240, 193, 74, 0.7);
  box-shadow: 0 0 10px rgba(240, 193, 74, 0.35);
  background: rgba(240, 193, 74, 0.1);
}

.cc-modal--gop3 .cc-badge-chip:disabled {
  cursor: default;
}

.cc-modal--gop3 .cc-bank {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(66, 135, 245, 0.22);
  min-width: 0;
}

.cc-modal--gop3 .cc-bank-meta {
  flex: 1;
  min-width: 0;
}

.cc-modal--gop3 .cc-bank-lbl {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-transform: uppercase;
  color: var(--xg-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.cc-modal--gop3 .cc-bank-value {
  font-family: var(--cc-font-display);
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 10px rgba(126, 182, 255, 0.35);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cc-modal--gop3 .cc-bank-uri {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(80, 200, 255, 0.45));
}

.cc-modal--gop3 .cc-bank-uri--lg {
  width: 36px;
  height: 36px;
}

.cc-modal--gop3 .cc-mvp {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(240, 193, 74, 0.22);
}

.cc-modal--gop3 .cc-mvp-label {
  color: var(--xg-gold);
  font-weight: 800;
  letter-spacing: 0.14em;
  font-size: 11px;
}

.cc-modal--gop3 .cc-members {
  flex: 1 1 auto;
  min-height: 48px;
  max-height: none;
  padding: 4px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(66, 135, 245, 0.18);
  overflow-y: auto;
  scrollbar-width: thin;
}

.cc-modal--gop3 .cc-btn--profile {
  margin-top: auto;
  flex-shrink: 0;
}

.cc-modal--gop3 .cc-bonus,
.cc-modal--gop3 .cc-bank,
.cc-modal--gop3 .cc-mvp,
.cc-modal--gop3 .cc-side-hero,
.cc-modal--gop3 .cc-badge-strip,
.cc-modal--gop3 .cc-clan-banner {
  flex-shrink: 0;
}

.cc-modal--gop3 .cc-member {
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: rgba(66, 135, 245, 0.08);
  color: var(--xg-text);
}

.cc-modal--gop3 .cc-member:hover {
  background: rgba(66, 135, 245, 0.16);
  border-color: rgba(66, 135, 245, 0.25);
}

.cc-modal--gop3 .cc-avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(145deg, #3a6ab0, #1a3558);
  border: 1px solid rgba(126, 182, 255, 0.35);
  position: relative;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
  overflow: hidden;
}

.cc-modal--gop3 .cc-avatar.has-ship {
  background: radial-gradient(circle at 50% 40%, #1a2a44, #0a1424);
  padding: 1px;
}

.cc-modal--gop3 .cc-avatar-ship {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  position: relative;
  z-index: 1;
}

.cc-modal--gop3 .cc-avatar-letter {
  display: none;
  position: absolute;
  inset: 0;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  z-index: 0;
}

.cc-modal--gop3 .cc-avatar.is-fallback .cc-avatar-letter {
  display: grid;
}

.cc-modal--gop3 .cc-online {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3dcf4a;
  border: 2px solid #0a1528;
  box-shadow: 0 0 6px rgba(61, 207, 74, 0.7);
}

.cc-modal--gop3 .cc-bonus {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(240, 193, 74, 0.08);
  border: 1px solid rgba(240, 193, 74, 0.28);
}

.cc-modal--gop3 .cc-bonus-plus {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 800;
  color: #2a1a00;
  background: linear-gradient(180deg, #ffe08a, #e0a020);
  box-shadow: 0 0 10px rgba(240, 193, 74, 0.35);
}

.cc-modal--gop3 .cc-bonus-copy strong,
.cc-modal--gop3 .cc-bonus-copy span {
  color: #ffe9a8;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.cc-modal--gop3 .cc-btn {
  height: 34px;
  border-radius: 8px;
  font-family: var(--cc-font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff !important;
  background: linear-gradient(180deg, #4a8ef0, #2a5cb8 55%, #1e4488) !important;
  border: 1px solid rgba(126, 182, 255, 0.55) !important;
  box-shadow: 0 0 14px rgba(66, 135, 245, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
  flex-shrink: 0;
}

.cc-modal--gop3 .cc-btn:hover:not(:disabled) {
  filter: brightness(1.1);
  box-shadow: 0 0 18px rgba(66, 135, 245, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

/* ---------- Main column ---------- */

.cc-modal--gop3 .cc-main-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0 !important;
  max-height: 100%;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 70% 0%, rgba(66, 135, 245, 0.12), transparent 50%),
    linear-gradient(180deg, rgba(10, 18, 32, 0.6), rgba(6, 10, 18, 0.2));
}

.cc-modal--gop3 .cc-head {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 8px 10px 0 !important;
  border-bottom: none !important;
  background: transparent !important;
  grid-template-columns: none !important;
}

.cc-modal--gop3 .cc-tabs {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  flex: 1;
}

.cc-modal--gop3 .cc-tab {
  padding: 8px 14px;
  border-radius: 8px 8px 0 0;
  font-family: var(--cc-font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--xg-muted);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(66, 135, 245, 0.18);
  border-bottom: none;
  box-shadow: none;
}

.cc-modal--gop3 .cc-tab:hover {
  color: #fff;
  background: rgba(66, 135, 245, 0.12);
}

.cc-modal--gop3 .cc-tab.is-active,
.cc-modal--gop3 .cc-tab--clan.is-active {
  color: #fff;
  background: linear-gradient(180deg, rgba(66, 135, 245, 0.45), rgba(30, 70, 140, 0.55));
  border-color: rgba(126, 182, 255, 0.55);
  box-shadow: 0 -2px 12px rgba(66, 135, 245, 0.25);
}

.cc-modal--gop3 .cc-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #c43a48;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.cc-modal--gop3 .cc-main {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background: transparent !important;
  display: flex;
  flex-direction: column;
}

.cc-modal--gop3 .cc-panel {
  height: 100%;
  min-height: 0;
  overflow: auto;
  padding: 8px 10px 10px !important;
  background: transparent;
}

.cc-modal--gop3 .cc-panel.is-active {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

/* Ribbon / progress board */

.cc-modal--gop3 .cc-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: none;
  margin: 0 0 12px;
  padding: 10px 16px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(46, 140, 70, 0.55), rgba(30, 100, 55, 0.4));
  border: 1px solid rgba(94, 224, 160, 0.35);
  box-shadow: 0 0 20px rgba(46, 140, 70, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.cc-modal--gop3 .cc-title {
  margin: 0;
  font-family: var(--cc-font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #fff;
  text-shadow: 0 0 12px rgba(94, 224, 160, 0.35);
}

.cc-modal--gop3 .cc-timer {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--cc-font-display);
}

.cc-modal--gop3 .cc-timer__lbl {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(200, 255, 220, 0.7);
}

.cc-modal--gop3 .cc-timer__val {
  font-size: 16px;
  font-weight: 700;
  color: #b8ffd0;
  text-shadow: 0 0 10px rgba(94, 224, 160, 0.45);
}

.cc-modal--gop3 .cc-board {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(66, 135, 245, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.cc-modal--gop3 .cc-progress-top {
  flex: 1.2 1 auto;
  min-height: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(8, 16, 28, 0.55);
  border: 1px solid rgba(66, 135, 245, 0.18);
}

.cc-modal--gop3 .cc-track-bar {
  background: rgba(0, 0, 0, 0.45) !important;
  border: 1px solid rgba(66, 135, 245, 0.25);
}

.cc-modal--gop3 .cc-progress-top .cc-milestones span {
  color: rgba(200, 220, 245, 0.85);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.cc-modal--gop3 .cc-progress-top .cc-milestones span.is-done {
  color: #7eb6ff;
  font-weight: 800;
}

.cc-modal--gop3 .cc-chest-name {
  color: #d4e6ff;
}

.cc-modal--gop3 .cc-chest.is-locked .cc-chest-name {
  color: rgba(180, 200, 220, 0.5);
}

.cc-modal--gop3 .cc-chest.is-claimed .cc-chest-name {
  color: #7ee0a8;
}

.cc-modal--gop3 .cc-chests {
  gap: 8px;
  min-height: 156px;
}

.cc-modal--gop3 .cc-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.cc-modal--gop3 .cc-section-head h2,
.cc-modal--gop3 .cc-clan-progress h2,
.cc-modal--gop3 .cc-top h2 {
  margin: 0;
  font-family: var(--cc-font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--xg-accent-hi);
}

.cc-modal--gop3 .cc-points {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--xg-muted);
}

.cc-modal--gop3 .cc-points strong {
  color: #fff;
  font-family: var(--cc-font-display);
}

.cc-modal--gop3 .cc-carousel {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cc-modal--gop3 .cc-nav-arrow {
  width: 32px;
  height: 48px;
  border-radius: 8px;
  font-size: 22px;
  color: var(--xg-accent-hi);
  background: rgba(66, 135, 245, 0.12);
  border: 1px solid rgba(66, 135, 245, 0.28);
}

.cc-modal--gop3 .cc-nav-arrow:hover {
  background: rgba(66, 135, 245, 0.22);
}

.cc-modal--gop3 .cc-carousel-viewport {
  flex: 1;
  min-width: 0;
}

.cc-modal--gop3 .cc-team-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cc-modal--gop3 .cc-clan-progress,
.cc-modal--gop3 .cc-top {
  padding: 12px;
  border-radius: 10px;
  background: rgba(8, 16, 28, 0.65);
  border: 1px solid rgba(66, 135, 245, 0.2);
}

.cc-modal--gop3 .cc-mini-bar {
  position: relative;
  height: 18px;
  margin-top: 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(66, 135, 245, 0.25);
  overflow: hidden;
}

.cc-modal--gop3 .cc-mini-fill {
  height: 100%;
  background: linear-gradient(90deg, #2a6ad8, #3dd6c8);
  box-shadow: 0 0 12px rgba(61, 214, 200, 0.4);
}

.cc-modal--gop3 .cc-mini-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.cc-modal--gop3 .cc-next-size {
  margin-top: 8px;
  font-size: 11px;
  color: var(--xg-muted);
}

.cc-modal--gop3 .cc-next-size strong {
  color: var(--xg-gold);
}

.cc-modal--gop3 .cc-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

.cc-modal--gop3 .cc-info-card,
.cc-modal--gop3 .cc-search,
.cc-modal--gop3 .cc-profile {
  color: var(--xg-text);
}

.cc-modal--gop3 .cc-info-card h2,
.cc-modal--gop3 .cc-search label {
  color: var(--xg-accent-hi);
  font-family: var(--cc-font-display);
  letter-spacing: 0.08em;
}

.cc-modal--gop3 .cc-info-sub {
  color: var(--xg-gold, #f0c14a);
}

.cc-modal--gop3 .cc-info-card li,
.cc-modal--gop3 .cc-info-note,
.cc-modal--gop3 .cc-info-lead,
.cc-modal--gop3 .cc-info-calc,
.cc-modal--gop3 .cc-search-result {
  color: var(--xg-muted);
}

.cc-modal--gop3 .cc-info-formula {
  background: rgba(66, 135, 245, 0.14);
  border-color: rgba(126, 182, 255, 0.4);
}

.cc-modal--gop3 .cc-info-formula code {
  color: #fff;
}

.cc-modal--gop3 .cc-search-row input[type="search"] {
  color: var(--xg-text);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(66, 135, 245, 0.3);
  border-radius: 8px;
  padding: 8px 12px;
}

/* ============================================================
   Chat — dark HUD global
   ============================================================ */

.cc-modal--gop3 .cc-panel[data-panel="chat"] {
  display: none;
  flex-direction: column;
  padding: 0 !important;
  gap: 0;
  overflow: hidden;
  flex: 1 1 auto;
  min-height: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(66, 135, 245, 0.12), transparent 55%),
    linear-gradient(180deg, rgba(8, 16, 30, 0.95), rgba(4, 10, 18, 0.98));
}

.cc-modal--gop3 .cc-panel[data-panel="chat"].is-active {
  display: flex;
}

.cc-chat {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.cc-chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(66, 135, 245, 0.28);
  background: rgba(0, 0, 0, 0.35);
  font-family: var(--cc-font-display);
  letter-spacing: 0.08em;
}

.cc-chat-head strong {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.cc-chat-head__sub {
  font-size: 10px;
  color: var(--xg-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cc-chat-head__live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3dcf4a;
  box-shadow: 0 0 8px rgba(61, 207, 74, 0.85);
  animation: ccLivePulse 1.6s ease-in-out infinite;
}

@keyframes ccLivePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}

.cc-chat-log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(66, 135, 245, 0.08), transparent 55%),
    linear-gradient(180deg, #0c1628 0%, #08101c 100%);
  scrollbar-width: thin;
  scrollbar-color: rgba(66, 135, 245, 0.4) transparent;
}

.cc-chat-day {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0 2px;
  color: rgba(170, 195, 220, 0.65);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.cc-chat-day::before,
.cc-chat-day::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(66, 135, 245, 0.35), transparent);
}

.cc-chat-sys {
  align-self: center;
  max-width: 92%;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(240, 193, 74, 0.12);
  border: 1px solid rgba(240, 193, 74, 0.35);
  color: #ffe9a8;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.cc-chat-warn {
  align-self: center;
  max-width: 94%;
  color: #ff7a85;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  line-height: 1.35;
}

.cc-chat-row {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 78%;
}

.cc-chat-row.is-mine {
  align-self: flex-end;
  flex-direction: row;
}

.cc-chat-row.is-other {
  align-self: flex-start;
  flex-direction: row-reverse;
}

.cc-chat-bubble {
  position: relative;
  padding: 5px 10px 6px;
  border-radius: 8px;
  background: rgba(18, 32, 56, 0.95);
  color: #e8f4ff;
  border: 1px solid rgba(126, 182, 255, 0.28);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  max-width: 100%;
  min-width: 0;
}

.cc-chat-row.is-mine .cc-chat-bubble {
  background: linear-gradient(160deg, rgba(36, 72, 140, 0.95), rgba(18, 40, 84, 0.98));
  border-color: rgba(126, 182, 255, 0.4);
}

.cc-chat-row.is-other .cc-chat-bubble {
  background: rgba(14, 24, 42, 0.96);
}

.cc-chat-row.is-mine .cc-chat-bubble::after {
  content: "";
  position: absolute;
  right: -7px;
  top: 50%;
  margin-top: -6px;
  border: 7px solid transparent;
  border-left-color: rgba(28, 58, 118, 0.98);
  border-right: 0;
}

.cc-chat-row.is-other .cc-chat-bubble::after {
  content: "";
  position: absolute;
  left: -7px;
  top: 50%;
  margin-top: -6px;
  border: 7px solid transparent;
  border-right-color: rgba(14, 24, 42, 0.96);
  border-left: 0;
}

.cc-chat-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.cc-chat-meta .you {
  color: #7eb6ff;
  text-transform: uppercase;
}

.cc-chat-meta .name {
  color: #7eb6ff;
  font-weight: 800;
}

.cc-chat-meta .clan { display: none; }

.cc-chat-meta .role {
  color: #ff6b6b;
  font-weight: 800;
  margin-left: auto;
}

.cc-chat-text {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  word-break: break-word;
  color: #f0f6ff;
}

.cc-chat-face {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(145deg, #3a6ab0, #1a3558);
  border: 1px solid rgba(126, 182, 255, 0.45);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}

.cc-chat-face.has-ship {
  background: radial-gradient(circle at 50% 40%, #1a2a44, #0a1424);
}

.cc-chat-face .cc-chat-ship {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  image-rendering: auto;
  position: relative;
  z-index: 1;
}

.cc-chat-face .cc-chat-face__letter {
  display: none;
  position: absolute;
  inset: 0;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  z-index: 0;
}

.cc-chat-face.is-fallback .cc-chat-face__letter {
  display: grid;
}

.cc-chat-face .lvl {
  position: absolute;
  top: -4px;
  right: -4px;
  left: auto;
  bottom: auto;
  min-width: 18px;
  height: 16px;
  padding: 0 4px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  background: #c42828;
  border: 1px solid rgba(255, 255, 255, 0.5);
  display: grid;
  place-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.cc-chat-time {
  font-size: 11px;
  font-weight: 700;
  color: rgba(170, 195, 220, 0.65);
  align-self: center;
  margin: 0;
  letter-spacing: 0.02em;
  min-width: 36px;
}

.cc-chat-compose {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 10px;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.45);
  border-top: 1px solid rgba(66, 135, 245, 0.28);
}

.cc-emoji-pop {
  position: fixed;
  left: 12px;
  bottom: 72px;
  width: min(440px, calc(100vw - 24px));
  height: min(340px, 42vh);
  z-index: 10050;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  background: linear-gradient(180deg, #122038, #0a1424);
  border: 1px solid rgba(126, 182, 255, 0.55);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 24px rgba(66, 135, 245, 0.2);
  overflow: hidden;
  box-sizing: border-box;
}

.cc-emoji-pop[hidden] { display: none !important; }

.cc-emoji-pop::after {
  display: none;
}

.cc-emoji-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 12px 6px;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(126, 182, 255, 0.2);
}

.cc-emoji-tab {
  padding: 6px 12px;
  border-radius: 8px;
  font-family: var(--cc-font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(170, 195, 220, 0.75);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
}

.cc-emoji-tab.is-active {
  color: #fff;
  border-color: rgba(126, 182, 255, 0.55);
  background: rgba(66, 135, 245, 0.18);
}

.cc-emoji-tab--special {
  color: #f0c14a;
}

.cc-emoji-tab--special.is-active {
  border-color: rgba(240, 193, 74, 0.55);
  color: #f0c14a;
  background: rgba(240, 193, 74, 0.1);
}

.cc-emoji-banner {
  margin: 8px 12px 0;
  padding: 6px 10px;
  border-radius: 8px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #f0c14a;
  background: rgba(240, 193, 74, 0.1);
  border: 1px solid rgba(240, 193, 74, 0.35);
  flex-shrink: 0;
}

.cc-emoji-banner[hidden] { display: none !important; }

.cc-emoji-grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: scroll;
  padding: 8px 10px 14px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  align-content: start;
  scrollbar-width: thin;
  scrollbar-color: rgba(126, 182, 255, 0.7) rgba(0, 0, 0, 0.35);
  -webkit-overflow-scrolling: touch;
}

.cc-emoji-grid::-webkit-scrollbar {
  width: 10px;
}
.cc-emoji-grid::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 8px;
}
.cc-emoji-grid::-webkit-scrollbar-thumb {
  background: rgba(126, 182, 255, 0.55);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.cc-emoji-item {
  position: relative;
  width: 100%;
  min-height: 44px;
  aspect-ratio: 1;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(126, 182, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  cursor: pointer;
  transition: background 0.12s ease, transform 0.12s ease;
}

.cc-emoji-item:hover {
  background: rgba(66, 135, 245, 0.28);
  transform: translateY(-1px);
}

.cc-emoji-item img {
  width: 36px;
  height: 36px;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  pointer-events: none;
  display: block;
}

.cc-emoji-item.is-locked {
  cursor: not-allowed;
  opacity: 0.55;
}

.cc-emoji-item.is-locked::after {
  content: "";
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 15px;
  height: 15px;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23332100' d='M7 10V8a5 5 0 0 1 10 0v2h1a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h1zm2 0h6V8a3 3 0 0 0-6 0v2z'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #ffe08a, #e0a020);
  background-size: 10px 10px, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
}

.cc-chat-sticker {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.cc-chat-sticker.is-premium {
  width: 48px;
  height: 48px;
}

.cc-chat-emoji {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffe08a, #d49220);
  border: 2px solid rgba(255, 255, 255, 0.55);
  font-size: 20px;
  line-height: 1;
  box-shadow: 0 0 12px rgba(240, 193, 74, 0.35);
  flex-shrink: 0;
  z-index: 1;
}

.cc-chat-emoji:hover {
  filter: brightness(1.08);
}

.cc-chat-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px 5px 14px;
  border-radius: 999px;
  background: rgba(8, 14, 26, 0.9);
  border: 1px solid rgba(66, 135, 245, 0.35);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35), 0 0 12px rgba(66, 135, 245, 0.08);
}

.cc-chat-input-wrap input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--xg-text);
  min-width: 0;
}

.cc-chat-input-wrap input::placeholder {
  color: rgba(170, 195, 220, 0.45);
}

.cc-chat-send {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(180deg, #4a8ef0, #2a5cb8);
  color: #fff;
  font-size: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid rgba(126, 182, 255, 0.45);
  box-shadow: 0 0 10px rgba(66, 135, 245, 0.3);
}

.cc-chat-send:disabled { opacity: 0.45; }

.cc-chat-chests-btn {
  height: 40px !important;
  min-width: 92px;
  padding: 0 14px;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .cc-modal--gop3 .cc-body { grid-template-columns: 1fr !important; }
  .cc-modal--gop3 .cc-sidebar { max-height: 180px; }
  .cc-modal--gop3 .cc-team-block { grid-template-columns: 1fr; }
  .cc-chat-row { max-width: 92%; }
}
