/* ============================================
   Códex do Abismo - CSS Puro
   RPG de Horror Cósmico
   ============================================ */

/* === RESET & BASE === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Colors */
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #151515;
  --text-primary: #e8e8e8;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --accent-gold: #d4af37;
  --accent-gold-light: #f4e4a1;
  --accent-purple: #4b0082;
  --accent-purple-light: rgba(75, 0, 130, 0.3);
  --border-color: rgba(212, 175, 55, 0.3);
  --danger: #dc2626;
  --warning: #d97706;
  
  /* Typography */
  --font-serif: 'Crimson Text', Georgia, serif;
  --font-sans: 'Inter', system-ui, sans-serif;
  
  /* Spacing */
  --section-padding: 6rem 1.5rem;
  --container-max: 1200px;
  --radius: 0.75rem;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* === UTILITIES === */
.text-gold-gradient {
  background: linear-gradient(135deg, #d4af37 0%, #f4e4a1 50%, #d4af37 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-center {
  text-align: center;
}

/* === ANIMATIONS === */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(75, 0, 130, 0.3), 0 0 40px rgba(75, 0, 130, 0.1);
  }
  50% {
    box-shadow: 0 0 30px rgba(75, 0, 130, 0.5), 0 0 60px rgba(75, 0, 130, 0.2);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes eye-pulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.05); opacity: 1; }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0) translateX(-50%); }
  50% { transform: translateY(-10px) translateX(-50%); }
}

@keyframes rotate-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-pulse-glow {
  animation: pulse-glow 3s ease-in-out infinite;
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-fade-in {
  animation: fade-in-up 0.8s ease-out forwards;
}

/* === NAVIGATION === */
.navigation {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 1.5rem;
  transition: all 0.3s ease;
}

.navigation.scrolled {
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--accent-gold);
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
}

.nav-logo-icon {
  width: 24px;
  height: 24px;
}

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

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--accent-gold);
  transition: all 0.3s ease;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a:hover {
  color: var(--accent-gold);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-gold);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Mobile Nav */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }
  
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10, 10, 10, 0.98);
    padding: 1.5rem;
    gap: 1rem;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
  }
  
  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
}

/* === HERO SECTION === */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.5rem;
  position: relative;
  overflow: hidden;
  background: 
    radial-gradient(ellipse at 20% 20%, rgba(75, 0, 130, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(75, 0, 130, 0.1) 0%, transparent 50%),
    var(--bg-primary);
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}

.hero-orb-1 {
  top: 25%;
  left: 25%;
  width: 24rem;
  height: 24rem;
  background: rgba(75, 0, 130, 0.1);
}

.hero-orb-2 {
  bottom: 25%;
  right: 25%;
  width: 20rem;
  height: 20rem;
  background: rgba(75, 0, 130, 0.05);
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 56rem;
}

/* Eye Portal */
.eye-lid {
  position: absolute;
  top: -100%;        /* Mantém a pálpebra fora da área do olho */
  left: 0;
  width: 100%;
  height: 100%;
  background: #0a0a0a;
  z-index: 10;
  border-radius: 50%;
  opacity: 0;         /* <--- TORNA A PÁLPEBRA INVISÍVEL */
  transition: top 0.1s ease-in, opacity 0.1s ease-in; /* Suaviza movimento e opacidade */
  pointer-events: none;
}

.eye-blink {
  top: 0% !important;      /* Desce para fechar o olho */
  opacity: 1 !important;   /* <--- TORNA A PÁLPEBRA VISÍVEL */
  transition: top 0.05s ease-out, opacity 0.05s ease-out !important;
}

.eye-outer {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto;
}

.eye-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid;
}

.eye-ring-1 {
  border-color: rgba(75, 0, 130, 0.3);
  animation: rotate-slow 20s linear infinite;
}

.eye-ring-2 {
  inset: 10px;
  border-color: rgba(75, 0, 130, 0.5);
  animation: rotate-slow 15s linear infinite reverse;
}

.eye-ring-3 {
  inset: 20px;
  border-color: rgba(212, 175, 55, 0.3);
  animation: rotate-slow 10s linear infinite;
}

.eye-inner {
  position: absolute;
  inset: 30px;
  background: radial-gradient(circle, #2e211a 0%, #0a0a0a 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.eye-iris {
  width: 70%;
  height: 70%;
  background: radial-gradient(circle, #ffffff 0%, #ffffff 50%, #fd6464 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: eye-pulse 4s ease-in-out infinite;
}

.eye-pupil {
  width: 50%;
  height: 50%;
  background: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.eye-void {
  width: 30%;
  height: 30%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.3) 0%, transparent 70%);
  border-radius: 50%;
}

.eye-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, rgba(75, 0, 130, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse-glow 3s ease-in-out infinite;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-family: var(--font-serif);
  font-size: clamp(1.125rem, 3vw, 1.5rem);
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 2rem;
}

.hero-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.hero-divider .divider-line {
  width: 6rem;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(212, 175, 55, 0.5));
}

.hero-divider .divider-line:last-child {
  background: linear-gradient(to left, transparent, rgba(212, 175, 55, 0.5));
}

