:root {
  --color-bg-dark: #090a0f;
  --color-bg-surface: rgba(20, 22, 30, 0.6);
  --color-text-primary: #f0f2f5;
  --color-text-muted: #a0a5b5;
  --color-accent: #ffb84d;
  --color-accent-glow: rgba(255, 184, 77, 0.4);
  --font-primary: 'Inter', sans-serif;
  --font-display: 'Outfit', sans-serif;
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-bg: rgba(15, 17, 26, 0.45);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  background-color: var(--color-bg-dark);
  color: var(--color-text-primary);
  overflow-x: hidden;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

/* Typography base */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(3rem, 6vw, 5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); margin-bottom: 2rem; text-align: center; }
p { margin-bottom: 1rem; color: var(--color-text-muted); font-size: 1.1rem; }

/* Utilities */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.text-accent {
  color: var(--color-accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 2.2rem;

  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--color-accent);
  color: #111;
  box-shadow: 0 0 20px var(--color-accent-glow);
}

.btn-primary:hover {
  background: #ffcc80;
  box-shadow: 0 0 30px var(--color-accent-glow), 0 0 10px var(--color-accent);
  transform: translateY(-2px);
}

.btn-outline {
  background: rgba(20, 22, 30, 0.4);
  border-color: var(--color-accent);
  color: var(--color-accent);
  backdrop-filter: blur(4px);
}

.btn-outline:hover {
  background: rgba(255, 184, 77, 0.1);
  transform: translateY(-2px);
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 0;
  z-index: 100;
  transition: background 0.3s ease, padding 0.3s ease;
  background: linear-gradient(to bottom, rgba(9, 10, 15, 0.9), transparent);
}

header.scrolled {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  padding: 1rem 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  position: relative;
}

.nav-links li:not(.nav-cta) a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width 0.3s ease;
}

.nav-links li:not(.nav-cta) a:hover {
  color: var(--color-accent);
}

.nav-links li:not(.nav-cta) a:hover::after {
  width: 100%;
}

.nav-cta .btn {
  padding: 0.6rem 1.5rem;
  font-size: 0.85rem;
}

/* Hero Section */
.hero {
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.05); /* Slight scale to hide edges during entry animation if added */
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(9, 10, 15, 0.4) 0%, rgba(9, 10, 15, 0.85) 75%, var(--color-bg-dark) 100%);
  z-index: -1;
}

.hero-content {
  max-width: 800px;
  animation: fadeIn 1.5s ease-out forwards;
  z-index: 10;
}

.hero-logo {
  max-width: 90%;
  margin-bottom: 2rem;
  filter: drop-shadow(0 0 30px rgba(0,0,0,0.9));
}

.hero-tagline {
  font-size: 1.5rem;
  color: #ddd;
  margin-bottom: 2.5rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  font-weight: 300;
}

.hero-cta {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  animation: bounce 2s infinite;
  opacity: 0.7;
}

.scroll-indicator svg {
  width: 24px;
  height: 24px;
}

/* General Section */
section {
  padding: 7rem 0;
  position: relative;
}

/* Glass Card */
.glass-card {
  background: var(--color-bg-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);

  padding: 4rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

/* Lore Section */
.lore-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 5rem;
  align-items: center;
}

.lore-content p {
  margin-bottom: 1.8rem;
  font-size: 1.15rem;
}

.lore-image {
  position: relative;

  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.8);
  transform: perspective(1000px) rotateY(-8deg);
  transition: transform 0.6s ease;
}

.lore-image:hover {
  transform: perspective(1000px) rotateY(0deg) scale(1.03);
}

.lore-image img {
  width: 100%;
  height: auto;
  display: block;
}

.lore-image::after {
  content: '';
  position: absolute;
  inset: 0;

  box-shadow: inset 0 0 60px rgba(0,0,0,0.6);
  pointer-events: none;
}

/* Characters Section */
.characters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2.5rem;
  margin-top: 4rem;
}

