/* ===== GUERRAS DE GUILD — Castle Siege + War Devias (cards modernos) ===== */
.gw-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.gw-grid.is-single { grid-template-columns: minmax(0, 1fr); }

.gw-card {
  --gw: var(--accent, #3fd0ff);
  position: relative; isolation: isolate; overflow: hidden; container-type: inline-size;
  display: flex; flex-direction: column; gap: 16px; min-height: 280px; padding: 18px 20px 20px;
  border-radius: 20px; border: 1px solid rgba(255, 255, 255, .14);
  background: #0c0d0e; box-shadow: 0 14px 40px rgba(0, 0, 0, .55);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), border-color .35s, box-shadow .35s;
}
.gw-card.gw-devias { --gw: #ffcf6b; }
.gw-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--gw) 70%, transparent); box-shadow: 0 20px 50px rgba(0, 0, 0, .6), 0 0 34px -6px var(--gw); }

/* arte de fundo + véu */
.gw-art { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; object-position: 78% 22%; opacity: .55; filter: saturate(1.1); transition: transform .9s cubic-bezier(.2, .8, .2, 1); }
.gw-card:hover .gw-art { transform: scale(1.06); }
.gw-card::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(8, 9, 10, .96) 0%, rgba(8, 9, 10, .78) 45%, rgba(8, 9, 10, .25) 100%),
    linear-gradient(0deg, rgba(8, 9, 10, .92) 0%, rgba(8, 9, 10, 0) 45%),
    radial-gradient(70% 80% at 12% 100%, color-mix(in srgb, var(--gw) 26%, transparent), transparent 70%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .022) 0 1px, transparent 1px 3px);
}
.gw-card > *:not(.gw-art):not(.gw-corner) { position: relative; z-index: 2; }

.gw-corner { position: absolute; z-index: 3; width: 16px; height: 16px; border: 0 solid var(--gw); opacity: .6; pointer-events: none; transition: width .3s, height .3s, opacity .3s; }
.gw-corner.tl { top: 9px; left: 9px; border-top-width: 2px; border-left-width: 2px; border-top-left-radius: 7px; }
.gw-corner.tr { top: 9px; right: 9px; border-top-width: 2px; border-right-width: 2px; border-top-right-radius: 7px; }
.gw-corner.bl { bottom: 9px; left: 9px; border-bottom-width: 2px; border-left-width: 2px; border-bottom-left-radius: 7px; }
.gw-corner.br { bottom: 9px; right: 9px; border-bottom-width: 2px; border-right-width: 2px; border-bottom-right-radius: 7px; }
.gw-card:hover .gw-corner { width: 24px; height: 24px; opacity: 1; }

/* topo */
.gw-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.gw-kicker { font-family: var(--font-mono, monospace); font-size: 12px; font-weight: 600; letter-spacing: .2em; color: var(--gw); text-shadow: 0 0 14px color-mix(in srgb, var(--gw) 60%, transparent); }
.gw-kicker::before { content: "// "; opacity: .55; }
.gw-next {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 11px; border-radius: 999px;
  font-family: var(--font-mono, monospace); font-size: 11px; font-weight: 500; letter-spacing: .04em; color: #fff;
  background: rgba(11, 12, 12, .6); border: 1px solid rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.gw-next small { font-size: 10px; opacity: .65; text-transform: uppercase; letter-spacing: .1em; margin-right: 2px; }
.gw-next i { width: 6px; height: 6px; border-radius: 50%; background: var(--gw); box-shadow: 0 0 9px var(--gw); animation: gw-blink 1.8s ease-in-out infinite; flex: none; }
@keyframes gw-blink { 50% { opacity: .3; } }

/* centro: brasão + dados */
.gw-main { display: flex; align-items: center; gap: 18px; flex: 1; }
.gw-crest {
  flex: none; display: grid; place-items: center; width: 108px; height: 108px; border-radius: 22px; color: var(--gw);
  background: linear-gradient(145deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .02));
  border: 1px solid color-mix(in srgb, var(--gw) 55%, transparent);
  box-shadow: 0 0 0 5px rgba(255, 255, 255, .03), 0 10px 30px rgba(0, 0, 0, .55), inset 0 0 28px color-mix(in srgb, var(--gw) 18%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.gw-crest .guild-svg { width: 84px; height: 84px; border-radius: 8px; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .6)); }
.gw-info { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.gw-label { font-family: var(--font-mono, monospace); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: #9aa4b2; margin-top: 6px; }
.gw-label:first-child { margin-top: 0; }
.gw-owner { font-family: var(--font-head, sans-serif); font-size: clamp(20px, 6.2cqw, 30px); font-weight: 700; line-height: 1.1; color: #fff; letter-spacing: -.01em; text-shadow: 0 2px 14px rgba(0, 0, 0, .7); overflow-wrap: anywhere; }
.gw-master { font-size: 15px; font-weight: 500; color: #e6eaf0; overflow-wrap: anywhere; }
.gw-owner.is-empty, .gw-master.is-empty { color: #8b93a0; font-weight: 500; }
.gw-owner.is-empty { font-size: clamp(16px, 5cqw, 22px); }

/* vitórias / membros */
.gw-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gw-stat {
  display: grid; grid-template-columns: auto 1fr; grid-template-areas: "ico num" "ico lbl"; align-items: center; column-gap: 10px;
  padding: 10px 14px; border-radius: 14px; color: var(--gw);
  background: rgba(12, 13, 14, .62); border: 1px solid rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.gw-stat svg { grid-area: ico; }
.gw-stat b { grid-area: num; font-family: var(--font-head, sans-serif); font-size: 24px; line-height: 1; color: #fff; }
.gw-stat span { grid-area: lbl; font-family: var(--font-mono, monospace); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #9aa4b2; }

.gw-card.is-vacant .gw-crest { border-style: dashed; opacity: .85; }

/* celular */
@media (max-width: 900px) {
  .gw-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .gw-card { min-height: 0; padding: 16px 16px 18px; border-radius: 18px; }
  .gw-crest { width: 88px; height: 88px; border-radius: 18px; }
  .gw-crest .guild-svg { width: 68px; height: 68px; }
  .gw-main { gap: 14px; }
  .gw-art { object-position: 85% 15%; opacity: .45; }
}
@media (prefers-reduced-motion: reduce) { .gw-card, .gw-art, .gw-next i { transition: none !important; animation: none !important; } }
