/* Draco Files — tema Draco Games (dark fantasy) */
:root {
  --bg-deep: #0a0a0a;
  --bg-bar: #0d0d0d;
  --gold: #e8b923;
  --gold-hover: #f5d45c;
  --gold-muted: #b8941f;
  --text: #f2f2f2;
  --text-muted: #a8a8a8;
  --overlay: rgba(0, 0, 0, 0.62);
  --nav-h: 72px;
  --font-ui: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Cinzel", "Times New Roman", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  color: var(--text);
}

/* Fundo em tela cheia (imagem em /img/4k/… via --page-bg-image no <body>) */
.page-body {
  background-color: #0f0f0f;
  background-image: linear-gradient(var(--overlay), var(--overlay)), var(--page-bg-image, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.page-main {
  padding-top: var(--nav-h);
  min-height: calc(100vh - var(--nav-h));
}

a {
  color: inherit;
}

/* ——— Top bar (alinhado ao menu do site oficial) ——— */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  min-height: var(--nav-h);
  padding: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.95) 0%, rgba(10, 10, 10, 0.88) 100%);
  border-bottom: 1px solid rgba(232, 185, 35, 0.15);
  backdrop-filter: blur(8px);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  min-height: var(--nav-h);
  padding: 0.35rem 1rem;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  line-height: 0;
}

.logo img {
  display: block;
  width: auto;
  max-width: min(160px, 42vw);
  height: auto;
  max-height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(232, 185, 35, 0.25));
}

.header-inner .nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.header-voltar {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  color: #0a0a0a;
  background: linear-gradient(180deg, var(--gold-hover) 0%, var(--gold) 100%);
  border-radius: 999px;
  box-shadow: 0 2px 12px rgba(232, 185, 35, 0.25);
  transition: transform 0.2s, box-shadow 0.2s;
}

.header-voltar:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(232, 185, 35, 0.35);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gold);
}

.nav > ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.15rem 1rem;
}

.nav > ul > li {
  position: relative;
}

.nav a {
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav a:hover,
.nav a.is-active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* Submenu Sistemas (desktop) */
.nav-sub {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0 0;
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 180px;
  display: none;
  background: rgba(12, 12, 12, 0.98);
  border: 1px solid rgba(232, 185, 35, 0.2);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  z-index: 120;
}

.nav-sub a {
  display: block;
  padding: 0.55rem 1rem;
  border-bottom: none;
  font-size: 0.8rem;
}

.nav-sub a:hover {
  background: rgba(232, 185, 35, 0.08);
}

.nav-has-sub:hover > .nav-sub,
.nav-has-sub:focus-within > .nav-sub,
.nav-has-sub.is-open > .nav-sub {
  display: block;
}

/* ——— Downloads (sem overlay preto — fundo = BG da página) ——— */
.section-downloads {
  padding: 1.75rem 1.25rem 3rem;
  background: transparent;
  border-top: 1px solid rgba(232, 185, 35, 0.12);
}

.section-downloads h2 {
  font-family: var(--font-display);
  text-align: center;
  font-size: 1.55rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.5rem;
}

.wrap {
  max-width: 1000px;
  margin: 0 auto;
}

.card {
  background: transparent;
  border-radius: 12px;
  border: 1px solid rgba(232, 185, 35, 0.2);
  overflow: hidden;
  box-shadow: none;
}

table.files {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: center;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 12px;
  overflow: hidden;
}

.files thead {
  display: table-header-group;
}

.files tbody {
  display: table-row-group;
}

.files th,
.files td {
  padding: 14px 12px;
  vertical-align: middle;
}

.files thead th {
  background: linear-gradient(180deg, rgba(232, 185, 35, 0.22) 0%, rgba(232, 185, 35, 0.06) 100%);
  color: var(--gold);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  position: relative;
  z-index: 2;
  border-bottom: 2px solid rgba(232, 185, 35, 0.4);
  box-shadow: none;
}

.files tbody td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
}