.hero-divider svg {
  width: 24px;
  height: 24px;
  color: rgba(212, 175, 55, 0.6);
}

.hero-description {
  color: var(--text-secondary);
  max-width: 42rem;
  margin: 0 auto 3rem;
  font-size: 1rem;
  line-height: 1.7;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: rgba(75, 0, 130, 0.2);
  border: 1px solid rgba(75, 0, 130, 0.4);
  border-radius: var(--radius);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.hero-cta svg {
  width: 20px;
  height: 20px;
}

.hero-cta:hover {
  background: rgba(75, 0, 130, 0.3);
  transform: translateY(-2px);
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s ease-in-out infinite;
}

.scroll-mouse {
  width: 24px;
  height: 40px;
  border: 2px solid rgba(212, 175, 55, 0.3);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.scroll-wheel {
  width: 4px;
  height: 8px;
  background: rgba(212, 175, 55, 0.6);
  border-radius: 2px;
}

/* === SECTIONS === */
.section {
  padding: var(--section-padding);
  position: relative;
}

.section-alt {
  background: var(--bg-secondary);
}

.section-container {
  max-width: var(--container-max);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 1.5rem;
}

.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.section-divider .divider-line {
  width: 4rem;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-color));
}

.section-divider .divider-line:last-child {
  background: linear-gradient(to left, transparent, var(--border-color));
}

.divider-diamond {
  width: 8px;
  height: 8px;
  background: var(--accent-gold);
  transform: rotate(45deg);
}

/* === TEXT STYLES === */
.intro-text {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.intro-text strong {
  color: var(--accent-gold);
}

/* === INFO BOXES === */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.info-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative;
}

.info-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-purple);
  border-radius: var(--radius) var(--radius) 0 0;
}

.info-box-warning::before {
  background: var(--warning);
}

.info-box-danger::before {
  background: var(--danger);
}

.info-box-title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  color: var(--accent-gold);
  margin-bottom: 0.75rem;
}

.info-box p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.info-list {
  list-style: none;
}

.info-list li {
  color: var(--text-secondary);
  padding: 0.375rem 0;
  font-size: 0.9375rem;
}

.info-list li strong {
  color: var(--accent-gold);
}

.info-list.compact {
  margin-top: 0.75rem;
}

.info-list.compact li {
  padding: 0.25rem 0;
  font-size: 0.875rem;
}

.formula-inline {
  font-family: monospace;
  color: var(--accent-gold);
  background: rgba(10, 10, 10, 0.5);
  padding: 0.75rem;
  border-radius: 0.5rem;
  text-align: center;
  margin-top: 1rem;
}

/* === DATA TABLES === */
.data-table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.data-table caption {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--accent-gold);
  margin-bottom: 1rem;
  text-align: left;
}

.data-table th,
.data-table td {
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.data-table th {
  background: rgba(75, 0, 130, 0.2);
  color: var(--accent-gold);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table tbody tr {
  transition: background 0.2s ease;
}

.data-table tbody tr:hover {
  background: rgba(75, 0, 130, 0.1);
}

.data-table td {
  color: var(--text-secondary);
}

.table-note {
  color: var(--text-muted);
  font-size: 0.875rem;
  text-align: center;
  margin-top: 1rem;
}

/* === ATTRIBUTE CARDS === */
.attribute-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.attribute-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.attribute-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.attribute-card-defensive::before {
  background: linear-gradient(90deg, #22c55e, #16a34a);
}

.attribute-card-useful::before {
  background: linear-gradient(90deg, #3b82f6, #2563eb);
}

.attribute-card-combat::before {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.attribute-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(75, 0, 130, 0.2);
  border-radius: 50%;
}

.attribute-icon svg {
  width: 32px;
  height: 32px;
}

.attribute-card-defensive .attribute-icon svg {
  color: #22c55e;
}

.attribute-card-useful .attribute-icon svg {
  color: #3b82f6;
}

.attribute-card-combat .attribute-icon svg {
  color: #ef4444;
}

.attribute-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--accent-gold);
  margin-bottom: 1rem;
}

.attribute-list {
  list-style: none;
  text-align: left;
}

.attribute-list li {
  color: var(--text-secondary);
  padding: 0.5rem 0;
  font-size: 0.9375rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.attribute-list li:last-child {
  border-bottom: none;
}

/* === FORMULA BOXES === */
.formulas-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--accent-gold);
  text-align: center;
  margin-bottom: 1.5rem;
}

.formula-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.formula-box {
  background: rgba(75, 0, 130, 0.15);
  border: 1px solid rgba(75, 0, 130, 0.3);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}

.formula-label {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.formula-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  color: var(--accent-gold);
}

/* === CURRENCY CARDS (Mercador) === */
.currency-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.currency-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  position: relative;
}

.currency-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, transparent 48%, rgba(212, 175, 55, 0.5) 49%, rgba(212, 175, 55, 0.5) 51%, transparent 52%);
  background-size: 10px 10px;
  pointer-events: none;
  opacity: 0.3;
  border-radius: var(--radius);
}

