/* Clans list & profile shared styles */
.clans-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.clans-top {
  display: flex;
  align-items: center;
  gap: 10px;
  direction: ltr;
}

.clans-back-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(23, 23, 23, 0.8);
  color: #fff;
  font-size: 20px;
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s;
}

.clans-back-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(184, 14, 19, 0.35);
}

.clans-search-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  width: min(72%, 260px);
  padding: 0 10px;
  background: rgba(23, 23, 23, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  min-height: 38px;
}

.clans-search {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  padding: 8px 0;
  direction: rtl;
}

.clans-action-btn {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid #B80E13;
  background: linear-gradient(180deg, #2B2B2D 0%, #1C1C1E 100%);
  color: #e0474b;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.clans-action-btn:disabled,
.clans-action-btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.clans-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 520px) {
  .clans-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.clan-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, #1C1C1E 0%, #161617 100%);
  border: 1px solid #4a3840;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.12s, transform 0.12s;
}

.clan-card:hover {
  border-color: #B80E13;
  transform: translateY(-1px);
}

.clan-card-logo {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: contain;
  background: #161617;
  border: 1px solid #5a4048;
  flex-shrink: 0;
}

.clan-card-body {
  flex: 1;
  min-width: 0;
}

.clan-card-name {
  font-size: 15px;
  font-weight: 700;
  color: #e0474b;
  margin-bottom: 4px;
}

.clan-card-desc {
  font-size: 12px;
  line-height: 1.5;
  color: #b8b0b4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.clan-card-rank {
  font-size: 11px;
  color: #9a8a90;
  margin-top: 6px;
}

.clans-empty {
  text-align: center;
  color: #9a8a90;
  padding: 24px 12px;
}

/* Profile */
.clan-profile-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 16px;
  margin-bottom: 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, #1C1C1E 0%, #161617 100%);
  border: 1px solid #4a3840;
}

.clan-profile-logo {
  width: 88px;
  height: 88px;
  border-radius: 16px;
  object-fit: contain;
  background: #161617;
  border: 2px solid #B80E13;
  margin-bottom: 12px;
}

.clan-profile-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: #e0474b;
  margin: 0 0 4px;
}

.clan-profile-tag {
  font-size: 13px;
  color: #B80E13;
  margin-bottom: 8px;
}

.clan-profile-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  margin: 12px 0;
  font-size: 12px;
  color: #d0c8cc;
}

.clan-profile-stat strong {
  color: #e0474b;
}

.clan-xp-bar {
  width: 100%;
  max-width: 280px;
  margin-top: 12px;
}

.clan-xp-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #9a8a90;
  margin-bottom: 4px;
}

.clan-xp-track {
  height: 8px;
  border-radius: 4px;
  background: #232325;
  overflow: hidden;
  border: 1px solid #5a4048;
}

.clan-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #B80E13, #e0474b);
  border-radius: 3px;
  transition: width 0.3s;
}

.clan-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 16px;
}

.clan-btn {
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid #5a4048;
  background: linear-gradient(180deg, #232325 0%, #18181a 100%);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.clan-btn--primary {
  border-color: #B80E13;
  color: #e0474b;
}

.clan-btn--danger {
  border-color: #8b3030;
  color: #ff8888;
}

.clan-btn--with-badge {
  position: relative;
  padding-inline-end: 14px;
}

.clan-btn-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-inline-start: 8px;
  padding: 0 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, #c93030 0%, #8b1c1c 100%);
  border: 1px solid #ff6666;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
}

.clan-section {
  margin-bottom: 16px;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, #1C1C1E 0%, #161617 100%);
  border: 1px solid #4a3840;
}

.clan-section-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: #e0474b;
}

.clan-rules-text,
.clan-desc-text {
  font-size: 13px;
  line-height: 1.7;
  color: #d0c8cc;
  white-space: pre-wrap;
}

.clan-members-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.clan-member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid #3a2830;
}

.clan-member-avatar-wrap {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.clan-member-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.clan-member-frame {
  width: 40px;
  height: 40px;
  position: absolute;
  inset: 0;
}

.clan-member-info {
  flex: 1;
  min-width: 0;
}

.clan-member-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.clan-member-role {
  font-size: 11px;
  color: #B80E13;
}

.clan-member-actions {
  display: flex;
  gap: 4px;
}

.clan-member-actions button {
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 6px;
  border: 1px solid #5a4048;
  background: #232325;
  color: #fff;
  cursor: pointer;
}

.clan-friends-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.clan-friend-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 20px;
  background: #232325;
  border: 1px solid #5a4048;
  font-size: 12px;
  color: #fff;
  text-decoration: none;
}

.clan-friend-chip img {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.clan-form-group {
  margin-bottom: 12px;
}

.clan-form-group label {
  display: block;
  font-size: 12px;
  color: #B80E13;
  margin-bottom: 4px;
}

.clan-form-group input,
.clan-form-group textarea,
.clan-form-group select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #5a4048;
  background: #161617;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
}

.clan-logo-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.clan-logo-option {
  width: 48px;
  height: 48px;
  padding: 4px;
  border-radius: 10px;
  border: 2px solid transparent;
  background: #161617;
  cursor: pointer;
}

.clan-logo-option.is-selected {
  border-color: #e0474b;
}

.clan-logo-option img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.clan-form-msg {
  font-size: 12px;
  margin: 8px 0;
  color: #ff8888;
}

.clan-form-msg.is-success {
  color: #88ff88;
}

.clan-request-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  margin-bottom: 8px;
}

.clan-request-actions {
  display: flex;
  gap: 6px;
}

.clan-chip--list {
  text-decoration: none;
}

.clan-chip--list .chip-label {
  font-size: 10px;
  color: #9a8a90;
}

.clan-chip-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: contain;
}
