.clans-wrap {
  padding-top: 120px;
  padding-bottom: 60px;
  position: relative;
  z-index: 2;
}

.clans-hero {
  position: relative;
  overflow: hidden;
  padding: 44px;
  border-radius: 30px;
  margin-bottom: 32px;
  background: linear-gradient(135deg, rgba(217, 40, 40, 0.22), rgba(211, 38, 38, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
}
.clans-hero-glow {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: rgba(255, 0, 0, 0.16);
  filter: blur(110px);
  right: -120px;
  top: -120px;
  pointer-events: none;
}
.clans-hero-content { position: relative; z-index: 2; }
.clans-hero-title {
  font-size: clamp(42px, 7vw, 64px);
  line-height: .92;
  font-weight: 900;
  color: #fff;
  margin: 0 0 14px;
  text-transform: uppercase;
}
.clans-hero-lead {
  max-width: 640px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 16px;
  line-height: 1.7;
  margin: 0 0 26px;
}
.clans-hero-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.clans-count {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 700;
}

.clans-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.clans-loading {
  padding: 50px 20px;
  text-align: center;
  color: var(--text-muted);
  font-weight: 700;
}
.clans-empty {
  padding: 70px 20px;
  text-align: center;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
}
.clans-empty-title {
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 8px;
}
.clans-empty-sub { color: var(--text-muted); font-weight: 700; }

.clanrow {
  display: grid;
  grid-template-columns: 56px 80px 1fr auto auto;
  align-items: center;
  gap: 22px;
  padding: 22px 26px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--border);
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.clanrow:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 89, 89, 0.3);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}
.clanrow.top-1 { border-color: rgba(255, 207, 77, 0.35); }
.clanrow.top-2 { border-color: rgba(216, 216, 216, 0.25); }
.clanrow.top-3 { border-color: rgba(216, 144, 96, 0.25); }

.clanrow-rank {
  font-size: 26px;
  font-weight: 900;
  color: var(--text-muted);
  text-align: center;
}
.clanrow-rank.top-1 {
  color: #ffcf4d;
  text-shadow: 0 0 20px rgba(255, 207, 77, 0.4);
}
.clanrow-rank.top-2 { color: #d8d8d8; }
.clanrow-rank.top-3 { color: #d89060; }

.clanrow-avatar {
  width: 80px;
  height: 80px;
  border-radius: 22px;
  background: linear-gradient(145deg, #302020, #1c1212);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.clanrow-avatar img { width: 100%; height: 100%; object-fit: cover; }
.clanrow-avatar span { font-size: 24px; font-weight: 900; color: #ff7272; }

.clanrow-main { min-width: 0; }
.clanrow-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.clanrow-name {
  font-size: 26px;
  font-weight: 900;
  color: #fff;
}
.clanrow-tag {
  font-size: 14px;
  font-weight: 800;
  color: #ff9e9e;
}
.clanrow-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 6px;
  line-height: 1.5;
  max-width: 520px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.clanrow-members {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 700;
  margin-top: 8px;
}
.clanrow-members i { font-style: normal; }

.clanrow-stats {
  display: flex;
  gap: 24px;
}
.clanrow-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.clanrow-stat-val {
  font-size: 22px;
  font-weight: 900;
  color: #fff;
}
.clanrow-stat-val.accent { color: #ffcf4d; }
.clanrow-stat-val.kd { color: #fc8484; }
.clanrow-stat-lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  font-weight: 800;
}

.clanrow-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 150px;
}
.clan-act {
  padding: 12px 20px;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
  transition: all .25s ease;
  text-decoration: none;
}
.clan-act.join {
  background: linear-gradient(90deg, #22c52a, #4ade80);
  color: #04110a;
}
.clan-act.join:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(40, 197, 34, 0.3); }
.clan-act.leave {
  background: linear-gradient(90deg, #dc2626, #ef4444);
  color: #fff;
}
.clan-act.leave:hover { transform: translateY(-2px); }
.clan-act.manage {
  background: linear-gradient(90deg, #ed3a3a, #d32626);
  color: #fff;
}
.clan-act.manage:hover { transform: translateY(-2px); }
.clan-act.requested, .clan-act.disabled {
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  cursor: not-allowed;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.clan-act.link {
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}
.clan-act.link:hover { background: rgba(255, 255, 255, 0.07); }

@media (max-width: 1050px) {
  .clanrow {
    grid-template-columns: 48px 64px 1fr;
    gap: 16px;
  }
  .clanrow-stats {
    grid-column: 1 / -1;
    justify-content: flex-start;
    gap: 28px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
  }
  .clanrow-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    min-width: 0;
  }
  .clan-act { flex: 1; }
}
@media (max-width: 600px) {
  .clans-hero { padding: 28px; }
  .clanrow { padding: 18px; }
  .clanrow-name { font-size: 20px; }
  .clanrow-avatar { width: 56px; height: 56px; }
  .clanrow-desc { display: none; }
  .clanrow-stats { gap: 18px; }
  .clanrow-actions { flex-direction: column; }
}
@media (hover: none) {
  .clanrow:hover { transform: none; }
}