.currency-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.currency-icon svg {
  width: 48px;
  height: 48px;
}

.currency-icon-flesh svg {
  color: #f87171;
}

.currency-icon-mind svg {
  color: #60a5fa;
}

.currency-icon-corruption svg {
  color: #a855f7;
}

.currency-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--accent-gold);
  margin-bottom: 0.75rem;
}

.currency-desc {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* === FAMILY CARDS === */
.family-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.family-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.family-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent-gold);
}

.family-card.family-verde::before {
  background: #22c55e;
}

.family-card.family-vermelha::before {
  background: #ef4444;
}

.family-card.family-branca::before {
  background: #f4e4a1;
}

.family-title {
  font-family: var(--font-serif);
  color: var(--accent-gold);
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.family-trait {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.family-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.family-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.25);
  color: var(--text-secondary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.family-placeholder {
  grid-column: 1 / -1;
  color: var(--text-muted);
  text-align: center;
  padding: 2rem;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius);
}

/* === COMBAT CARDS === */
.combat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.combat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative;
}

.combat-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, transparent 48%, rgba(212, 175, 55, 0.5) 49%, rgba(212, 175, 55, 0.5) 51%, transparent 52%);
  background-size: 10px 10px;
  pointer-events: none;
  opacity: 0.3;
  border-radius: var(--radius);
}

.combat-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.combat-header svg {
  width: 32px;
  height: 32px;
  color: var(--accent-gold);
}

.combat-header h4 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--accent-gold);
}

.combat-desc {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 1rem;
}

.combat-list {
  list-style: none;
}

.combat-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  padding: 0.375rem 0;
  font-size: 0.9375rem;
}

.combat-list li strong {
  color: var(--accent-gold);
}

.combat-list .bullet {
  width: 6px;
  height: 6px;
  background: rgba(212, 175, 55, 0.6);
  border-radius: 50%;
  flex-shrink: 0;
}

/* === FINAL NOTE === */
.final-note {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: rgba(75, 0, 130, 0.1);
  border: 1px solid rgba(75, 0, 130, 0.3);
  border-radius: var(--radius);
  margin-top: 3rem;
  width: 100%;
  justify-content: center;
  flex-wrap: wrap;
}

.final-note svg {
  width: 20px;
  height: 20px;
  color: var(--accent-gold);
  flex-shrink: 0;
}

.final-note span {
  font-family: var(--font-serif);
  color: var(--text-secondary);
}

/* === FOOTER === */
.footer {
  padding: 3rem 1.5rem;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.footer-container {
  max-width: var(--container-max);
  margin: 0 auto;
  text-align: center;
}

.footer-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.footer-divider .divider-line {
  width: 4rem;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(212, 175, 55, 0.5));
}

.footer-divider .divider-line:last-child {
  background: linear-gradient(to left, transparent, rgba(212, 175, 55, 0.5));
}

.footer-divider svg {
  width: 24px;
  height: 24px;
  color: rgba(212, 175, 55, 0.6);
}

.footer-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.footer-desc {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(10, 10, 10, 0.9);
}

::-webkit-scrollbar-thumb {
  background: rgba(75, 0, 130, 0.5);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(75, 0, 130, 0.7);
}

/* === O DESPERTAR SECTION === */
.despertar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.despertar-card {
  background: rgba(21, 21, 21, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.despertar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-gold));
}

.despertar-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.despertar-card-header svg {
  width: 28px;
  height: 28px;
  color: var(--accent-gold);
}

.despertar-card-header h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--accent-gold);
}

.despertar-intro {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.despertar-intro strong {
  color: var(--accent-gold);
}

.despertar-rules {
  background: rgba(75, 0, 130, 0.1);
  border-left: 3px solid var(--accent-purple);
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.despertar-rules h4 {
  font-family: var(--font-serif);
  color: var(--text-primary);
  font-size: 0.9375rem;
  margin-bottom: 0.5rem;
}

.despertar-rules ul {
  list-style: none;
}

.despertar-rules li {
  color: var(--text-secondary);
  padding: 0.25rem 0;
  font-size: 0.9375rem;
}

.rule-label {
  color: var(--accent-gold);
  font-weight: 600;
}

.despertar-warning {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: rgba(217, 119, 6, 0.1);
  border: 1px solid rgba(217, 119, 6, 0.3);
  padding: 0.875rem;
  border-radius: var(--radius);
}

.despertar-warning svg {
  width: 20px;
  height: 20px;
  color: var(--warning);
  flex-shrink: 0;
  margin-top: 2px;
}

.despertar-warning span {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-style: italic;
}

/* Status List */
.status-list {
  list-style: none;
}

.status-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.status-list li:last-child {
  border-bottom: none;
}

.status-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.status-label {
  color: var(--accent-gold);
  font-weight: 500;
  min-width: 120px;
}

.status-value {
  color: var(--text-secondary);
}

/* Survival Formulas */
.survival-formulas {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.survival-formula {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: rgba(75, 0, 130, 0.15);
  border-radius: var(--radius);
}

.survival-formula .formula-name {
  color: var(--text-primary);
  font-weight: 500;
}

.survival-formula code {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent-gold);
  font-size: 0.9375rem;
}

.despertar-note {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem;
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: var(--radius);
}

.despertar-note svg {
  width: 20px;
  height: 20px;
  color: var(--danger);
  flex-shrink: 0;
}

.despertar-note span {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-style: italic;
}

/* Despertar Banner */
.despertar-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, rgba(75, 0, 130, 0.2) 0%, rgba(10, 10, 10, 0.8) 50%, rgba(75, 0, 130, 0.2) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  text-align: center;
  flex-wrap: wrap;
}

.despertar-banner .banner-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.despertar-banner svg {
  width: 32px;
  height: 32px;
  color: var(--accent-gold);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.banner-text {
  color: var(--text-secondary);
  font-family: var(--font-serif);
  font-size: 1rem;
  position: relative;
  z-index: 1;
}

.banner-text strong {
  color: var(--accent-gold);
}

.banner-text em {
  color: var(--text-primary);
}

/* === CALCULATOR SECTION === */
.calculator-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.calculator-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-gold), var(--accent-purple));
}

