/* ================================================================
   Cyber Gyn medieval portal shell
   ================================================================ */
:root {
  --portal-night: #0b1020;
  --portal-night-soft: #182039;
  --portal-wood: #3b2418;
  --portal-wood-dark: #21130d;
  --portal-green: #173f24;
  --portal-green-dark: #0b2415;
  --portal-wine: #741d1b;
  --portal-gold: #c89a3c;
  --portal-gold-light: #f0d078;
  --portal-paper: #ead9b7;
  --portal-paper-light: #fff0ce;
  --portal-ink: #552a12;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -10%, rgba(93, 108, 163, .42), transparent 35rem),
    linear-gradient(rgba(4, 8, 19, .28), rgba(4, 8, 19, .76)),
    repeating-linear-gradient(135deg, #11182c 0, #11182c 5px, #0b1020 5px, #0b1020 10px);
  background-attachment: fixed;
  color: var(--portal-ink);
}

.container.portal-shell {
  width: min(1260px, calc(100% - 20px));
  display: grid;
  grid-template-columns: 205px minmax(0, 1fr) 210px;
  grid-template-areas:
    "banner banner banner"
    "status status status"
    "nav content side"
    "footer footer footer";
  gap: 9px;
  padding-bottom: 14px;
}

.portal-shell > .banner {
  grid-area: banner;
  margin-top: 10px;
  border: 3px solid #15110e;
  border-radius: 7px;
  box-shadow:
    0 0 0 2px var(--portal-gold),
    0 7px 18px rgba(0, 0, 0, .62),
    inset 0 0 18px rgba(0, 0, 0, .35);
}

.portal-shell > .portal-statusbar {
  grid-area: status;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 13px;
  border: 2px solid #25150d;
  outline: 1px solid #8d692c;
  color: #f4ddb0;
  background:
    linear-gradient(rgba(255,255,255,.05), rgba(0,0,0,.22)),
    repeating-linear-gradient(90deg, #631916 0, #631916 8px, #561310 8px, #561310 16px);
  box-shadow: 0 3px 8px rgba(0,0,0,.5), inset 0 0 12px rgba(0,0,0,.45);
  font-size: 12px;
  text-shadow: 1px 1px #000;
}

.portal-status-live {
  color: #fff2c8;
}

.portal-status-live i,
.portal-status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 6px;
  border-radius: 50%;
  background: #72cc4a;
  box-shadow: 0 0 7px rgba(113, 227, 72, .85);
}

.portal-shell > .menu {
  grid-area: nav;
  align-self: start;
  position: sticky;
  top: 8px;
  display: block;
  margin: 0;
  border: 3px solid #16110d;
  border-radius: 5px;
  outline: 1px solid #92703b;
  background: linear-gradient(90deg, var(--portal-wood-dark), var(--portal-wood), var(--portal-wood-dark));
  box-shadow: 0 5px 14px rgba(0,0,0,.58), inset 0 0 15px rgba(0,0,0,.55);
}

.portal-shell .menu-top {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #9b7232;
  background: radial-gradient(circle at 50% 20%, #604329, #2b190f 72%);
}

.portal-shell .menu-top .brand {
  width: 100%;
  padding: 16px 8px;
  border: 0;
  color: var(--portal-gold-light);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 24px;
  text-align: center;
  letter-spacing: .5px;
  text-shadow: 0 2px #100a06, 0 0 8px rgba(240,208,120,.25);
}

.portal-nav-title,
.portal-side-card > h3 {
  margin: 0;
  padding: 8px 10px;
  border-top: 1px solid #81632e;
  border-bottom: 2px solid #100b08;
  color: #f3d786;
  background:
    linear-gradient(rgba(255,255,255,.05), rgba(0,0,0,.25)),
    repeating-linear-gradient(90deg, var(--portal-green) 0, var(--portal-green) 8px, var(--portal-green-dark) 8px, var(--portal-green-dark) 16px);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  text-shadow: 1px 2px #000;
}

.portal-shell .menu-links {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: stretch;
  padding: 6px;
}

.portal-shell .menu-links a,
.portal-shell .menu-links a.right {
  position: relative;
  margin: 0;
  padding: 10px 9px 10px 25px;
  border: 0;
  border-bottom: 1px solid rgba(214,177,99,.2);
  color: #f5e2bc;
  background: linear-gradient(90deg, rgba(255,255,255,.025), transparent);
  font-size: 13px;
  text-shadow: 1px 1px #000;
}

.portal-shell .menu-links a::before {
  content: '◆';
  position: absolute;
  left: 8px;
  color: #b88b37;
  font-size: 9px;
  top: 12px;
}

.portal-shell .menu-links a:hover,
.portal-shell .menu-links a:focus-visible,
.portal-shell .menu-links a.active {
  color: #fff1b2;
  background: linear-gradient(90deg, rgba(22,83,42,.9), rgba(10,38,20,.45));
}

.portal-shell > main {
  grid-area: content;
  min-width: 0;
  margin: 0;
  border: 3px solid #21150f;
  border-radius: 5px;
  outline: 1px solid #a77d39;
  background:
    linear-gradient(rgba(255,255,255,.18), rgba(90,40,0,.04)),
    repeating-linear-gradient(0deg, transparent 0, transparent 27px, rgba(111,72,28,.025) 27px, rgba(111,72,28,.025) 28px),
    var(--portal-paper);
  box-shadow: 0 6px 17px rgba(0,0,0,.55), inset 0 0 20px rgba(87,47,13,.16);
}

.portal-shell > main > h2,
.portal-shell > main > .support-language-switch + h2 {
  margin: -12px -12px 14px;
  padding: 9px 16px;
  border-bottom: 3px solid #21150f;
  color: #f4d884;
  background: linear-gradient(180deg, #28552d, #102d19);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(22px, 3vw, 30px);
  text-shadow: 1px 2px #000;
}

.portal-shell > .portal-sidebar {
  grid-area: side;
  align-self: start;
  display: grid;
  gap: 9px;
}

.portal-side-card {
  overflow: hidden;
  border: 3px solid #17110d;
  border-radius: 5px;
  outline: 1px solid #92703b;
  color: #f3dfbd;
  background: linear-gradient(145deg, #432a1b, #21140e);
  box-shadow: 0 5px 14px rgba(0,0,0,.58), inset 0 0 14px rgba(0,0,0,.4);
  text-align: center;
}

.portal-side-card > h3 {
  font-size: 16px;
}

.portal-side-card p {
  margin: 10px 12px;
  color: #efdbb7;
  font-size: 12px;
  line-height: 1.45;
}

.portal-store-link {
  display: block;
  padding: 13px 10px;
}

.portal-store-link img {
  display: block;
  width: 100%;
  height: auto;
}

.portal-action {
  display: block;
  margin: 10px;
  padding: 10px 8px;
  border: 2px solid #140d08;
  border-radius: 4px;
  color: #fff6c6;
  font-weight: 700;
  text-decoration: none;
  text-shadow: 1px 2px #000;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.2), 0 2px 4px rgba(0,0,0,.55);
}

.portal-action-blue {
  background: linear-gradient(#1765dd, #07369d);
}

.portal-action-gold {
  background: linear-gradient(#986622, #55340f);
}

.portal-social-links {
  display: flex;
  justify-content: center;
  gap: 13px;
  padding: 14px;
}

.portal-social-links a {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid #b18745;
  border-radius: 5px;
  background: #ead9b7;
}

.portal-social-links img {
  max-width: 34px;
  max-height: 34px;
}

.portal-shell > .footer {
  grid-area: footer;
  margin: 0;
  border: 2px solid #18110c;
  outline: 1px solid #75582c;
  color: #d9c39c;
  background: linear-gradient(#342116, #1d120d);
}

@media (max-width: 900px) {
  .container.portal-shell {
    width: min(760px, calc(100% - 12px));
    grid-template-columns: 1fr;
    grid-template-areas:
      "banner"
      "status"
      "nav"
      "content"
      "side"
      "footer";
  }

  .portal-shell > .portal-statusbar {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }

  .portal-shell > .menu {
    position: static;
  }

  .portal-shell .menu-top {
    min-height: 50px;
    justify-content: space-between;
  }

  .portal-shell .menu-top .brand {
    width: auto;
    padding: 10px 14px;
    text-align: left;
  }

  .portal-shell .menu-toggle {
    display: inline-flex;
    margin-right: 8px;
  }

  .portal-shell .portal-nav-title {
    display: none;
  }

  .portal-shell .menu-links {
    display: none;
  }

  .portal-shell .menu-links.is-open {
    display: flex;
  }

  .portal-shell > .portal-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Keep submenu entries compact after the legacy menu safeguards above. */
.portal-shell #mainMenu .menu-links .portal-menu-submenu a,
.portal-shell #mainMenu .menu-links .portal-menu-submenu a.right {
  display: block !important;
  width: 100% !important;
  min-height: 25px !important;
  margin: 0 !important;
  padding: 5px 7px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(175,213,198,.27) !important;
  color: #f4f5eb !important;
  background: transparent !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  white-space: normal !important;
  text-align: left !important;
}

.portal-shell #mainMenu .menu-links .portal-menu-submenu a:hover,
.portal-shell #mainMenu .menu-links .portal-menu-submenu a:focus-visible,
.portal-shell #mainMenu .menu-links .portal-menu-submenu a.active {
  color: #fff3a6 !important;
  background: rgba(15,87,78,.85) !important;
}

/* Guilds */
.guild-page {
  --guild-green: #174c2a;
  --guild-green-dark: #0c2e1a;
  --guild-gold: #bd8427;
  --guild-gold-light: #f0cc72;
  --guild-ink: #4c270d;
  color: var(--guild-ink);
}

.guild-heading {
  position: relative;
  overflow: hidden;
  margin: 4px 0 16px;
  padding: 19px 22px 17px;
  border: 1px solid #8b5b26;
  background:
    radial-gradient(circle at 88% 20%, rgba(240,204,114,.19), transparent 28%),
    linear-gradient(135deg, #0d301b, #1d5b31 58%, #102f1c);
  box-shadow: inset 0 0 0 2px rgba(242,211,139,.12), 0 3px 0 #552d10;
  color: #fff4d0;
  text-align: center;
}

.guild-heading::after {
  content: "⚔";
  position: absolute;
  right: 22px;
  top: 8px;
  color: rgba(245,208,119,.16);
  font-size: 72px;
  transform: rotate(-12deg);
}

.guild-heading h2 {
  position: relative;
  z-index: 1;
  margin: 1px 0 5px;
  color: #ffe18d;
  font-size: clamp(28px, 4vw, 38px);
  text-shadow: 0 2px 0 #311400;
}

.guild-heading p { position: relative; z-index: 1; margin: 0; }
.guild-heading .guild-kicker { color: #dfb858; font-size: 12px; font-weight: 800; letter-spacing: .18em; }

.guild-account,
.guild-section {
  margin: 14px 0;
}

.guild-login-card,
.guild-membership-card,
.guild-player-strip,
.guild-create-card,
.guild-invite-card,
.guild-invitation-row {
  border: 1px solid #b28b55;
  background: linear-gradient(180deg, rgba(255,249,230,.88), rgba(232,207,161,.72));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.43);
}

.guild-login-card,
.guild-membership-card,
.guild-invitation-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
}

.guild-player-strip {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 14px;
  border-left: 4px solid var(--guild-green);
}

.guild-avatar,
.guild-card-icon,
.guild-crest {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border: 1px solid #794a17;
  border-radius: 50%;
  background: radial-gradient(circle, #f8de8b, #9d641b);
  color: #3a1d08;
  font-size: 23px;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.25), 0 2px 4px rgba(55,25,5,.25);
}

.guild-crest { width: 58px; height: 58px; font-size: 31px; }
.guild-player-identity { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.guild-player-identity strong { color: #2e1606; font-size: 18px; }
.guild-player-level { color: #75501d; font-weight: 700; }
.guild-small-label { color: #836029; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.guild-card-copy { flex: 1 1 auto; min-width: 0; }
.guild-card-copy h3, .guild-card-copy p, .guild-card-copy span { margin: 0; }
.guild-card-copy h3 { color: #522500; font-size: 21px; }
.guild-card-copy span { display: block; }

.guild-create-card,
.guild-invite-card {
  margin-top: 12px;
  padding: 15px;
}

.guild-create-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 12px; }
.guild-create-form { display: grid; grid-template-columns: minmax(150px, 1fr) auto; gap: 7px 10px; align-items: end; }
.guild-create-form label { grid-column: 1 / -1; font-weight: 800; }
.guild-create-form input,
.guild-search-form input {
  box-sizing: border-box;
  min-height: 39px;
  padding: 8px 10px;
  border: 1px solid #9b7544;
  background: #fffaf0;
  color: #381b07;
  font: inherit;
}

.guild-section {
  border: 1px solid #9b7544;
  background: rgba(250,235,204,.62);
  box-shadow: 0 2px 0 rgba(83,43,11,.25);
}

.guild-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid #8d642e;
  background: linear-gradient(180deg, #205d34, #113d23);
  color: #ffe294;
  text-shadow: 0 1px 0 #1d0e02;
}
.guild-section-title h3 { margin: 0; font-size: 19px; }
.guild-directory { padding-bottom: 12px; }
.guild-directory > .guild-search-form,
.guild-directory > .guild-list-status,
.guild-directory > .guild-list { margin-left: 12px; margin-right: 12px; }

.guild-search-form {
  display: flex;
  gap: 7px;
  margin-top: 12px;
  margin-bottom: 12px;
}
.guild-search-form input { flex: 1 1 auto; min-width: 0; }
.guild-search-form button,
.guild-primary-button,
.guild-secondary-button,
.guild-gold-button,
.guild-danger-button,
.guild-small-button {
  min-height: 36px;
  padding: 7px 13px;
  border: 1px solid #56300b;
  border-radius: 3px;
  cursor: pointer;
  color: #fff7da;
  background: linear-gradient(#287b44, #15512c);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 2px 0 #552a08;
  font: inherit;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}
.guild-gold-button { background: linear-gradient(#d99d31, #995d12); }
.guild-secondary-button { background: linear-gradient(#8c775f, #5f4933); }
.guild-danger-button { background: linear-gradient(#a84535, #702319); }
.guild-small-button, .guild-compact-button { min-height: 30px; padding: 4px 9px; font-size: 13px; }
.guild-search-form button:hover,
.guild-primary-button:hover,
.guild-gold-button:hover,
.guild-small-button:hover { filter: brightness(1.12); color: white; }
.guild-search-form button:disabled,
.guild-primary-button:disabled,
.guild-gold-button:disabled,
.guild-small-button:disabled { cursor: wait; filter: grayscale(.65); opacity: .7; }

.guild-inline-actions { display: flex; flex: 0 0 auto; gap: 7px; flex-wrap: wrap; }
.guild-invite-card h3 { margin: 0 0 4px; color: #572800; }
.guild-invite-card > p { margin: 0 0 10px; }
.guild-character-results { display: grid; gap: 6px; }
.guild-character-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(131,87,34,.48);
  background: rgba(255,250,237,.65);
}

.guild-invitation-row { border-width: 0 0 1px; box-shadow: none; }
.guild-invitation-row:last-child { border-bottom: 0; }
.guild-notice { margin: 11px 0; padding: 10px 13px; border: 1px solid; font-weight: 700; }
.guild-notice.is-info { border-color: #39709e; background: #dcecf8; color: #17466c; }
.guild-notice.is-success { border-color: #367b47; background: #dcefdc; color: #174d24; }
.guild-notice.is-error { border-color: #a24b3d; background: #f6ded6; color: #762317; }
.guild-loading, .guild-empty, .guild-error, .guild-list-status { padding: 9px 0; }
.guild-error { color: #8c251b; }

.guild-detail-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  border-bottom: 1px solid #946b35;
  background: linear-gradient(90deg, rgba(24,79,43,.14), rgba(207,155,55,.12));
}
.guild-detail-heading h3 { margin: 0; font-size: 25px; }
.guild-table { width: 100%; margin: 0; }
.guild-table th { white-space: nowrap; }
.guild-name-link { font-weight: 800; }

/* A tabela de guildas não deve herdar o fundo claro da primeira coluna
   usado nas tabelas comuns de informações. */
.guild-directory .guild-table td:first-child {
  width: auto;
  background: transparent;
}

.guild-member-table {
  border-collapse: collapse;
  background: #ead6b5;
  color: #4b2508;
}

.guild-member-table th {
  padding: 10px;
  border: 1px solid #8d642e;
  background: linear-gradient(180deg, #205d34, #113d23);
  color: #ffe294;
  text-align: left;
  text-shadow: 0 1px 0 #1d0e02;
}

.guild-member-table td,
.guild-member-table td:first-child {
  padding: 10px;
  border: 1px solid #b28b55;
  background: #f1e0c6;
  color: #4b2508;
}

.guild-member-table td:first-child {
  text-align: center;
}

.guild-member-table tbody tr:nth-child(even) td,
.guild-member-table tbody tr:nth-child(even) td:first-child {
  background: #dfc7a4;
}

.guild-member-table a {
  color: #18552f;
  font-weight: 800;
}

.guild-member-table a:hover,
.guild-member-table a:focus-visible {
  color: #8b4f12;
}

.guild-public-page .guild-section {
  overflow: hidden;
}

.guild-public-back {
  display: inline-block;
  margin: 0 0 12px;
  color: #18552f;
  font-weight: 800;
}

.guild-public-summary {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px;
  border-bottom: 1px solid #946b35;
  background: linear-gradient(90deg, rgba(24,79,43,.16), rgba(207,155,55,.14));
}

.guild-public-summary h2 {
  margin: 0 0 4px;
  color: #522500;
  font-size: clamp(24px, 4vw, 32px);
}

.guild-public-meta {
  display: flex;
  gap: 8px 18px;
  flex-wrap: wrap;
  color: #684015;
  font-weight: 700;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 680px) {
  .guild-heading { padding: 16px 12px; }
  .guild-heading::after { display: none; }
  .guild-login-card,
  .guild-membership-card,
  .guild-invitation-row { align-items: flex-start; flex-wrap: wrap; }
  .guild-login-card .guild-primary-button,
  .guild-membership-card .guild-inline-actions { width: 100%; }
  .guild-create-form { grid-template-columns: 1fr; }
  .guild-create-form label { grid-column: auto; }
  .guild-search-form { align-items: stretch; flex-direction: column; }
  .guild-table { display: block; overflow-x: auto; }
  .guild-player-identity { align-items: flex-start; flex-direction: column; gap: 1px; }
}