.files tbody tr:first-child td {
  padding-top: 18px;
  border-top: none;
  background: linear-gradient(180deg, rgba(232, 185, 35, 0.1) 0%, transparent 100%);
}

.files tbody tr:hover td {
  background: rgba(232, 185, 35, 0.1);
}

.files tbody tr:first-child:hover td {
  background: linear-gradient(180deg, rgba(232, 185, 35, 0.14) 0%, rgba(232, 185, 35, 0.05) 100%);
}

.files .name {
  font-weight: 600;
  color: var(--text);
}

.files .muted {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.btn-download {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  color: #0a0a0a;
  background: var(--gold);
  transition: background 0.2s, transform 0.2s;
}

.btn-download:hover {
  background: var(--gold-hover);
  transform: scale(1.02);
}

.empty {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
}

/* ——— Paginação ——— */
.pagination-meta {
  margin: 0;
  padding: 0.75rem 1rem 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.75rem;
  padding: 1rem 1rem 1.15rem;
}

.pagination__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
  color: #0a0a0a;
  background: linear-gradient(180deg, var(--gold-hover) 0%, var(--gold) 100%);
  border-radius: 8px;
  border: none;
  transition: transform 0.15s, opacity 0.15s;
}

.pagination__btn:hover {
  transform: translateY(-1px);
}

.pagination__btn--disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.pagination__pages {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem 0.35rem;
}

.pagination__pages li {
  margin: 0;
}

.pagination__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  height: 2.1rem;
  padding: 0 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-muted);
  border: 1px solid rgba(232, 185, 35, 0.25);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.pagination__link:hover {
  color: var(--gold);
  border-color: rgba(232, 185, 35, 0.5);
  background: rgba(232, 185, 35, 0.08);
}

.pagination__current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  height: 2.1rem;
  padding: 0 0.4rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0a0a0a;
  background: var(--gold);
  border-radius: 8px;
}

.pagination__gap {
  display: inline-flex;
  align-items: center;
  padding: 0 0.2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  user-select: none;
}

/* ——— Footer ——— */
.site-footer {
  padding: 2rem 1.25rem;
  text-align: center;
  background: #050505;
  border-top: 1px solid rgba(232, 185, 35, 0.15);
}

.site-footer .copyright {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

@media (max-width: 900px) {
  .header-inner {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }

  .header-inner .logo {
    order: 0;
    flex: 1 1 auto;
  }

  .nav-toggle {
    display: flex;
    order: 1;
  }

  .header-voltar {
    order: 2;
    padding: 0.4rem 0.75rem;
    font-size: 0.72rem;
  }

  .header-inner .nav {
    order: 3;
    flex: 1 1 100%;
    display: block;
    justify-content: initial;
  }

  .nav {
    position: fixed;
    top: var(--nav-h);
    right: 0;
    width: min(300px, 100%);
    background: rgba(8, 8, 8, 0.98);
    border-left: 1px solid rgba(232, 185, 35, 0.2);
    padding: 1rem 1.25rem;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
    z-index: 110;
  }

  .nav.is-open {
    transform: translateX(0);
  }

  .nav > ul {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.35rem;
  }

  .nav > ul > li {
    width: 100%;
  }

  .nav a {
    display: block;
    width: 100%;
    padding: 0.6rem 0;
  }

  .nav-sub {
    position: static;
    display: none;
    margin-top: 0.25rem;
    padding: 0;
    border: none;
    background: rgba(20, 20, 20, 0.95);
    box-shadow: none;
  }

  .nav-has-sub.is-open > .nav-sub {
    display: block;
  }

  .nav-has-sub:hover > .nav-sub,
  .nav-has-sub:focus-within > .nav-sub {
    display: none;
  }

  .nav-has-sub.is-open:hover > .nav-sub,
  .nav-has-sub.is-open:focus-within > .nav-sub {
    display: block;
  }

  .page-body {
    background-attachment: scroll;
  }
}

@media (max-width: 600px) {
  .files th:nth-child(3),
  .files td:nth-child(3) {
    display: none;
  }
}