.calculator-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 1rem;
}

.points-display {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.points-label {
  color: var(--text-secondary);
  font-size: 1rem;
}

.points-value {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-gold);
  transition: color 0.3s ease;
}

.points-value.warning {
  color: var(--warning);
}

.points-value.danger {
  color: var(--danger);
}

.points-total {
  color: var(--text-muted);
  font-size: 1rem;
}

.reset-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: rgba(75, 0, 130, 0.2);
  border: 1px solid rgba(75, 0, 130, 0.4);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.reset-btn:hover {
  background: rgba(75, 0, 130, 0.3);
  transform: translateY(-2px);
}

.reset-btn svg {
  width: 18px;
  height: 18px;
}

/* Attributes Calculator */
.attributes-calculator {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.attr-category {
  background: rgba(10, 10, 10, 0.5);
  border-radius: var(--radius);
  overflow: hidden;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
}

.category-header svg {
  width: 24px;
  height: 24px;
}

.category-header h4 {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
}

.category-defensive {
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.05));
}

.category-defensive svg {
  color: #22c55e;
}

.category-defensive h4 {
  color: #22c55e;
}

.category-useful {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.05));
}

.category-useful svg {
  color: #3b82f6;
}

.category-useful h4 {
  color: #3b82f6;
}

.category-combat {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.05));
}

.category-combat svg {
  color: #ef4444;
}

.category-combat h4 {
  color: #ef4444;
}

.attr-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.attr-name {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.attr-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.attr-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(75, 0, 130, 0.2);
  border: 1px solid rgba(75, 0, 130, 0.4);
  border-radius: 50%;
  color: var(--text-primary);
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.attr-btn:hover:not(:disabled) {
  background: rgba(75, 0, 130, 0.4);
  transform: scale(1.1);
}

.attr-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.attr-btn.attr-minus:hover:not(:disabled) {
  background: rgba(220, 38, 38, 0.3);
  border-color: rgba(220, 38, 38, 0.5);
}

.attr-btn.attr-plus:hover:not(:disabled) {
  background: rgba(34, 197, 94, 0.3);
  border-color: rgba(34, 197, 94, 0.5);
}

.attr-value {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-gold);
  min-width: 2rem;
  text-align: center;
}

/* Calculated Stats */
.calculated-stats {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.stats-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--accent-gold);
  text-align: center;
  margin-bottom: 1.5rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem;
  border-radius: var(--radius);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.stat-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.stat-pv {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.stat-pv::before {
  background: #ef4444;
}

.stat-def {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.stat-def::before {
  background: #3b82f6;
}

.stat-ps {
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.stat-ps::before {
  background: #a855f7;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 0.25rem;
  transition: transform 0.3s ease;
}

.stat-value.updated {
  transform: scale(1.2);
}

.stat-formula {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* === O GRIMÓRIO DOS CAMINHOS === */
.grimorio-section {
  padding: 6rem 1.5rem;
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(75, 0, 130, 0.1) 0%, transparent 50%),
    linear-gradient(180deg, rgba(21, 21, 21, 0.5) 0%, rgba(10, 10, 10, 0.8) 100%);
  position: relative;
  overflow: hidden;
}

.grimorio-container {
  max-width: 1400px;
  margin: 0 auto;
}

.grimorio-header {
  text-align: center;
  margin-bottom: 3rem;
}

.grimorio-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #d4af37 0%, #f4e4a1 50%, #d4af37 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.grimorio-subtitle {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 2rem;
}

/* Path Selection - Wax Seals */
.path-seals {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.seal-button {
  position: relative;
  width: 120px;
  height: 120px;
  border: none;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(212, 175, 55, 0.3), rgba(212, 175, 55, 0.1));
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  color: var(--accent-gold);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(75, 0, 130, 0.3), inset 0 -2px 8px rgba(0, 0, 0, 0.8);
}

.seal-button::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 2px solid var(--accent-gold);
  border-radius: 50%;
  opacity: 0.6;
  transition: all 0.4s ease;
}

.seal-button::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
  border-radius: 50%;
  pointer-events: none;
}

