/* =====================================================================
   GUILD FANATIC • tema global
   ===================================================================== */
:root {
  --red: #e0102a; --red2: #ff3b4e; --blood: #7a0612; --silver: #e9edf2; --steel: #9aa3ad;
  --gold: #f3c969; --green: #4ee39a; --bg: #07040a; --panel: rgba(24,5,10,.82);
  --line: rgba(255,255,255,.08); --muted: rgba(233,237,242,.66);
  --f-title: 'Cinzel', serif; --f-deco: 'Cinzel Decorative', serif; --f-body: 'Rajdhani', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh; color: var(--silver); font-family: var(--f-body); font-size: 17px; font-weight: 500; line-height: 1.55;
  background: radial-gradient(ellipse at 50% 0%, #2a0610 0%, #120309 38%, var(--bg) 75%) fixed, var(--bg);
  overflow-x: hidden; display: flex; flex-direction: column;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--red); color: #fff; }

/* ---------- Fundo animado ---------- */
#fx-embers { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.fx-fog { position: fixed; inset: -20%; z-index: -2; pointer-events: none; opacity: .35;
  background: radial-gradient(circle at 20% 80%, rgba(224,16,42,.25), transparent 40%),
              radial-gradient(circle at 80% 70%, rgba(122,6,18,.35), transparent 45%),
              radial-gradient(circle at 50% 110%, rgba(255,59,78,.25), transparent 50%);
  animation: fx-fog 18s ease-in-out infinite alternate; }
@keyframes fx-fog { to { transform: translate3d(3%, -3%, 0) scale(1.08); } }
.fx-grid { position: fixed; inset: 0; z-index: -2; pointer-events: none; opacity: .06;
  background-image: linear-gradient(rgba(255,255,255,.6) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.6) 1px, transparent 1px);
  background-size: 60px 60px; -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%); mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%); }

