:root {
  /* Core Theme Colors */
  --bg-primary: #0b0f1a;
  --bg-secondary: #12182b;
  --surface: rgba(255, 255, 255, 0.05);
  
  /* Magical Accents */
  --primary: #7c3aed;
  --secondary: #a78bfa;
  --highlight: #facc15;
  --energy: #22d3ee;
  
  /* Text */
  --text-primary: #f8fafc;
  --text-secondary: #c7d2fe;
  --text-muted: #94a3b8;

  /* Layout */
  --max-width: 1320px;
  --border-radius: 20px;
  --btn-radius: 16px;
  
  /* Fonts */
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: radial-gradient(circle at 50% 0%, var(--bg-secondary) 0%, var(--bg-primary) 70%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

a {
  color: var(--secondary);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--highlight);
}

ul {
  list-style: none;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

.section {
  padding: 120px 0;
  position: relative;
}

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

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 28px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--btn-radius);
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--energy));
  color: var(--text-primary);
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, var(--energy), var(--primary));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5), 0 0 10px rgba(250, 204, 21, 0.4);
  color: var(--text-primary);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--secondary);
  backdrop-filter: blur(5px);
}

.btn-outline:hover {
  background: rgba(167, 139, 250, 0.1);
  border-color: var(--highlight);
  color: var(--highlight);
  transform: translateY(-2px);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(11, 15, 26, 0.7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(124, 58, 237, 0.2);
  transition: all 0.3s ease;
}

.header.scrolled {
  background: rgba(11, 15, 26, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid rgba(124, 58, 237, 0.4);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--highlight));
  -webkit-mask: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4 19.5v-15A2.5 2.5 0 016.5 2H20v2H6.5a.5.5 0 000 1H20v14H6.5a2.5 2.5 0 01-2.5-2.5z"/></svg>') no-repeat center;
  mask: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4 19.5v-15A2.5 2.5 0 016.5 2H20v2H6.5a.5.5 0 000 1H20v14H6.5a2.5 2.5 0 01-2.5-2.5z"/></svg>') no-repeat center;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  position: relative;
  padding: 8px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--highlight));
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
}

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

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  z-index: 1001;
}

.mobile-toggle span {
  width: 30px;
  height: 2px;
  background: var(--text-primary);
  transition: 0.3s;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  background: url('images/arcane-library-background.webp') center/cover no-repeat;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, var(--bg-primary) 30%, rgba(11, 15, 26, 0.7) 100%);
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content h1 {
  font-size: 4rem;
  line-height: 1.1;
  background: linear-gradient(135deg, #fff, var(--secondary), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 24px;
}

.hero-content p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 500px;
}

.hero-actions {
  display: flex;
  gap: 20px;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-visual img {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 0 30px rgba(124, 58, 237, 0.4));
}

/* Game Section */
.game-section {
  background: var(--bg-secondary);
  position: relative;
}

.game-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.game-wrapper {
  background: var(--surface);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: var(--border-radius);
  padding: 16px;
  box-shadow: 0 0 40px rgba(124, 58, 237, 0.15), inset 0 0 20px rgba(250, 204, 21, 0.05);
  margin: 0 auto;
  max-width: 1200px;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-wrapper:hover {
  transform: scale(1.01);
  box-shadow: 0 0 50px rgba(124, 58, 237, 0.25), inset 0 0 30px rgba(250, 204, 21, 0.1);
}

.game-iframe-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

.game-iframe-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 60px;
}

.feature-card {
  background: var(--surface);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius);
  padding: 40px 30px;
  text-align: center;
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(124, 58, 237, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.feature-icon {
  width: 64px;
  height: 64px;
  background: rgba(124, 58, 237, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 32px;
  color: var(--highlight);
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.2);
}

.feature-card h3 {
  color: var(--text-primary);
  margin-bottom: 16px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Inner Pages Content */
.page-header {
  padding: 180px 0 80px;
  text-align: center;
  background: linear-gradient(to bottom, rgba(124, 58, 237, 0.1), transparent);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.page-header h1 {
  font-size: 3.5rem;
  color: var(--text-primary);
  text-shadow: 0 0 20px rgba(124, 58, 237, 0.5);
}

.content-box {
  background: var(--surface);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius);
  padding: 60px;
  margin: -40px auto 80px;
  max-width: 900px;
  position: relative;
  z-index: 10;
}

.content-box h2 {
  color: var(--secondary);
  margin-top: 40px;
}

.content-box h2:first-child {
  margin-top: 0;
}

.content-box p {
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.content-box ul {
  list-style: disc;
  margin-left: 20px;
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.content-box li {
  margin-bottom: 10px;
}

/* Form Styles */
.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(124, 58, 237, 0.3);
  background: rgba(0, 0, 0, 0.4);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* Footer */
.footer {
  margin-top: auto;
  background: var(--bg-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 80px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-brand p {
  color: var(--text-muted);
  margin-top: 20px;
  max-width: 400px;
}

.footer-links h4 {
  color: var(--text-primary);
  margin-bottom: 24px;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--secondary);
  padding-left: 5px;
}

.footer-bottom {
  text-align: center;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.legal-disclaimer {
  max-width: 800px;
  margin: 0 auto 20px;
  font-size: 0.8rem;
  color: #64748b;
}