.seal-button:hover:not(.disabled) {
  transform: scale(1.1);
  background: radial-gradient(circle at 30% 30%, rgba(212, 175, 55, 0.5), rgba(212, 175, 55, 0.2));
  box-shadow: 0 15px 40px rgba(75, 0, 130, 0.5), inset 0 -2px 8px rgba(0, 0, 0, 0.8);
}

.seal-button::before:hover {
  opacity: 1;
}

.seal-button.active {
  background: radial-gradient(circle at 30% 30%, rgba(212, 175, 55, 0.6), rgba(212, 175, 55, 0.3));
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.8), inset 0 -2px 8px rgba(0, 0, 0, 0.8),
              0 0 50px rgba(75, 0, 130, 0.4);
}

.seal-button.active::before {
  opacity: 1;
  box-shadow: inset 0 0 10px rgba(212, 175, 55, 0.6);
}

.seal-button.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(1);
  pointer-events: none;
}

.seal-button span {
  position: relative;
  z-index: 2;
}

/* The Book Container */
.book-container {
  perspective: 1200px;
  margin: 0 auto 3rem;
  max-width: 1000px;
}

.book {
  position: relative;
  width: 100%;
  aspect-ratio: 2;
  background: linear-gradient(135deg, #1a1410 0%, #2a2015 50%, #1a1410 100%);
  border: 12px solid #2d1f0f;
  border-radius: 0 8px 8px 0;
  box-shadow: 
    inset -50px 0 100px rgba(0, 0, 0, 0.8),
    0 20px 60px rgba(0, 0, 0, 0.9),
    0 0 40px rgba(75, 0, 130, 0.3);
  display: flex;
  overflow: hidden;
}

.book::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    linear-gradient(90deg, transparent 0%, rgba(212, 175, 55, 0.1) 50%, transparent 100%);
  pointer-events: none;
  border-radius: 0 8px 8px 0;
}

/* Left Page - Image */
.page-left {
  flex: 1;
  background: linear-gradient(135deg, #3d3428 0%, #2d2418 100%);
  border-right: 1px solid rgba(212, 175, 55, 0.3);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.page-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(212, 175, 55, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(139, 69, 19, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

/* Blood/Ink Splatter Effects */
.blood-splatter-1,
.blood-splatter-2 {
  position: absolute;
  background: rgba(139, 50, 50, 0.15);
  border-radius: 50%;
  opacity: 0.6;
  filter: blur(8px);
}

.blood-splatter-1 {
  width: 80px;
  height: 60px;
  top: 15%;
  right: 10%;
  transform: rotate(-25deg);
}

.blood-splatter-2 {
  width: 60px;
  height: 50px;
  bottom: 20%;
  left: 8%;
  transform: rotate(15deg);
}

.concept-art-frame {
  position: relative;
  width: 100%;
  height: 100%;
  border: 4px solid var(--accent-gold);
  border-radius: 8px;
  padding: 16px;
  background: rgba(42, 33, 24, 0.9);
  box-shadow: 
    inset 0 0 30px rgba(0, 0, 0, 0.9),
    0 0 20px rgba(212, 175, 55, 0.4),
    inset 0 0 0 2px rgba(212, 175, 55, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  aspect-ratio: 2/3;
}

.concept-art-frame::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 2px solid rgba(212, 175, 55, 0.6);
  border-radius: 4px;
  pointer-events: none;
}

.concept-art-frame::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, transparent, rgba(212, 175, 55, 0.1), transparent);
  border-radius: 10px;
  pointer-events: none;
}

.concept-art {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a1410 0%, #2a2015 100%);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  text-align: center;
  padding: 1rem;
  position: relative;
}

.concept-art::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
  border-radius: 4px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.concept-art img,
.concept-art .path-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  position: absolute;
  top: 0;
  left: 0;
}

.concept-art img.active,
.concept-art .path-image.active {
  opacity: 1;
  position: relative;
}

.limit-highlight {
  color: var(--accent-gold);
  font-style: italic;
}

.concept-art-title{
  position: absolute;
  bottom: 1.5em;
  color: var(--accent-gold);
}

/* Right Page - Content */
.page-right {
  flex: 1;
  background: linear-gradient(135deg, #2a2520 0%, #1f1a15 100%);
  padding: 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  position: relative;
  color: #e8dcc8;
}

.page-right::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 80% 20%, rgba(139, 69, 19, 0.05) 0%, transparent 50%),
    repeating-linear-gradient(
      0deg,
      rgba(139, 69, 19, 0.01) 0px,
      rgba(139, 69, 19, 0.01) 1px,
      transparent 1px,
      transparent 2px
    );
  pointer-events: none;
}

.page-content {
  position: relative;
  z-index: 1;
}

.page-content h3 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  color: var(--accent-gold);
  margin-bottom: 1.5rem;
  border-bottom: 2px solid rgba(212, 175, 55, 0.5);
  padding-bottom: 0.75rem;
}