/* ---------- Navegação ---------- */
.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  background: linear-gradient(180deg, rgba(10,2,5,.92), rgba(10,2,5,.72)); border-bottom: 1px solid rgba(224,16,42,.28); }
.nav-in { max-width: 1180px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 18px; }
.nav-brand { display: flex; align-items: center; gap: 10px; font-family: var(--f-deco); font-weight: 900; font-size: 20px; letter-spacing: .06em; }
.nav-brand img { width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 0 8px rgba(255,30,50,.6)); }
.nav-links { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav-links a { padding: 8px 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; font-size: 13px; color: var(--muted); border-radius: 4px; transition: .2s; }
.nav-links a:hover, .nav-links a.active { color: #fff; background: rgba(224,16,42,.14); }
.nav-links a.active { box-shadow: inset 0 -2px 0 var(--red); }
.nav-user { display: flex; align-items: center; gap: 8px; }
.nav-burger { display: none; margin-left: auto; background: none; border: 1px solid var(--line); width: 42px; height: 42px; border-radius: 6px; cursor: pointer; }
.nav-burger span { display: block; width: 20px; height: 2px; background: #fff; margin: 4px auto; transition: .3s; }
@media (max-width: 900px) {
  .nav-burger { display: block; }
  .nav-links { position: fixed; inset: 61px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; padding: 10px 16px 18px;
    background: rgba(10,2,5,.97); border-bottom: 1px solid rgba(224,16,42,.3); transform: translateY(-120%); transition: transform .35s; }
  .nav-links.open { transform: none; }
  .nav-links a { padding: 13px 10px; border-bottom: 1px solid var(--line); }
  .nav-user { margin-top: 12px; justify-content: center; }
}

/* ---------- Botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; cursor: pointer; border: 1px solid rgba(224,16,42,.7);
  background: linear-gradient(180deg, #c50d24, #7a0612); color: #fff; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 13px;
  border-radius: 4px; transition: .2s; box-shadow: 0 0 0 rgba(224,16,42,0); white-space: nowrap; }
.btn:hover { box-shadow: 0 0 18px rgba(224,16,42,.55); transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--silver); }
.btn-ghost:hover { border-color: rgba(224,16,42,.6); }
.btn-discord { background: #5865F2; border-color: #7983ff; }
.btn-discord:hover { box-shadow: 0 0 18px rgba(88,101,242,.6); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-ok { background: linear-gradient(180deg, #19a463, #0c5e37); border-color: #2fd388; }
.btn-block { width: 100%; }
.nav-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(224,16,42,.6); }

/* ---------- Layout de página ---------- */
main { flex: 1; }
.page { max-width: 1180px; margin: 0 auto; padding: 46px 20px 60px; }
.page-head { text-align: center; margin-bottom: 36px; }
.page-head small { display: block; font-size: 13px; letter-spacing: .4em; text-transform: uppercase; color: #ff8a96; font-weight: 700; margin-bottom: 8px; }
.page-head h1 { font-family: var(--f-title); font-weight: 900; font-size: clamp(32px, 6vw, 58px); letter-spacing: .06em; line-height: 1.05;
  background: linear-gradient(180deg, #fff 0%, #dfe4ea 40%, #8e98a3 60%, #f4f6f8 80%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 #2a0005) drop-shadow(0 0 22px rgba(224,16,42,.45)); }
.page-head p { color: var(--muted); max-width: 680px; margin: 12px auto 0; }
.divider { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 22px auto; max-width: 420px; }
.divider span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--red), transparent); }
.divider i { width: 10px; height: 10px; transform: rotate(45deg); background: var(--red); box-shadow: 0 0 10px var(--red); }

.panel { background: linear-gradient(180deg, rgba(36,6,12,.82), rgba(12,3,7,.9)); border: 1px solid rgba(224,16,42,.28); padding: 26px; position: relative;
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 14px, 100% calc(100% - 14px), calc(100% - 14px) 100%, 14px 100%, 0 calc(100% - 14px), 0 14px); }
.panel h2, .panel h3 { font-family: var(--f-title); font-weight: 900; letter-spacing: .08em; color: #fff; margin-bottom: 14px; }
.panel h2 { font-size: 22px; } .panel h3 { font-size: 18px; }
.sec-title { font-family: var(--f-title); font-weight: 900; letter-spacing: .3em; text-transform: uppercase; font-size: 15px; color: #ff8a96; text-align: center; margin: 54px 0 22px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card { position: relative; background: linear-gradient(180deg, rgba(30,6,12,.85), rgba(10,3,6,.92)); border: 1px solid var(--line); padding: 22px;
  transition: transform .3s, border-color .3s, box-shadow .3s; overflow: hidden; }
.card:hover { transform: translateY(-4px); border-color: rgba(224,16,42,.55); box-shadow: 0 16px 34px rgba(0,0,0,.55), 0 0 24px rgba(224,16,42,.2); }
.card h3 { font-family: var(--f-title); font-weight: 900; font-size: 19px; color: #fff; letter-spacing: .05em; margin-bottom: 6px; }
.card p { color: var(--muted); }
.tag { display: inline-block; padding: 3px 10px; font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; border: 1px solid rgba(224,16,42,.5); color: #ff9aa5; background: rgba(224,16,42,.1); border-radius: 3px; }
.tag-gold { border-color: rgba(243,201,105,.6); color: var(--gold); background: rgba(243,201,105,.08); }
.tag-green { border-color: rgba(78,227,154,.5); color: var(--green); background: rgba(78,227,154,.08); }
.muted { color: var(--muted); }
.center { text-align: center; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); border: 1px dashed var(--line); }
.loading { text-align: center; padding: 40px; color: var(--muted); letter-spacing: .2em; text-transform: uppercase; font-size: 13px; }
.loading::after { content: ""; display: block; width: 28px; height: 28px; margin: 14px auto 0; border: 2px solid rgba(224,16,42,.3); border-top-color: var(--red2); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Avatares / membros ---------- */
.avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(224,16,42,.6); box-shadow: 0 0 16px rgba(224,16,42,.3); background: #1a0509; flex: none; }
.avatar-lg { width: 110px; height: 110px; }
.member { display: flex; gap: 14px; align-items: center; }
.member .info { min-width: 0; }
.member .nick { font-family: var(--f-title); font-weight: 900; font-size: 18px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member .cls { color: var(--muted); font-size: 15px; }

/* ---------- Ranking ---------- */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 16px; align-items: end; margin-bottom: 30px; }
.podium .pos { text-align: center; padding: 24px 14px; }
.podium .pos .avatar { margin: 0 auto 10px; }
.podium .p1 { padding-top: 34px; border-color: rgba(243,201,105,.6); box-shadow: 0 0 30px rgba(243,201,105,.18); }
.podium .p1 .avatar { width: 96px; height: 96px; border-color: var(--gold); box-shadow: 0 0 22px rgba(243,201,105,.5); }
.podium .medal { font-family: var(--f-title); font-weight: 900; font-size: 30px; }
.podium .p1 .medal { color: var(--gold); } .podium .p2 .medal { color: #d9dee4; } .podium .p3 .medal { color: #d08a52; }
.podium .val { font-family: var(--f-title); font-weight: 900; font-size: 22px; color: #fff; margin-top: 6px; }
@media (max-width: 620px) { .podium { grid-template-columns: 1fr; } .podium .p1 { order: -1; } }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: #ff8a96; padding: 12px 10px; border-bottom: 1px solid rgba(224,16,42,.35); }
.table td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:hover td { background: rgba(224,16,42,.05); }
.table .num { font-family: var(--f-title); font-weight: 900; color: #fff; text-align: right; white-space: nowrap; }
.table-wrap { overflow-x: auto; }

/* ---------- Eventos ---------- */
.event { display: grid; grid-template-columns: 96px 1fr; gap: 18px; align-items: start; }
.event-date { text-align: center; border: 1px solid rgba(224,16,42,.5); background: rgba(224,16,42,.08); padding: 10px 6px; }
.event-date b { display: block; font-family: var(--f-title); font-weight: 900; font-size: 34px; line-height: 1; color: #fff; }
.event-date span { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: #ff9aa5; }
.event-date em { display: block; font-style: normal; font-weight: 700; color: var(--gold); margin-top: 4px; }
.event-img { width: 100%; max-height: 260px; object-fit: cover; margin-top: 12px; border: 1px solid var(--line); }
.event.past { opacity: .6; }
.countdown { font-family: var(--f-title); font-weight: 700; color: var(--gold); font-size: 14px; letter-spacing: .08em; }

/* ---------- Tutoriais ---------- */
.tut-cover { width: calc(100% + 44px); margin: -22px -22px 16px; aspect-ratio: 16/8; object-fit: cover; background: linear-gradient(135deg, #3a0711, #0e0306); }
.tut-cover.ph { display: grid; place-items: center; font-family: var(--f-deco); font-size: 54px; color: rgba(255,255,255,.12); }
.article { max-width: 820px; margin: 0 auto; }
.article .content { font-size: 18px; line-height: 1.75; color: rgba(233,237,242,.9); }
.article .content h1, .article .content h2, .article .content h3 { font-family: var(--f-title); color: #fff; margin: 28px 0 12px; letter-spacing: .04em; }
.article .content p { margin: 0 0 16px; }
.article .content ul, .article .content ol { margin: 0 0 16px 24px; }
.article .content a { color: var(--red2); text-decoration: underline; }
.article .content img { margin: 18px auto; border: 1px solid var(--line); }
.article .content blockquote { border-left: 3px solid var(--red); padding: 8px 16px; margin: 0 0 16px; background: rgba(224,16,42,.07); }
.article .content code { background: rgba(255,255,255,.08); padding: 2px 6px; border-radius: 3px; }
.article .content table { border-collapse: collapse; margin: 0 0 16px; width: 100%; }
.article .content td, .article .content th { border: 1px solid var(--line); padding: 8px; }

/* ---------- Formulários ---------- */
.form { display: grid; gap: 14px; }
.field label { display: block; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: #ff9aa5; font-weight: 700; margin-bottom: 6px; }
.input, .select, .textarea { width: 100%; padding: 11px 14px; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.14); border-radius: 4px; outline: none; transition: .2s; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--red2); box-shadow: 0 0 0 3px rgba(224,16,42,.2); }
.select option { background: #14050a; }
.textarea { min-height: 110px; resize: vertical; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--red); }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; letter-spacing: .2em; text-transform: uppercase; margin: 6px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabs button { flex: 1; background: none; border: none; padding: 12px; cursor: pointer; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs button.on { color: #fff; border-bottom-color: var(--red); }
.alert { padding: 12px 16px; border: 1px solid rgba(243,201,105,.4); background: rgba(243,201,105,.08); color: #ffe2a6; }
.alert-red { border-color: rgba(255,59,78,.5); background: rgba(224,16,42,.1); color: #ffb3bb; }

/* ---------- Toast ---------- */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 100; display: grid; gap: 10px; max-width: min(380px, calc(100vw - 36px)); }
.toast { padding: 13px 18px; background: rgba(16,4,8,.96); border: 1px solid rgba(224,16,42,.5); border-left: 4px solid var(--red2); box-shadow: 0 10px 30px rgba(0,0,0,.6); animation: toastIn .35s ease; font-weight: 600; }
.toast.ok { border-left-color: var(--green); border-color: rgba(78,227,154,.4); }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } }

/* ---------- Rodapé ---------- */
.footer { border-top: 1px solid var(--line); padding: 26px 20px; text-align: center; font-size: 13px; letter-spacing: .25em; text-transform: uppercase; color: rgba(233,237,242,.4); }
.footer b { color: #ff8a96; }

/* ---------- Revelar ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s ease, transform .9s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
