/* ===== Main Styles ===== */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700;900&family=Lora:ital,wght@0,400;0,700;1,400&display=swap');
@import url('theme.css');
@import url('animations.css');

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
}

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-gold-light);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(10, 10, 10, 0.95);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 900;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 3px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 36px;
  height: 36px;
}

.logo:hover {
  color: var(--accent-gold-light);
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  font-family: var(--font-heading);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-primary);
  padding: 8px 0;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gold);
  transition: width var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

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

/* Burger button */
.burger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.burger-btn .burger-line {
  width: 24px;
  height: 2px;
  background: var(--accent-gold);
  border-radius: 2px;
  display: block;
}

/* ===== Hero Section ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 0%, #1a1a2e 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, #16213e 0%, transparent 50%),
    linear-gradient(180deg, #0a0a0a 0%, #0d0d0d 100%);
  padding-top: var(--header-height);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(201, 168, 76, 0.02) 2px,
      rgba(201, 168, 76, 0.02) 4px
    );
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(201, 168, 76, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 30%, rgba(139, 0, 0, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  padding: 40px 20px;
  animation: fadeInUp 1s ease forwards;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 56px;
  font-weight: 900;
  color: var(--text-heading);
  text-transform: uppercase;
  letter-spacing: 4px;
  margin-bottom: 20px;
  text-shadow: 0 0 40px rgba(201, 168, 76, 0.3);
}

.hero-title span {
  color: var(--accent-gold);
}

.hero-subtitle {
  font-size: 20px;
  color: var(--text-primary);
  margin-bottom: 30px;
  line-height: 1.6;
  opacity: 0.9;
}

.hero-divider {
  width: 80px;
  height: 2px;
  background: var(--accent-gold);
  margin: 0 auto 30px;
}

/* ===== Characters Grid Section ===== */
.section-characters {
  padding: 80px 0;
  position: relative;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(22, 33, 62, 0.4) 0%, transparent 60%),
    linear-gradient(180deg, #0a0a0a 0%, #0d0d0d 100%);
}

/* Decorative corner ornaments */
.section-characters::before,
.section-characters::after {
  content: '';
  position: absolute;
  left: 50%;
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
  transform: translateX(-50%);
}

.section-characters::before {
  top: 30px;
}

.section-characters::after {
  bottom: 30px;
}

/* Ornamental diamond accent */
.section-characters .section-title::before,
.section-characters .section-title::after {
  content: '◆';
  color: var(--accent-gold);
  font-size: 12px;
  opacity: 0.5;
  margin: 0 16px;
  vertical-align: middle;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 700;
  color: var(--text-heading);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 10px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-primary);
  opacity: 0.7;
  margin-bottom: 50px;
  font-style: italic;
}

.characters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

/* Character Card */
.character-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.character-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.character-card:hover::after {
  opacity: 0.6;
}

.character-card .card-image {
  width: 100%;
  height: 220px;
  background: linear-gradient(135deg, #16213e, #1a1a2e);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.character-card .card-image::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent, rgba(201, 168, 76, 0.05), transparent, rgba(201, 168, 76, 0.05), transparent);
  animation: rotate 20s linear infinite;
}

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

.character-card .card-image .card-svg-icon {
  width: 100px;
  height: 100px;
  position: relative;
  z-index: 1;
}

.character-card .card-body {
  padding: 20px;
}

.character-card .card-name {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 8px;
}

.character-card .card-title {
  font-size: 14px;
  color: var(--text-primary);
  opacity: 0.8;
  margin-bottom: 12px;
  font-style: italic;
}

.character-card .card-desc {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
  opacity: 0.85;
}

.character-card .card-link {
  font-family: var(--font-heading);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-gold);
}

/* ===== Footer ===== */
.footer {
  background: rgba(10, 10, 10, 0.95);
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
  text-align: center;
}

.footer-content {
  max-width: 600px;
  margin: 0 auto;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 900;
  color: var(--accent-gold);
  margin-bottom: 16px;
  letter-spacing: 2px;
}

.footer-text {
  font-size: 13px;
  opacity: 0.6;
  line-height: 1.8;
  margin-bottom: 8px;
}

.footer-link {
  color: var(--text-link);
}

.footer-divider {
  width: 40px;
  height: 1px;
  background: var(--border-color);
  margin: 16px auto;
}

/* ===== Article Page ===== */
.article-page {
  padding-top: var(--header-height);
  min-height: 100vh;
}