.character-card {
  background: linear-gradient(145deg, rgba(25, 27, 36, 0.8), rgba(15, 17, 26, 0.9));
  border: 1px solid var(--glass-border);

  padding: 2.5rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.character-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.character-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.7), 0 0 20px var(--color-accent-glow);
  border-color: rgba(255, 184, 77, 0.3);
}

.character-card:hover::before {
  transform: scaleX(1);
}

.character-name {
  font-size: 1.8rem;
  color: #fff;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-display);
}

.character-icon {
  color: var(--color-accent);
  font-size: 1.5rem;
}

.character-desc {
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* Dragon Showcase */
.dragon-showcase {
  margin-top: 6rem;
  text-align: center;
  position: relative;
  padding-bottom: 4rem;
}

.dragon-img {
  max-width: 900px;
  width: 100%;
  filter: drop-shadow(0 30px 40px rgba(0,0,0,0.9));
  position: relative;
  z-index: 2;
  animation: float 6s ease-in-out infinite;
}

.dragon-glow {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  padding-bottom: 60%;
  background: radial-gradient(circle, rgba(200, 30, 30, 0.25) 0%, transparent 65%);
  z-index: 1;
  pointer-events: none;
}

/* Footer */
footer {
  background: rgba(8, 9, 13, 0.98);
  border-top: 1px solid var(--glass-border);
  padding: 5rem 0 3rem;
  text-align: center;
  position: relative;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-logo {
  height: 50px;
  opacity: 0.8;
  filter: grayscale(1);
  transition: all 0.3s ease;
}

.footer-logo:hover {
  opacity: 1;
  filter: grayscale(0);
}

.social-links {
  display: flex;
  gap: 1.5rem;
}

.social-icon {
  width: 55px;
  height: 55px;

  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-primary);
  transition: all 0.3s ease;
}

.social-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.social-icon:hover {
  background: var(--color-accent);
  color: #000;
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 20px var(--color-accent-glow);
  border-color: var(--color-accent);
}

.copyright {
  color: #555;
  font-size: 0.95rem;
}

.copyright a {
  color: var(--color-text-muted);
}

.copyright a:hover {
  color: var(--color-accent);
}

/* Responsive */
@media (max-width: 900px) {
  .lore-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .nav-links {
    display: none;
  }
  
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  
  .glass-card {
    padding: 2.5rem;
  }
}

@media (max-width: 600px) {
  .hero-cta {
    flex-direction: column;
    gap: 1rem;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
  40% { transform: translateY(-12px) translateX(-50%); }
  60% { transform: translateY(-6px) translateX(-50%); }
}

@keyframes float {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(1deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

.character-icon-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.portrait-img {
  width: 80px;
  height: 80px;

  box-shadow: 0 5px 15px rgba(0,0,0,0.5);
  margin-bottom: 1rem;
  border: 1px solid var(--glass-border);
  object-fit: cover;
}

.reveal {
  opacity: 0;
  transform: translateY(40px) scale(0.97);
  filter: blur(12px);
  transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1s cubic-bezier(0.2, 0.8, 0.2, 1), filter 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0px);
}

/* Fullscreen Image Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(5, 6, 8, 0.95);
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(10px);
  cursor: zoom-out;
}

.modal-content {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  border: 1px solid var(--glass-border);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
  animation: modalZoom 0.3s ease-out forwards;
}

.modal-close {
  position: absolute;
  top: 30px;
  right: 40px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: var(--color-accent);
}

@keyframes modalZoom {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}



/* 3D Tilt & Spotlight Glow */
.glass-card {
  position: relative;
  /* Transform style is added dynamically by JS to prevent flat-clipping */
  will-change: transform;
}

/* Base pointer glow element */
.glass-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255, 255, 255, 0.06),
    transparent 40%
  );
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.5s ease;
  opacity: 0;
}

.glass-card:hover::before {
  opacity: 1;
}
