:root {
  --bg-main: #0c1016;
  --bg-secondary: #121821;
  --panel: #121923;
  --panel-soft: #141c27;
  --line: rgba(255, 255, 255, 0.12);
  --text: #eef3f8;
  --muted: #b4c0cf;
  --orange: #ff7a18;
  --orange-2: #f59e0b;
  --blue: #3b82f6;
  --blue-2: #60a5fa;
  --red: #dc2626;
  --gold: #fbbf24;
  --shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  --header-h: 72px;
  --radius-lg: 22px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --site-bg-image: url('../assets/background.png');
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

html, body {
  min-height: 100%;
}

a:focus-visible,
button:focus-visible,
.nav-toggle:focus-visible {
  outline: 2px solid var(--orange-2);
  outline-offset: 3px;
}

body {
  font-family: 'Montserrat', sans-serif;
  background:
    linear-gradient(180deg, rgba(7, 10, 15, 0.78), rgba(7, 10, 15, 0.86)),
    radial-gradient(circle at center, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.62)),
    var(--site-bg-image);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text);
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 10000;
  padding: 12px 20px;
  background: var(--orange);
  color: #111;
  font-weight: 700;
  border-radius: 0 0 10px 0;
}

.skip-link:focus {
  left: 0;
  top: 0;
  outline: 3px solid #fff;
  outline-offset: 2px;
}

a {
  text-decoration: none;
  color: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(8, 12, 17, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  width: min(1180px, 92%);
  margin: 0 auto;
  min-height: var(--header-h);
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 10px 0;
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex: 1 1 auto;
  min-width: 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: background 0.2s var(--ease-out);
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.09);
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  margin: 0 auto;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.25s var(--ease-out), opacity 0.2s;
}

.site-header.nav-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.site-header.nav-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.site-header.nav-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.logo-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.logo-mark-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px 18px;
  flex-wrap: wrap;
  flex: 1 1 auto;
}

.menu a {
  padding: 10px 14px;
  border-radius: 10px;
  color: #eef1f8;
  font-weight: 600;
  transition: 0.22s ease;
}

.menu a:hover,
.menu a.active {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.btn-download {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 10px 20px rgba(255, 122, 24, 0.22);
}

.btn-download:hover,
.active-btn {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.container {
  width: min(1180px, 92%);
  margin: 0 auto;
}

main {
  padding-top: calc(var(--header-h) + 12px);
}

.hero-section,
.content-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
}

.hero-section,
.content-section,
.form-page-bg,
.download-bg,
.account-page-bg {
  overflow: hidden;
  background: transparent;
  position: relative;
}

.hero-section::before,
.content-section::before,
.form-page-bg::before,
.download-bg::before,
.account-page-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at top, rgba(6, 8, 12, 0.2), rgba(6, 8, 12, 0.72)),
    linear-gradient(90deg, rgba(6, 8, 12, 0.74) 0%, rgba(6, 8, 12, 0.18) 45%, rgba(6, 8, 12, 0.64) 100%);
}

.hero-section .container,
.content-section .container,
.form-page-bg > *,
.download-bg > *,
.account-page-bg > * {
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 50px;
  align-items: center;
}

.tag,
.section-kicker,
.form-tag {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  color: #ffd8b3;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-text h1 {
  margin-top: 18px;
  font-size: clamp(2.5rem, 5vw, 4.6rem);
  line-height: 1.05;
  max-width: 760px;
}

.hero-text h1 span {
  background: linear-gradient(135deg, #ffb36b 0%, #ff8a2a 55%, #ffd27d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 6px 20px rgba(255, 122, 24, 0.22);
}

.hero-text p,
.section-layout p,
.center-box p,
.download-box p,
.form-desc {
  margin-top: 20px;
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--muted);
}