.scales-list {
  list-style: none;
}

.scale-item {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(212, 175, 55, 0.08);
  border-left: 4px solid var(--accent-gold);
  border-radius: 0 4px 4px 0;
}

.scale-level {
  font-family: var(--font-serif);
  font-weight: 700;
  color: #1a1410;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.scale-level.high {
  color: var(--accent-gold);
}

.scale-description {
  color: #3d3428;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.scale-choices {
  font-size: 0.85rem;
  color: #5a4a38;
  font-style: italic;
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: rgba(139, 69, 19, 0.1);
  border-radius: 3px;
}

/* Page Flip Animation */
@keyframes page-flip {
  0% {
    transform: rotateY(0deg) scale(1);
    opacity: 1;
  }
  25% {
    transform: rotateY(-45deg) scale(0.95);
    opacity: 0.7;
  }
  50% {
    transform: rotateY(-90deg) scale(0.9);
    opacity: 0.3;
  }
  75% {
    transform: rotateY(-135deg) scale(0.95);
    opacity: 0.7;
  }
  100% {
    transform: rotateY(-180deg) scale(1);
    opacity: 1;
  }
}

.page-flip-active .page-right {
  animation: page-flip 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  transform-origin: right center;
}

/* Image Reveal Animation */
@keyframes image-reveal {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    filter: blur(5px);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.9) translateY(10px);
    filter: blur(2px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

.concept-art.reveal {
  animation: image-reveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Path Data Display */
.path-data {
  display: none;
}

.path-data.active {
  display: block;
  animation: fadeIn 0.6s ease-in-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Grimório Decorative Elements */
.grimorio-decorations {
  position: absolute;
  pointer-events: none;
  opacity: 0.3;
}

.grimorio-deco-line {
  position: absolute;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
  height: 1px;
}

.deco-line-1 {
  top: 15%;
  left: 0;
  right: 0;
  width: 100%;
}

.deco-line-2 {
  top: 85%;
  left: 0;
  right: 0;
  width: 100%;
}

/* Scrollbar for Page Content */
.page-right::-webkit-scrollbar {
  width: 6px;
}

.page-right::-webkit-scrollbar-track {
  background: rgba(139, 69, 19, 0.1);
  border-radius: 3px;
}

.page-right::-webkit-scrollbar-thumb {
  background: rgba(139, 69, 19, 0.5);
  border-radius: 3px;
}

.page-right::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 69, 19, 0.7);
}

/* Scales Accordion */
.scales-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.scale-accordion {
  border: 1px solid rgba(75, 0, 130, 0.3);
  border-radius: 6px;
  background: rgba(75, 0, 130, 0.2);
  overflow: hidden;
  transition: all 0.3s ease;
  border-bottom: 2px solid var(--accent-gold);
}

.scale-accordion:hover {
  background: rgba(75, 0, 130, 0.3);
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow: 0 0 15px rgba(75, 0, 130, 0.4);
}

.scale-accordion[open] {
  background: rgba(75, 0, 130, 0.25);
  border-color: rgba(212, 175, 55, 0.6);
  box-shadow: 0 0 20px rgba(75, 0, 130, 0.5);
}

.scale-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  background: rgba(75, 0, 130, 0.15);
  transition: all 0.3s ease;
  list-style: none;
  border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.scale-header:hover {
  background: rgba(75, 0, 130, 0.4);
  color: var(--accent-gold);
}

.scale-header::marker {
  display: none;
}

.scale-header::before {
  content: '🗝️';
  font-size: 1.2rem;
  color: var(--accent-gold);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.scale-accordion[open] .scale-header::before {
  transform: rotate(90deg);
}

.scale-number {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--accent-gold);
  font-size: 1.1rem;
  min-width: 2.5rem;
  text-align: center;
  background: rgba(212, 175, 55, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 50%;
  border: 1px solid var(--accent-gold);
}

.scale-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  flex: 1;
}

.scale-content {
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid rgba(139, 69, 19, 0.2);
}

/* Abilities Sections */
.abilities-section {
  margin-bottom: 1.5rem;
}

.abilities-section:last-child {
  margin-bottom: 0;
}

.abilities-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-gold);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ability-icon {
  width: 18px;
  height: 18px;
  color: var(--accent-gold);
  flex-shrink: 0;
}

.magic-icon {
  color: var(--accent-purple);
}

.ability-item {
  color: #666666;
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  background: rgba(139, 69, 19, 0.05);
  border-radius: 4px;
  border-left: 3px solid var(--accent-gold);
}

.ability-item:last-child {
  margin-bottom: 0;
}

