/* Guilds page - clean cards: ONLY name + added by + recruiting (UTF-8 no BOM) */

.section.guilds{
  padding-top: 8px;
  max-width: none !important;
  width: 100% !important;
}

/* HERO */
.guilds-hero{
  margin: 10px 0 12px 0;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(217,180,95,.28);
  background:
    linear-gradient(180deg, rgba(0,0,0,.30), rgba(0,0,0,.18)),
    radial-gradient(circle at 15% 10%, rgba(217,180,95,.12), rgba(0,0,0,0) 55%);
  box-shadow: 0 10px 24px rgba(0,0,0,.22);
}

.guilds-hero__title{
  font-size: 18px;
  font-weight: 900;
  color: rgba(246,240,226,.96);
  letter-spacing: .2px;
}

.guilds-hero__sub{
  margin-top: 6px;
  font-size: 12px;
  color: rgba(246,240,226,.70);
}

/* ALERTS */
.guilds-alert{
  margin: 10px 0;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.26);
  color: rgba(246,240,226,.90);
  box-shadow: 0 10px 24px rgba(0,0,0,.20);
}

.guilds-alert--error{ border-color: rgba(239,68,68,.32); }

.guilds-alert__title{ font-weight: 900; font-size: 14px; }

.guilds-alert__text{
  margin-top: 8px;
  font-size: 12px;
  color: rgba(246,240,226,.78);
  line-height: 1.45;
}

.guilds-alert__actions{ margin-top: 10px; }

/* GRID */
.guilds-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 10px 0;
  width: 100%;
}

/* BADGES */
.g-badge{
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.22);
  color: rgba(246,240,226,.86);
  white-space: nowrap;
}

.g-badge--green{
  border-color: rgba(34,197,94,.25);
  background: rgba(34,197,94,.12);
  color: rgba(240,255,246,.92);
}

.g-badge--dark{
  opacity: .95;
  border-color: rgba(255,255,255,.10);
  background: rgba(0,0,0,.20);
}

/* CARD */
.guild-card{
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(217,180,95,.26);
  background:
    linear-gradient(180deg, rgba(0,0,0,.28), rgba(0,0,0,.16)),
    radial-gradient(circle at 18% 18%, rgba(217,180,95,.13), rgba(0,0,0,0) 60%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    0 10px 22px rgba(0,0,0,.22);
  padding: 12px;
  width: 100%;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}

.guild-card:hover{
  transform: translateY(-1px);
  border-color: rgba(217,180,95,.46);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    0 12px 26px rgba(0,0,0,.28);
}

.guild-card.is-recruiting{
  border-color: rgba(34,197,94,.22);
}

/* full card link */
.guild-card__link{
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* content above overlay */
.guild-card__inner{
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.guild-card__left{
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

/* Logo */
.guild-logo{
  width: 56px;
  height: 56px;
  border-radius: 14px;
  padding: 4px;
  background: rgba(0,0,0,.22);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  flex: 0 0 auto;
}

.guild-logo img{
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  display: block;
}

.guild-main{
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* NAME */
.guild-nameRow{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.guild-nameWrap{
  min-width: 0;
  max-width: 100%;
}

.guild-name{
  display: inline-block;
  padding: 7px 12px;
  border-radius: 12px;
  font-weight: 900;
  font-size: 16px;
  letter-spacing: .15px;
  color: #F5D76E;
  background: rgba(0,0,0,.20);
  border: 1px solid rgba(217,180,95,.24);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.06),
    0 10px 18px rgba(0,0,0,.18);
  text-shadow:
    0 1px 0 rgba(0,0,0,.55),
    0 6px 18px rgba(0,0,0,.30);
  max-width: 720px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* OWNER */
.guild-ownerRow{
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.g-owner{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 12px;
  color: rgba(246,240,226,.82);
}

.g-owner__label{ opacity: .84; }

.g-owner__av{
  width: 18px;
  height: 18px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
  flex: 0 0 auto;
}

.g-owner__name,
.g-owner__name:visited{
  position: relative;
  z-index: 3; /* above full-card link */
  color: rgba(246,240,226,.92);
  font-weight: 900;
  text-decoration: none;
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.g-owner__name:hover{
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ACTIONS */
.guild-actions{
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.guild-viewBtn{
  position: relative;
  z-index: 3; /* above full-card link */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(217,180,95,.26);
  background: rgba(0,0,0,.18);
  color: rgba(246,240,226,.92);
  font-weight: 900;
  font-size: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07);
  text-decoration: none;
}

.guild-viewBtn:hover{
  border-color: rgba(217,180,95,.42);
  text-decoration: none;
}

/* SHINE + SPARK */
.guild-card__shine{
  position: absolute;
  left: -40%;
  top: -60%;
  width: 120%;
  height: 120%;
  transform: rotate(12deg);
  background: linear-gradient(90deg,
    rgba(255,255,255,0) 0%,
    rgba(217,180,95,.10) 45%,
    rgba(255,255,255,0) 70%);
  opacity: 0;
  pointer-events: none;
}

.guild-card:hover .guild-card__shine{
  opacity: 1;
  animation: guildShine 1.2s ease forwards;
}

@keyframes guildShine{
  0%   { transform: translateX(-35%) rotate(12deg); opacity: 0; }
  20%  { opacity: .65; }
  100% { transform: translateX(35%) rotate(12deg); opacity: 0; }
}

.guild-card__spark{
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .40;
  background:
    radial-gradient(circle at 12% 30%, rgba(217,180,95,.18), rgba(0,0,0,0) 22%),
    radial-gradient(circle at 78% 24%, rgba(255,255,255,.10), rgba(0,0,0,0) 18%),
    radial-gradient(circle at 85% 70%, rgba(217,180,95,.14), rgba(0,0,0,0) 22%),
    radial-gradient(circle at 22% 78%, rgba(255,255,255,.08), rgba(0,0,0,0) 20%);
  mix-blend-mode: screen;
}

.guild-card:hover .guild-card__spark{
  animation: sparkFloat 2.2s ease-in-out infinite;
}

@keyframes sparkFloat{
  0%,100%{ transform: translateY(0); opacity: .38; }
  50%    { transform: translateY(-2px); opacity: .58; }
}

/* MOBILE */
@media (max-width: 720px){
  .guild-card__inner{
    flex-direction: column;
    align-items: stretch;
  }
  .guild-actions{
    justify-content: flex-start;
  }
  .guild-name{
    max-width: 100%;
  }
}

/* REDUCE MOTION */
@media (prefers-reduced-motion: reduce){
  .guild-card,
  .guild-card:hover,
  .guild-card__shine,
  .guild-card__spark{
    animation: none !important;
    transition: none !important;
  }
}
