/* Orunis: layout clássico de site de Tibia (menu em molduras, conteúdo em pergaminho),
   com a paleta da marca: azul-noite e dourado envelhecido. Nenhuma imagem de terceiros. */
:root {
  --night-950: #060a14;
  --night-900: #0b1122;
  --night-800: #121a33;
  --night-700: #1b2647;
  --night-600: #2a3962;
  --gold-200: #f3e6bd;
  --gold-300: #ead9a6;
  --gold-400: #d9bd72;
  --gold-500: #c3a04f;
  --gold-600: #9c7c35;
  --gold-700: #6f5520;
  --parchment: #f2e6c9;
  --parchment-alt: #e8d8b0;
  --parchment-edge: #c9b27a;
  --ink: #2a1d0c;
  --ink-muted: #6b5634;
  --text: #e6e9f2;
  --text-muted: #9aa3bd;
  --ok: #2f7d4f;
  --ok-light: #6fcf97;
  --error: #9b2c22;
  --font-title: 'Cinzel', Georgia, serif;
  --font-body: 'Inter', Verdana, system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(195, 160, 79, 0.16), transparent 70%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.012) 0 2px, transparent 2px 6px),
    linear-gradient(180deg, var(--night-800), var(--night-950) 60%) fixed;
}

a { color: var(--gold-400); }
a:hover { color: var(--gold-200); }

/* --- cabeçalho --- */
.masthead { text-align: center; padding: 1.6rem 16px 0.8rem; }
.masthead-brand { display: inline-flex; align-items: center; gap: 0.8rem; text-decoration: none; }
.masthead-mark { width: 64px; height: 64px; filter: drop-shadow(0 0 12px rgba(217, 189, 114, 0.35)); }
.masthead-name {
  font-family: var(--font-title); font-weight: 700; font-size: clamp(2.4rem, 7vw, 4rem); letter-spacing: 0.06em;
  background: linear-gradient(180deg, var(--gold-200), var(--gold-500) 60%, var(--gold-700));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.6));
}
.masthead-tagline { margin: 0.2rem 0 0.9rem; font-family: var(--font-title); color: var(--gold-300); letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.85rem; }
.masthead-bar {
  display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.4rem; align-items: center;
  padding: 0.45rem 1.2rem; border: 1px solid var(--gold-700); border-radius: 6px; background: rgba(6, 10, 20, 0.6); font-size: 0.9rem;
}
.masthead-bar a { color: var(--gold-300); text-decoration: none; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok-light); margin-right: 0.4rem; box-shadow: 0 0 6px var(--ok-light); }

/* --- grade de 3 colunas --- */
.layout {
  display: grid; gap: 14px; grid-template-columns: 200px minmax(0, 1fr) 200px;
  max-width: 1180px; margin: 0 auto; padding: 0 16px 2rem; align-items: start;
}
.side { display: grid; gap: 12px; }
.menu-toggle { display: none; }

/* --- molduras laterais --- */
.frame { background: linear-gradient(180deg, var(--night-700), var(--night-900)); border: 1px solid var(--gold-600); border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.5); overflow: hidden; }
.frame-title {
  margin: 0; padding: 0.4rem 0.6rem; text-align: center; font-family: var(--font-title); font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold-200); background: linear-gradient(180deg, var(--gold-700), #3a2c10); border-bottom: 1px solid var(--gold-500);
}
.frame-body { padding: 0.7rem; display: grid; gap: 0.5rem; }
.frame-body p { margin: 0; }
.frame-body.center { text-align: center; }
.download-cta {
  display: block; text-align: center; padding: 0.7rem; border-radius: 6px; font-family: var(--font-title); font-weight: 700; letter-spacing: 0.06em;
  color: #0c1f12; text-decoration: none; background: linear-gradient(180deg, #7fdc9e, #2f8f55); border: 1px solid #1f5c37; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.download-cta:hover { filter: brightness(1.08); color: #0c1f12; }

.menu { display: grid; gap: 8px; }
.menu details { border: 1px solid var(--gold-700); border-radius: 6px; background: var(--night-900); overflow: hidden; }
.menu summary {
  cursor: pointer; list-style: none; padding: 0.45rem 0.7rem; font-family: var(--font-title); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gold-300); background: linear-gradient(180deg, var(--night-700), var(--night-800));
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: '▾'; float: right; color: var(--gold-600); }
.menu details:not([open]) summary::after { content: '▸'; }
.menu a { display: block; padding: 0.35rem 0.8rem; color: var(--text); text-decoration: none; font-size: 0.9rem; border-top: 1px solid rgba(195, 160, 79, 0.12); }
.menu a:hover, .menu a.active { background: rgba(195, 160, 79, 0.14); color: var(--gold-200); }
.menu a.active { border-left: 3px solid var(--gold-500); padding-left: calc(0.8rem - 3px); }