.ability-item strong {
  color: var(--accent-gold);
  font-weight: 600;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  :root {
    --section-padding: 4rem 1rem;
  }
  
  .hero-orb-1,
  .hero-orb-2 {
    width: 200px;
    height: 200px;
  }
  
  .eye-outer {
    width: 120px;
    height: 120px;
  }
  
  .info-grid,
  .attribute-grid,
  .currency-grid,
  .family-grid,
  .combat-grid,
  .formula-grid {
    grid-template-columns: 1fr;
  }
  
  .data-table th,
  .data-table td {
    padding: 0.625rem 0.5rem;
    font-size: 0.8125rem;
  }

  /* Grimório Responsivo */
  .path-seals {
    gap: 1rem;
  }

  .seal-button {
    width: 90px;
    height: 90px;
    font-size: 0.75rem;
  }

  .book {
    flex-direction: column;
    border-radius: 0;
    aspect-ratio: auto;
    min-height: auto;
  }

  .page-left {
    min-height: 300px;
    border-right: none;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
  }

  .page-right {
    min-height: 400px;
    border-radius: 0;
  }

  .page-content h3 {
    font-size: 1.25rem;
  }

  .scale-header {
    padding: 0.75rem 1rem;
  }

  .scale-number {
    font-size: 1rem;
    min-width: 2rem;
  }

  .scale-title {
    font-size: 0.9rem;
  }

  .scale-content {
    padding: 0.75rem 1rem;
  }

  .abilities-title {
    font-size: 0.8rem;
  }

  .ability-item {
    font-size: 0.8rem;
    padding: 0.4rem;
  }
}
/* ============================================================
   CÓDEX 3D - VERSÃO ISOLADA (SEM CONFLITOS)
   ============================================================ */
:root {
    --paper-color: #f4e4bc;
    --dark-paper: #e8d8ae;
    --cover-color: #4a241b;
    --gold: #e2c18d;
}

#overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.92);
    display: none; 
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(12px);
}

.scene {
    position: relative;
    width: 500px; 
    height: 700px;
    perspective: 2500px;
}