.hero-actions {
  margin-top: 30px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 14px 22px;
  border-radius: 14px;
  font-weight: 700;
  transition: 0.25s ease;
  border: 1px solid transparent;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(180deg, #ff9438 0%, #e8680a 100%);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.2) inset,
    0 14px 28px rgba(255, 122, 24, 0.38);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #ffa64d 0%, #f07812 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 18px 34px rgba(255, 122, 24, 0.45);
}

.btn-primary:focus-visible {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.2) inset,
    0 14px 28px rgba(255, 122, 24, 0.38),
    0 0 0 3px rgba(255, 158, 64, 0.45);
}

.btn-primary.alt {
  background: var(--blue);
}

.btn-primary.alt:hover:not(:disabled) {
  background: #2563eb;
}

.btn-secondary {
  border-color: rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.02);
  color: #fff;
}

.hero-card {
  position: relative;
  min-height: 420px;
  border-radius: 28px;
  background: rgba(20, 28, 39, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-card-content {
  position: relative;
  width: min(320px, 82%);
  padding: 28px;
  border-radius: 20px;
  background: transparent;
  border: none;
  text-align: center;
}

.hero-card-content h3 {
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.hero-logo {
  width: clamp(120px, 16vw, 170px);
  height: clamp(120px, 16vw, 170px);
  object-fit: contain;
  margin: 0 auto 16px;
  display: block;
  filter: drop-shadow(0 10px 24px rgba(255, 122, 24, 0.24));
}

.hero-card-content p {
  color: var(--muted);
  line-height: 1.7;
}

.section-dark {
  background: transparent;
}

.section-accent {
  background: transparent;
}

.section-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 40px;
  align-items: center;
}

.section-layout h2,
.center-box h2,
.download-box h1,
.form-box h1 {
  margin-top: 18px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.info-card,
.download-card {
  padding: 24px;
  border-radius: 22px;
  background: rgba(20, 28, 39, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
  backdrop-filter: blur(3px);
}

.info-card h3,
.download-card h3 {
  margin-bottom: 10px;
  font-size: 1.15rem;
}

.info-card p,
.download-card p {
  color: var(--muted);
  line-height: 1.7;
}

.info-card.orange { border-top: 3px solid var(--orange); }
.info-card.blue { border-top: 3px solid var(--blue); }
.info-card.red { border-top: 3px solid var(--red); }

.center-box {
  width: min(920px, 100%);
  margin: 0 auto;
  text-align: center;
  padding: 48px 24px;
  border-radius: 30px;
  background: rgba(20, 28, 39, 0.36);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(3px);
}

.center-actions {
  justify-content: center;
}

.page-main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orange-bg {
  background: transparent;
}

.blue-bg {
  background: transparent;
}

.download-bg {
  background: transparent;
}

.form-section,
.download-section {
  width: min(1180px, 92%);
  position: relative;
  z-index: 1;
}

.form-section {
  display: flex;
  justify-content: center;
}

.form-box,
.download-box {
  width: min(640px, 100%);
  padding: 38px;
  border-radius: 28px;
  background: rgba(18, 25, 35, 0.46);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: var(--shadow);
  backdrop-filter: blur(4px);
}

.form-box {
  margin: 0 auto;
}

.download-box {
  width: min(980px, 100%);
  margin: 0 auto;
}

.download-section {
  display: flex;
  justify-content: center;
}

.styled-form {
  margin-top: 26px;
}

.input-group {
  margin-bottom: 18px;
}

.input-group label {
  display: block;
  margin-bottom: 9px;
  font-size: 0.96rem;
  font-weight: 600;
}

.input-group input {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.03);
  color: #fff;
  outline: none;
  transition: 0.2s ease;
}

.input-group input:focus {
  border-color: rgba(255, 122, 24, 0.7);
  box-shadow: 0 0 0 4px rgba(255, 122, 24, 0.14);
}

.form-btn {
  width: 100%;
  cursor: pointer;
}

.alert {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: 14px;
  line-height: 1.5;
}

.alert.info {
  background: rgba(80, 140, 255, 0.15);
  border: 1px solid rgba(80, 140, 255, 0.35);
  color: #dbe8ff;
}

.alert.success {
  background: rgba(40, 167, 69, 0.15);
  border: 1px solid rgba(40, 167, 69, 0.35);
  color: #d8ffe3;
}

.alert.error {
  background: rgba(220, 53, 69, 0.15);
  border: 1px solid rgba(220, 53, 69, 0.35);
  color: #ffd9de;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 28px 0 28px;
}

.large-btn {
  min-width: 220px;
}

.site-footer {
  padding: 28px 20px 38px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  backdrop-filter: blur(2px);
}

.footer-content {
  width: min(1180px, 92%);
  margin: 0 auto;
  text-align: center;
}

.footer-sub {
  margin-top: 8px;
  color: #9ea5b8;
  font-size: 0.95rem;
}

@media (max-width: 980px) {
  .hero-grid,
  .section-layout,
  .cards-grid,
  .download-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    min-height: 320px;
  }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-wrap {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0 12px;
  }

  .nav-row {
    flex: 0 0 auto;
  }

  .menu {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 6px;
    padding: 16px 0 8px;
    margin-top: 8px;
    border-top: 1px solid var(--line);
  }

  .site-header.nav-open .menu {
    display: flex;
  }

  .menu a {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
  }

  .menu .btn-download {
    text-align: center;
  }
}

@media (max-width: 720px) {
  main {
    padding-top: calc(var(--header-h) + 8px);
  }

  .hero-section,
  .content-section {
    min-height: auto;
    padding: 72px 0;
  }

  .form-box,
  .download-box,
  .center-box {
    padding: 24px 20px;
    border-radius: var(--radius-lg);
  }
}

.account-section {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.account-box {
  background: rgba(18, 25, 35, 0.44);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  padding: 30px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(4px);
}

.account-top {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.account-user-info {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 14px 16px;
  line-height: 1.7;
  min-width: 250px;
}

.characters-panel h2 {
  margin-bottom: 18px;
  color: #ffd3a3;
}

.characters-table-wrap {
  overflow-x: auto;
}

.characters-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 12px;
  overflow: hidden;
}

.characters-table thead th {
  background: var(--orange);
  color: #fff;
  text-align: left;
  padding: 14px;
  font-size: 14px;
}

.characters-table tbody td {
  padding: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.01);
}

.characters-table tbody tr:hover td {
  background: rgba(255, 122, 24, 0.1);
}

.account-actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.panel-card {
  background: rgba(20, 28, 39, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 22px;
  backdrop-filter: blur(3px);
}

.panel-card h2 {
  margin-bottom: 16px;
  color: #ffd3a3;
}

.styled-form select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.03);
  color: #fff;
  outline: none;
  font-family: inherit;
}

.styled-form select option {
  color: #000;
}

.danger-btn {
  background: #b91c1c;
  border: none;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
}

.danger-btn:hover {
  background: #991b1b;
}

.danger-btn:disabled,
.form-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .account-grid {
    grid-template-columns: 1fr;
  }
}

.ranking-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.ranking-menu a {
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: 0.2s ease;
}

.ranking-menu a:hover {
  background: rgba(255, 122, 24, 0.12);
}

.ranking-menu a.active-rank {
  background: var(--orange);
  color: #fff;
}

.input-group input,
.input-group select,
.styled-form select {
  font-size: 1rem;
}

.donate-qr-wrap {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.donate-qr {
  max-width: 260px;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.donate-pix-text {
  width: 100%;
  min-height: 100px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  font-family: ui-monospace, monospace;
  font-size: 0.9rem;
  resize: vertical;
}

.donate-pix-note {
  margin-top: 16px;
}

.donate-promo-list {
  margin: 8px 0 16px 1.2rem;
  color: var(--muted);
  line-height: 1.6;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .nav-toggle-bar {
    transition: none;
  }
}