.article-header {
  position: relative;
  padding: 100px 0 60px;
  background:
    radial-gradient(ellipse at 50% 0%, #1a1a2e 0%, transparent 70%),
    linear-gradient(180deg, #0a0a0a 0%, #0d0d0d 100%);
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.article-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent, var(--accent-gold), transparent);
  opacity: 0.3;
}

.article-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-primary);
  margin-bottom: 30px;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

.article-back:hover {
  opacity: 1;
  color: var(--accent-gold);
}

.article-hero-name {
  font-family: var(--font-heading);
  font-size: 48px;
  font-weight: 900;
  color: var(--text-heading);
  text-transform: uppercase;
  letter-spacing: 4px;
  margin-bottom: 12px;
  text-shadow: 0 0 30px rgba(201, 168, 76, 0.2);
}

.article-hero-title {
  font-size: 18px;
  color: var(--accent-gold);
  font-style: italic;
}

.article-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 20px;
}

.article-image-block {
  margin-bottom: 40px;
  text-align: center;
  position: relative;
}

.article-image-block::before,
.article-image-block::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-gold));
  opacity: 0.3;
}

.article-image-block::before {
  left: 5%;
}

.article-image-block::after {
  right: 5%;
  transform: rotate(180deg);
}

.article-image-block .article-hero-image {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: linear-gradient(135deg, #16213e, #1a1a2e);
  border: 3px solid var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  overflow: hidden;
  box-shadow:
    0 0 30px rgba(201, 168, 76, 0.15),
    inset 0 0 30px rgba(10, 10, 10, 0.3);
}

.article-image-block .article-hero-image svg {
  width: 140px;
  height: 140px;
}

/* Info Block */
.info-block {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  padding: 30px;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}

.info-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-gold), transparent, var(--accent-gold));
  opacity: 0.5;
}

.info-block::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 20px,
      rgba(201, 168, 76, 0.02) 20px,
      rgba(201, 168, 76, 0.02) 21px
    );
  pointer-events: none;
}

.info-block-title {
  font-family: var(--font-heading);
  font-size: 18px;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

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

.info-item {
  display: flex;
  flex-direction: column;
}

.info-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-primary);
  opacity: 0.5;
  margin-bottom: 4px;
}

.info-value {
  font-size: 16px;
  color: var(--text-heading);
}

/* Bio Section */
.bio-section {
  margin-bottom: 40px;
  position: relative;
}

.bio-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: -10px;
  width: 3px;
  height: 60px;
  background: linear-gradient(180deg, var(--accent-gold), transparent);
  opacity: 0.4;
  border-radius: 2px;
}

.bio-heading {
  font-family: var(--font-heading);
  font-size: 28px;
  color: var(--text-heading);
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.bio-heading::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 80px;
  height: 2px;
  background: var(--accent-gold);
}

.bio-subheading {
  font-family: var(--font-heading);
  font-size: 22px;
  color: var(--accent-gold);
  margin: 30px 0 12px;
  position: relative;
  padding-left: 16px;
}

.bio-subheading::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: var(--accent-gold);
  border-radius: 50%;
  opacity: 0.6;
}

.bio-text {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 16px;
  opacity: 0.9;
}

/* Quotes Block */
.quotes-block {
  margin-bottom: 40px;
  position: relative;
  padding-top: 10px;
}

.quotes-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 20px;
  background: var(--accent-gold);
  opacity: 0.4;
}

.quotes-title {
  font-family: var(--font-heading);
  font-size: 24px;
  color: var(--text-heading);
  text-align: center;
  margin-bottom: 30px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.quote-item {
  background: var(--bg-block);
  border-left: 4px solid var(--accent-gold);
  padding: 24px 30px;
  margin-bottom: 20px;
  border-radius: 0 var(--card-radius) var(--card-radius) 0;
  position: relative;
}

.quote-item::before {
  content: '\201C';
  font-family: var(--font-heading);
  font-size: 60px;
  color: var(--accent-gold);
  opacity: 0.3;
  position: absolute;
  top: 10px;
  left: 15px;
  line-height: 1;
}

.quote-item::after {
  content: '\201D';
  font-family: var(--font-heading);
  font-size: 40px;
  color: var(--accent-gold);
  opacity: 0.15;
  position: absolute;
  bottom: 5px;
  right: 15px;
  line-height: 1;
}

.quote-text {
  font-size: 18px;
  font-style: italic;
  line-height: 1.6;
  padding-left: 30px;
}

/* Related Characters */
.related-block {
  margin-bottom: 40px;
  position: relative;
}

.related-block::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
  opacity: 0.3;
}