/* Renomeado de .book para .codex-book */
.codex-book {
    position: absolute;
    width: 100%; 
    height: 100%;
    top: 0; 
    left: 0;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.codex-book-open {
    transform: translateX(50%); 
}

/* Renomeado de .page para .codex-page */
.codex-page {
    position: absolute;
    width: 100%; 
    height: 100%;
    top: 0; 
    left: 0;
    transform-origin: left center;
    cursor: pointer;
    user-select: none;
    will-change: transform;
    transition: transform 1.2s cubic-bezier(0.645, 0.045, 0.355, 1);
    transform-style: preserve-3d;
}

.codex-front, .codex-back {
    position: absolute;
    width: 100%; 
    height: 100%;
    top: 0; 
    left: 0;
    backface-visibility: hidden; 
    -webkit-backface-visibility: hidden;
    padding: 50px;
    box-sizing: border-box;
    border: 1px solid rgba(212, 175, 55, 0.3);
    overflow-y: auto;
}

.codex-front {
    background-color: var(--paper-color);
    background-image: url('https://www.transparenttextures.com/patterns/paper-fibers.png');
    z-index: 2;
    border-radius: 0 15px 15px 0;
    box-shadow: inset 20px 0 50px rgba(0,0,0,0.1), 5px 5px 20px rgba(0,0,0,0.4);
}

.codex-back {
    background-color: var(--dark-paper);
    background-image: url('https://www.transparenttextures.com/patterns/paper-fibers.png');
    transform: rotateY(180deg); 
    border-radius: 15px 0 0 15px;
    box-shadow: inset -20px 0 50px rgba(0,0,0,0.1), -5px 5px 20px rgba(0,0,0,0.4);
}

.codex-cover {
    background-color: var(--cover-color) !important;
    color: var(--gold);
    text-align: center;
    border: 8px double var(--gold);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-size: cover !important;
    background-position: center !important;
    background-blend-mode: overlay;
}

.codex-cover-title {
    background: rgba(74, 36, 27, 0.85);
    padding: 25px;
    border: 2px solid var(--gold);
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.codex-flipped { 
    transform: rotateY(-180deg); 
}

.page-title { text-align: center; color: #4a3728; font-family: var(--font-serif); font-size: 1.8rem; margin-bottom: 20px; border-bottom: 1px solid rgba(139, 69, 19, 0.3); padding-bottom: 10px; }
.concept-text {
    color: #333 !important; 
    line-height: 1.6;
    text-align: justify;
    font-family: var(--font-serif);
}
.data-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; margin-top: 15px; }
.data-table td { border-bottom: 1px solid #bda782; padding: 10px 5px; color: #5a4a3a; vertical-align: top; }
.page-number { position: absolute; bottom: 20px; right: 30px; font-style: italic; color: #8a7a6a; font-family: var(--font-serif); }

.btn-close {
    position: fixed; /* Mudado para fixed para não sumir no scroll */
    top: 20px; 
    right: 20px;
    background: var(--gold);
    color: var(--cover-color);
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    font-weight: bold;
    z-index: 10001;
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    transition: 0.3s;
}

.btn-close:hover {
    transform: scale(1.05);
    background: #fff;
}

.codex-back{
  color: #000;
}

.codex-front{
  color: #000;
}

/* ============================================================
   AJUSTE PARA CELULAR: EFEITO CADERNO (PÁGINA ÚNICA)
   ============================================================ */
@media (max-width: 768px) {
    .reading-area {
        padding: 2rem 0;
        overflow-x: hidden;
        display: flex;
        justify-content: center;
    }

    .scene {
        width: 320px;   /* Largura da página visível */
        height: 480px;
        perspective: 1500px;
        margin: 0 auto;
    }

    .codex-book {
        width: 320px;
        left: 0;
        /* No mobile, a lombada fica na esquerda, então não movemos para o centro */
        transform: translateX(0) !important; 
        transition: transform 0.8s ease;
    }

    .codex-book-open {
        transform: translateX(0) !important; 
    }

    .codex-page {
        width: 320px; /* A página ocupa toda a largura da cena */
        height: 100%;
        left: 0; 
        /* O giro agora é na borda ESQUERDA (como um caderno) */
        transform-origin: left center; 
        pointer-events: auto; /* Garante que a página capture o clique */
        user-select: none;
    }

    .codex-front, .codex-back {
        width: 320px;
        padding: 30px;
        box-sizing: border-box;
    }

    /* Ajustes de fonte para a página única */
    .page-title {
        font-size: 1.4rem !important;
        text-align: center;
    }
    .concept-text {
        font-size: 1rem !important;
        text-align: justify;
    }
    .page-number {
        right: 20px;
        font-size: 0.8rem;
    }
    .codex-flipped {
        pointer-events: none; 
    }
}


/* ============================================================
   ESTANTE DE LIVROS (SUBSTITUI OS SELOS)
   ============================================================ */

.book-shelf {
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Livros ficam apoiados na base */
    gap: 10px;
    padding: 40px 20px;
    perspective: 1000px;
    border-bottom: 15px solid #2a1a0f; /* A prateleira de madeira */
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    background: linear-gradient(to bottom, rgba(0,0,0,0.4), transparent);
    min-height: 400px;
}

.book-spine {
    position: relative;
    width: 45px;
    height: 320px;
    background: linear-gradient(90deg, #3d1f15 0%, #5c2a1d 40%, #3d1f15 100%);
    border: 2px solid #2a120b;
    border-left: 3px solid #1a0a05;
    border-right: 3px solid #1a0a05;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 5px 0 15px rgba(0,0,0,0.5);
    border-radius: 3px 3px 0 0;
}

/* Efeito de "Folha de Ouro" nas bordas da lombada */
.book-spine::before {
    content: '';
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 5px;
    right: 5px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    pointer-events: none;
}

.spine-title {
    color: var(--accent-gold);
    font-family: var(--font-serif);
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    
    /* Faz o texto ficar vertical */
    writing-mode: vertical-rl; 
    text-orientation: mixed;
    transform: rotate(180deg); /* Ajusta a leitura de baixo para cima */
    
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    pointer-events: none;
}

.spine-decoration {
    position: absolute;
    top: 20px;
    width: 30px;
    height: 30px;
    border: 2px solid var(--accent-gold);
    border-radius: 50%;
    opacity: 0.6;
    background: radial-gradient(circle, var(--accent-gold) 0%, transparent 70%);
}

/* Efeito ao passar o mouse: O livro "sai" da estante */
.book-spine:hover {
    transform: translateZ(20px) translateY(-20px) rotateX(-5deg);
    background: linear-gradient(90deg, #4d2a20 0%, #7c3a2d 40%, #4d2a20 100%);
    box-shadow: 0 20px 30px rgba(0,0,0,0.8), 0 0 15px var(--accent-gold);
    z-index: 10;
}

.book-spine:hover .spine-title {
    color: #fff;
    text-shadow: 0 0 8px var(--accent-gold);
}

/* Ajuste responsivo para celulares */
@media (max-width: 768px) {
    .book-shelf {
        gap: 5px;
        padding: 20px 10px;
    }
    .book-spine {
        width: 35px;
        height: 250px;
    }
    .spine-title {
        font-size: 0.75rem;
    }
}

/* Área onde o livro fica exposto na página */
.reading-area {
    display: none; /* Começa escondido, aparece ao clicar no livro */
    justify-content: center;
    align-items: center;
    padding: 4rem 0;
    margin-top: 2rem;
    perspective: 2500px;
    background: radial-gradient(circle, rgba(75, 0, 130, 0.15) 0%, transparent 70%);
    border-top: 1px solid var(--border-color);
}

/* Ajuste da cena para não flutuar, mas ficar fixa na página */
.scene {
    position: relative;
    width: 500px; 
    height: 700px;
    margin: 0 auto;
}

/* Ajuste do livro para não sumir da tela ao abrir */
.codex-book {
    position: absolute;
    width: 100%; 
    height: 100%;
    top: 0; 
    left: 0;
    transform-style: preserve-3d;
    will-change: transform;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Quando o livro abre, ele desliza para a direita para centralizar a lombada */
.codex-book-open {
    transform: translateX(50%); 
}

/* Para evitar que o livro corte no mobile, ajustamos a área de leitura */
@media (max-width: 768px) {
    .reading-area {
        padding: 2rem 0;
        overflow-x: hidden; /* Evita scroll horizontal chato */
    }
    .scene {
        width: 320px;
        height: 480px;
    }
}