.boosted { display: grid; }
.world-line { display: flex; justify-content: space-between; gap: 0.5rem; }
.world-line a { color: var(--ok-light); text-decoration: none; }
.oracle { border-color: var(--gold-400); }

/* --- caixas de conteúdo (pergaminho) --- */
.box { border: 1px solid var(--gold-600); border-radius: 6px; overflow: hidden; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.55); }
.box + .box { margin-top: 14px; }
.box-title {
  margin: 0; padding: 0.5rem 0.9rem; font-family: var(--font-title); font-size: 1rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gold-200); background: linear-gradient(180deg, var(--night-700), var(--night-900)); border-bottom: 2px solid var(--gold-600);
}
.box-body {
  padding: 1rem 1.1rem; color: var(--ink);
  background: radial-gradient(ellipse at 30% 20%, #f7eed8, var(--parchment) 60%, #e9d9b2);
  box-shadow: inset 0 0 30px rgba(120, 90, 30, 0.18);
}
.box-body a { color: #7a4f10; font-weight: 500; }
.box-body a:hover { color: #3d2606; }
.box-body h3 { font-family: var(--font-title); color: #4b3510; margin: 1rem 0 0.4rem; }
.box-body > :first-child { margin-top: 0; }
.box-body > :last-child { margin-bottom: 0; }
.muted { color: var(--ink-muted); }
.side .muted { color: var(--text-muted); }
.small { font-size: 0.85rem; }

.news-item + .news-item { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--parchment-edge); }
.news-item h2 { margin: 0 0 0.2rem; font-family: var(--font-title); font-size: 1.15rem; color: #4b3510; }
.news-date { font-size: 0.8rem; color: var(--ink-muted); }

/* --- tabelas no estilo clássico --- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th { text-align: left; padding: 0.4rem 0.55rem; color: var(--gold-200); background: linear-gradient(180deg, #4a3816, #2e220c); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; }
td { padding: 0.4rem 0.55rem; border-bottom: 1px solid rgba(120, 90, 30, 0.2); }
tbody tr:nth-child(odd) td { background: rgba(255, 255, 255, 0.32); }
tbody tr:nth-child(even) td { background: rgba(201, 178, 122, 0.22); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.kv th { width: 40%; text-transform: none; letter-spacing: 0; font-size: 0.9rem; }

/* --- botões e formulários --- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; padding: 0.55rem 1.1rem; border-radius: 5px;
  border: 1px solid var(--gold-700); background: linear-gradient(180deg, var(--gold-300), var(--gold-500) 55%, var(--gold-600));
  color: #1d1406; font: 600 0.95rem var(--font-body); cursor: pointer; text-decoration: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.button:hover { filter: brightness(1.07); color: #1d1406; }
.button:disabled { opacity: 0.55; cursor: wait; }
.button.secondary { background: linear-gradient(180deg, var(--night-600), var(--night-800)); color: var(--gold-200); border-color: var(--gold-600); }
.button.secondary:hover { color: var(--gold-200); }
.button.full { width: 100%; }
.box-body .button.secondary { color: var(--gold-200); }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

form { display: grid; gap: 0.9rem; }
.form-inline { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: end; }
.form-inline label { flex: 1 1 180px; }
label { display: grid; gap: 0.3rem; font-size: 0.9rem; color: var(--ink-muted); font-weight: 500; }
input, select, textarea {
  width: 100%; padding: 0.55rem 0.65rem; border-radius: 5px; border: 1px solid var(--parchment-edge);
  background: #fffaf0; color: var(--ink); font: 0.95rem var(--font-body);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold-500); outline-offset: 1px; }
.radio-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.radio-row label { display: flex; align-items: center; gap: 0.35rem; padding: 0.4rem 0.7rem; border: 1px solid var(--parchment-edge); border-radius: 5px; cursor: pointer; color: var(--ink); background: rgba(255, 255, 255, 0.4); }
.radio-row input { width: auto; }
.radio-row label:has(input:checked) { border-color: var(--gold-600); background: rgba(217, 189, 114, 0.4); }
.narrow { max-width: 420px; }

.message { padding: 0.6rem 0.8rem; border-radius: 5px; font-size: 0.92rem; margin: 0; }
.message:empty { display: none; }
.message.error { background: #f6d7d2; color: var(--error); border: 1px solid #d99a90; }
.message.ok { background: #d6efdc; color: var(--ok); border: 1px solid #94c9a5; }

/* --- conta --- */
.stats { display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.stat { display: grid; gap: 0.1rem; justify-items: start; background: rgba(255, 255, 255, 0.45); border: 1px solid var(--parchment-edge); border-radius: 5px; padding: 0.8rem; }
.stat .label { color: var(--ink-muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.stat .value { font-family: var(--font-title); font-size: 1.4rem; color: #4b3510; }

.badge { display: inline-block; padding: 0.05rem 0.5rem; border-radius: 999px; font-size: 0.75rem; border: 1px solid currentColor; color: var(--ink-muted); }
.side .badge { color: var(--gold-300); justify-self: start; }
.badge.online, .badge.delivered { color: var(--ok); }
.badge.paid, .badge.pending { color: #8a6312; }
.badge.canceled { color: var(--error); }
.vocation { color: var(--ink-muted); }

/* --- loja --- */
.products { display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.product { position: relative; display: grid; gap: 0.5rem; align-content: start; text-align: center; padding: 1rem 0.8rem; border: 1px solid var(--parchment-edge); border-radius: 6px; background: rgba(255, 255, 255, 0.45); }
.product h3 { margin: 0; font-size: 0.95rem; }
.product.highlight { border-color: var(--gold-600); box-shadow: 0 0 0 2px rgba(195, 160, 79, 0.45); }
.product .ribbon { position: absolute; top: -0.65rem; left: 50%; transform: translateX(-50%); background: var(--gold-600); color: #fff8e6; font-size: 0.7rem; font-weight: 700; padding: 0.1rem 0.55rem; border-radius: 999px; white-space: nowrap; }
.product .price { font-family: var(--font-title); font-size: 1.4rem; color: #4b3510; }
.dev-note { border: 1px dashed var(--gold-600); padding: 0.6rem 0.8rem; border-radius: 5px; background: rgba(217, 189, 114, 0.25); }

.pix-body { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: flex-start; }
.pix-body img { background: #fff; border-radius: 6px; padding: 8px; width: 220px; height: 220px; border: 1px solid var(--parchment-edge); }
.pix-side { flex: 1 1 240px; display: grid; gap: 0.7rem; }
.pix-side p { margin: 0; }
textarea { resize: none; word-break: break-all; font: 0.8rem ui-monospace, Menlo, monospace; }
.pix-status { color: #8a6312; font-weight: 500; }
.pix-status.ok { color: var(--ok); }
.pay-link { margin-left: 0.5rem; }

/* --- download --- */
.downloads { display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.download { text-align: center; padding: 1rem; border: 1px solid var(--parchment-edge); border-radius: 6px; background: rgba(255, 255, 255, 0.45); display: grid; gap: 0.4rem; }
.download h3 { margin: 0; }
ol.steps { padding-left: 1.2rem; }
ol.steps li + li { margin-top: 0.4rem; }

.footer { text-align: center; color: var(--text-muted); font-size: 0.85rem; padding: 1rem 16px 2rem; }
.footer p { margin: 0.2rem 0; }

[hidden] { display: none !important; }

/* --- telas menores: conteúdo primeiro, menu recolhível --- */
@media (max-width: 960px) {
  .layout { grid-template-columns: 190px minmax(0, 1fr); }
  .side-right { grid-column: 1 / -1; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
}
@media (max-width: 680px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .menu-toggle {
    display: block; margin: 0 16px 12px; width: calc(100% - 32px); padding: 0.6rem; border-radius: 6px; border: 1px solid var(--gold-600);
    background: var(--night-800); color: var(--gold-300); font: 600 1rem var(--font-title); letter-spacing: 0.08em; cursor: pointer;
  }
  .side-left { display: none; }
  .side-left.open { display: grid; }
  .content { order: -1; }
  body.menu-open .content { order: 0; }
  .masthead-mark { width: 48px; height: 48px; }
}