.related-title {
  font-family: var(--font-heading);
  font-size: 24px;
  color: var(--text-heading);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.related-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.related-link {
  display: inline-block;
  padding: 10px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  font-family: var(--font-heading);
  font-size: 14px;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all var(--transition-normal);
}

.related-link:hover {
  border-color: var(--accent-gold);
  background: rgba(201, 168, 76, 0.1);
}

/* Gallery */
.gallery-block {
  margin-bottom: 40px;
  position: relative;
}

.gallery-block::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
  opacity: 0.3;
}

.gallery-title {
  font-family: var(--font-heading);
  font-size: 24px;
  color: var(--text-heading);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}

.gallery-item {
  aspect-ratio: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  overflow: hidden;
}

.gallery-item:hover {
  border-color: var(--accent-gold);
  transform: scale(1.05);
}

.gallery-item svg {
  width: 60px;
  height: 60px;
  opacity: 0.6;
}

/* ===== 404 Page ===== */
.page-404 {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 30%, #1a1a2e 0%, transparent 60%),
    linear-gradient(180deg, #0a0a0a 0%, #0d0d0d 100%);
  padding: 20px;
}

.page-404-content {
  text-align: center;
  max-width: 600px;
  animation: fadeInUp 1s ease forwards;
}

.page-404-icon {
  margin-bottom: 30px;
}

.page-404-icon svg {
  width: 120px;
  height: 120px;
}

.page-404-title {
  font-family: var(--font-heading);
  font-size: 120px;
  font-weight: 900;
  color: var(--accent-gold);
  line-height: 1;
  text-shadow: 0 0 60px rgba(201, 168, 76, 0.3);
  margin-bottom: 10px;
}

.page-404-subtitle {
  font-family: var(--font-heading);
  font-size: 24px;
  color: var(--text-heading);
  text-transform: uppercase;
  letter-spacing: 4px;
  margin-bottom: 20px;
}

.page-404-text {
  font-size: 18px;
  color: var(--text-primary);
  opacity: 0.8;
  margin-bottom: 40px;
  font-style: italic;
}

.page-404-divider {
  width: 60px;
  height: 2px;
  background: var(--accent-gold);
  margin: 0 auto 40px;
}

/* ===== Modal ===== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: backdropFadeIn 0.3s ease;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  animation: modalZoomIn 0.3s ease;
}

.modal-content img,
.modal-content svg {
  max-width: 100%;
  max-height: 85vh;
  border: 2px solid var(--accent-gold);
  border-radius: var(--card-radius);
}

.modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: var(--text-heading);
  font-size: 32px;
  cursor: pointer;
  transition: color var(--transition-fast);
  line-height: 1;
}

.modal-close:hover {
  color: var(--accent-gold);
}

/* ===== Mobile Nav Overlay ===== */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 10, 0.98);
  z-index: 999;
  align-items: center;
  justify-content: center;
}

.mobile-nav-overlay.active {
  display: flex;
}

.mobile-nav-list {
  text-align: center;
}

.mobile-nav-item {
  margin-bottom: 24px;
}

.mobile-nav-link {
  font-family: var(--font-heading);
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--text-heading);
  padding: 12px 24px;
  display: block;
}

.mobile-nav-link:hover {
  color: var(--accent-gold);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 42px;
  }

  .characters-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

/* Tablet: 768px–1023px — 2 columns */
@media (min-width: 768px) and (max-width: 1023px) {
  .characters-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .hero-title {
    font-size: 38px;
  }

  .hero-subtitle {
    font-size: 18px;
  }

  .section-title {
    font-size: 32px;
  }

  .article-hero-name {
    font-size: 38px;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .burger-btn {
    display: flex;
  }

  .hero-title {
    font-size: 32px;
    letter-spacing: 2px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .section-title {
    font-size: 28px;
  }

  .characters-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .article-hero-name {
    font-size: 32px;
  }

  .article-hero-image {
    width: 200px;
    height: 200px;
  }

  .page-404-title {
    font-size: 80px;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 26px;
  }

  .hero-subtitle {
    font-size: 14px;
  }

  .logo {
    font-size: 18px;
  }

  .page-404-title {
    font-size: 60px;
  }
}
