/* Tales of Souls — site. Paleta e tipografia do kit de marca:
   Abismo #050B1C · Noite Profunda #0C2250 · Azul Alma #3FA2FF · Chama Gélida #59BDFF
   Aço Frio #8DB4DE · Prata Lunar #D3E6F8 · Gelo #F2F8FF · fonte Cinzel (títulos, botões). */

@font-face { font-family: 'Cinzel'; src: url('/brand/fonts/Cinzel-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Cinzel'; src: url('/brand/fonts/Cinzel-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Cinzel'; src: url('/brand/fonts/Cinzel-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }

:root {
  --abyss: #050b1c;
  --night: #0c2250;
  --soul: #3fa2ff;
  --flame: #59bdff;
  --steel: #8db4de;
  --silver: #d3e6f8;
  --ice: #f2f8ff;
  --bg: var(--abyss);
  --bg2: #081430;
  --panel: #0b1a3a;
  --panel2: #10234a;
  --line: #22385f;
  --text: var(--silver);
  --muted: var(--steel);
  --red: #ff5c6c;
  --green: #5ee08a;
  --radius: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(63, 162, 255, .18) 0%, transparent 60%),
    radial-gradient(900px 500px at 50% 110%, rgba(12, 34, 80, .7) 0%, transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
}
a { color: var(--flame); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, .brand { font-family: 'Cinzel', serif; letter-spacing: .04em; }
h1 { font-size: 2.2rem; margin: 0 0 .5rem; color: var(--ice); }
h2 { font-size: 1.35rem; margin: 0 0 1rem; color: var(--ice); font-weight: 700; }
h3 { font-size: 1.05rem; margin: 0 0 .5rem; color: var(--silver); }
small, .muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 16px; }

/* Cabeçalho */
.topbar { border-bottom: 1px solid var(--line); background: rgba(5, 11, 28, .88); backdrop-filter: blur(6px); position: sticky; top: 0; z-index: 10; }
.topbar .wrap { display: flex; align-items: center; gap: 18px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; }
.brand img { height: 52px; width: auto; display: block; margin: -4px 0; }
.nav { display: flex; gap: 14px; flex: 1; flex-wrap: wrap; font-family: 'Cinzel', serif; font-weight: 600; letter-spacing: .03em; }
.nav a { color: var(--silver); opacity: .85; }
.nav a.active, .nav a:hover { color: var(--ice); opacity: 1; text-decoration: none; text-shadow: 0 0 12px rgba(89, 189, 255, .6); }
.userbox { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Botões: .btn-gold é o botão principal (nome mantido; visual de aço azulado da marca) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel2); color: var(--silver); font-weight: 600; cursor: pointer; font-size: .95rem; text-decoration: none !important; }
.btn:hover { border-color: var(--steel); color: var(--ice); }
.btn-gold {
  font-family: 'Cinzel', serif; letter-spacing: .05em;
  background: linear-gradient(180deg, #4a78a4 0%, #2a5079 48%, #133052 52%, #0d2340 100%);
  color: var(--ice); border: 1px solid #b9cde3;
  box-shadow: 0 0 0 1px rgba(1, 4, 12, .9), inset 0 1px 0 rgba(255, 255, 255, .25), inset 0 0 0 3px rgba(159, 200, 240, .12);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .7);
}
.btn-gold:hover { background: linear-gradient(180deg, #5b8fc0 0%, #3466a0 48%, #184070 52%, #112c50 100%); box-shadow: 0 0 0 1px rgba(1, 4, 12, .9), 0 0 18px rgba(63, 162, 255, .45), inset 0 1px 0 rgba(255, 255, 255, .3); border-color: var(--ice); }
.btn-play { font-size: 1.05rem; padding: 10px 28px; letter-spacing: .1em; clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 14px 100%, 0 50%); border-radius: 0; }
.btn-sm { padding: 5px 10px; font-size: .85rem; }
.btn-link { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; font: inherit; }

/* Hero: arte da catedral com o logo pintado; chamada e botões sobre a parte escura de baixo */
.hero {
  position: relative; margin: 18px 0 8px; min-height: clamp(360px, 52vw, 600px);
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center; text-align: center;
  padding: 0 16px 34px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(5, 11, 28, 0) 55%, rgba(5, 11, 28, .92) 100%), url('/brand/hero-catedral.jpg') center 18% / cover no-repeat;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .55), 0 0 0 1px rgba(141, 180, 222, .15) inset;
}
.hero .tagline { font-family: 'Cinzel', serif; color: var(--ice); font-size: 1.25rem; margin: 0 0 8px; text-shadow: 0 2px 10px rgba(0, 0, 0, .9); }
.hero p { max-width: 640px; margin: 0 auto 20px; color: var(--silver); font-size: 1.02rem; text-shadow: 0 1px 6px rgba(0, 0, 0, .9); }
.hero .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Layout */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: 2fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.section { padding: 28px 0; }

.card { background: linear-gradient(180deg, rgba(16, 35, 74, .92), rgba(8, 20, 48, .95)); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: inset 0 0 0 1px rgba(141, 180, 222, .06); }
.card + .card { margin-top: 18px; }
.card.highlight { border-color: var(--soul); box-shadow: 0 0 0 1px rgba(63, 162, 255, .25) inset, 0 0 24px rgba(63, 162, 255, .15); }

.stat { text-align: center; }
.stat .v { font-family: 'Cinzel', serif; font-size: 1.8rem; color: var(--ice); }
.stat .l { color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .75rem; font-weight: 700; border: 1px solid var(--line); background: var(--panel2); }
.badge.on { color: var(--green); border-color: #2c6b45; }
.badge.off { color: var(--red); border-color: #6b2c36; }
.badge.gold { color: var(--flame); border-color: #2a5a8a; }

/* Tabelas */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.table th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.table tr:hover td { background: rgba(89, 189, 255, .04); }
.table-wrap { overflow-x: auto; }
.rank-1 td:first-child { color: #ffd700; font-weight: 800; }
.rank-2 td:first-child { color: #d9d9d9; font-weight: 800; }
.rank-3 td:first-child { color: #cd8a4a; font-weight: 800; }

/* Formulários */
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .9rem; }
.input, select.input { width: 100%; padding: 10px 12px; border-radius: 6px; border: 1px solid var(--line); background: #050d22; color: var(--ice); font: inherit; }
.input:focus { outline: none; border-color: var(--flame); box-shadow: 0 0 0 3px rgba(89, 189, 255, .15); }
.check { display: flex !important; grid-auto-flow: column; align-items: center; gap: 8px; font-weight: 400 !important; }
.auth-box { max-width: 440px; margin: 40px auto; }
.auth-logo { display: block; width: 78%; height: auto; margin: -6px auto 12px; }

.alert { padding: 12px 14px; border-radius: 8px; margin: 16px 0; border: 1px solid; }
.alert-ok { background: rgba(94, 224, 138, .08); border-color: #2c6b45; color: #b9f5cd; }
.alert-err { background: rgba(255, 92, 108, .08); border-color: #6b2c36; color: #ffc2c8; }
.alert ul { margin: 0; padding-left: 18px; }

/* Cartões de produto */
.product { display: flex; flex-direction: column; gap: 8px; }
.product .price { font-family: 'Cinzel', serif; font-size: 1.4rem; color: var(--ice); }
.product .item-name { font-weight: 700; }
.product-photo { position: relative; align-self: center; width: 150px; height: 150px; border-radius: 12px; background: radial-gradient(circle at 50% 45%, rgba(63, 162, 255, .22), rgba(5, 11, 28, 0) 70%); display: flex; align-items: center; justify-content: center; }
.product-photo img { width: 140px; height: 140px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .6)); }
.product-photo .upg { position: absolute; right: 6px; bottom: 6px; font-family: 'Cinzel', serif; font-weight: 700; color: var(--ice); text-shadow: 0 0 6px rgba(89, 189, 255, .9); }
.product form { margin-top: auto; display: grid; gap: 8px; }

.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 8px; }
.list-plain li:last-child { border-bottom: 0; }

.news-item h3 a { color: var(--ice); }
.news-item + .news-item { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }

.footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 24px 0; color: var(--muted); font-size: .85rem; text-align: center; }
.footer .wrap { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.footer-flame { height: 26px; width: auto; filter: drop-shadow(0 0 6px rgba(89, 189, 255, .6)); }

.class-pill { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: .8rem; background: var(--panel2); border: 1px solid var(--line); }
.class-guardiao { color: #ff9a6b; }
.class-arcanista { color: #9fa8ff; }
.class-patrulheira { color: #7ee08f; }
.class-clerigo { color: #ffe08a; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filters a { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--silver); }
.filters a.active { border-color: var(--flame); color: var(--ice); }

/* telas estreitas: a pintura fica inteira em cima e o texto vem logo abaixo dela */
@media (max-width: 760px) {
  .brand img { height: 40px; }
  .hero {
    min-height: 0; padding-top: calc(55.8% + 8px);
    background: linear-gradient(180deg, rgba(5, 11, 28, 0) 0, rgba(5, 11, 28, 0) 40vw, var(--abyss) 56vw), url('/brand/hero-catedral.jpg') top center / 100% auto no-repeat, var(--abyss);
  }
}

/* Página do jogo */
.play-body { margin: 0; background: var(--abyss); overflow: hidden; }
.play-frame { position: fixed; inset: 0; width: 100vw; height: 100vh; border: 0; background: var(--abyss); }
