/* ==========================================================================
   ARCANE CYBER KINGDOM - DESIGN SYSTEM
   ========================================================================== */
:root {
  /* Background Colors */
  --void-black: #050816;
  --arcane-blue: #111827;
  --layer-bg: #1a1035;

  /* Glass Panels */
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-blur: blur(26px);

  /* Primary Accent - Arcane Violet */
  --violet-start: #7c3aed;
  --violet-end: #a855f7;
  --violet-grad: linear-gradient(135deg, var(--violet-start), var(--violet-end));
  --violet-glow: rgba(124, 58, 237, 0.45);

  /* Secondary Accent - Mystic Cyan */
  --cyan-start: #06b6d4;
  --cyan-end: #67e8f9;
  --cyan-grad: linear-gradient(135deg, var(--cyan-start), var(--cyan-end));
  --cyan-glow: rgba(6, 182, 212, 0.40);

  /* Highlight Accent - Ember Gold */
  --gold-start: #f59e0b;
  --gold-end: #f97316;
  --gold-grad: linear-gradient(135deg, var(--gold-start), var(--gold-end));
  --gold-glow: rgba(245, 158, 11, 0.35);

  /* Premium Blend */
  --premium-grad: linear-gradient(135deg, #7c3aed, #06b6d4, #f59e0b);

  /* Typography Colors */
  --text-primary: #f8fafc;
  --text-secondary: #dbe4ff;
  --text-muted: #7c8ba1;

  /* Geometry & Spacing */
  --radius-sm: 12px;
  --radius-md: 24px;
  --radius-lg: 30px;
  --radius-xl: 34px;
  
  --max-width: 1380px;
  --space-desktop: 140px;
  --space-tablet: 90px;
  --space-mobile: 60px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--void-black);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Futuristic/Cinematic Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Cinzel', serif; /* Magic/Fantasy feel */
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

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

/* Typography Classes */
.text-gradient-violet {
  background: var(--violet-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.text-gradient-cyan {
  background: var(--cyan-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.text-gradient-premium {
  background: var(--premium-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.muted-text {
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

/* ==========================================================================
   GLOBAL UI SYSTEM (GLASS & CARDS)
   ========================================================================== */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  position: relative;
  overflow: hidden;
}

.glass-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at top right, rgba(255,255,255,0.03), transparent 50%);
  pointer-events: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: none;
  z-index: 1;
}

.btn::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: all 0.6s ease;
  z-index: -1;
}

.btn:hover::after {
  left: 200%;
}

.btn-primary {
  background: var(--violet-grad);
  color: white;
  box-shadow: 0 0 20px var(--violet-glow);
  border: 1px solid rgba(255,255,255,0.2);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 0 35px var(--violet-glow), 0 0 15px rgba(255,255,255,0.2);
}

.btn-secondary {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--cyan-start);
  color: var(--text-primary);
  box-shadow: 0 0 15px var(--cyan-glow);
}

.btn-secondary:hover {
  background: rgba(6, 182, 212, 0.1);
  transform: translateY(-3px);
  box-shadow: 0 0 25px var(--cyan-glow);
}

/* ==========================================================================
   HEADER / FLOATING COMMAND HUB
   ========================================================================== */
.arcane-hub-wrapper {
  position: fixed;
  top: 30px;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.arcane-header {
  pointer-events: auto;
  width: 90%;
  max-width: 1100px;
  background: rgba(17, 24, 39, 0.4);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--cyan-glow);
  border-radius: var(--radius-lg);
  padding: 12px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px var(--cyan-glow);
  animation: float-hub 6s ease-in-out infinite;
  position: relative;
}

/* Magical border pulse */
.arcane-header::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px; right: -1px; bottom: -1px;
  border-radius: var(--radius-lg);
  background: var(--cyan-grad);
  z-index: -1;
  opacity: 0.3;
  animation: pulse-border 3s infinite alternate;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--premium-grad);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px var(--violet-glow);
  position: relative;
}

.logo-icon::after {
  content: '';
  position: absolute;
  width: 100%; height: 100%;
  border-radius: 50%;
  border: 2px solid white;
  border-top-color: transparent;
  animation: spin-magic 4s linear infinite;
}

.logo-text {
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.header-center ul {
  display: flex;
  gap: 30px;
}

.header-center a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 5px 0;
}

.header-center a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  width: 0; height: 2px;
  background: var(--cyan-grad);
  transition: all 0.3s ease;
  transform: translateX(-50%);
  box-shadow: 0 0 10px var(--cyan-glow);
}

.header-center a:hover {
  color: white;
  text-shadow: 0 0 8px var(--cyan-glow);
}

.header-center a:hover::after {
  width: 100%;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* ==========================================================================
   HERO / MAGICAL DIMENSION PORTAL
   ========================================================================== */
.hero-portal {
  position: relative;
  height: 100vh;
  min-height: 800px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 80px; /* Offset for header */
}

/* Background layers */
.hero-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: -3;
  background: url('images/cosmic-fantasy-sky-bg.jpg') center/cover no-repeat;
  opacity: 0.4;
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: -2;
  background: radial-gradient(circle at center, transparent 0%, var(--void-black) 80%);
}

.magic-circle {
  position: absolute;
  width: 800px; height: 800px;
  border-radius: 50%;
  border: 2px dashed rgba(124, 58, 237, 0.3);
  z-index: -1;
  animation: spin-portal 60s linear infinite;
  box-shadow: inset 0 0 100px var(--violet-glow), 0 0 100px var(--cyan-glow);
}
.magic-circle-inner {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  border: 1px solid rgba(6, 182, 212, 0.4);
  z-index: -1;
  animation: spin-portal-reverse 40s linear infinite;
}

.hero-content {
  text-align: center;
  max-width: 800px;
  z-index: 10;
  padding: 50px;
  background: rgba(5, 8, 22, 0.5);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5), 0 0 20px rgba(124, 58, 237, 0.2);
}

.hero-headline {
  font-size: 3.5rem;
  margin-bottom: 20px;
  text-transform: uppercase;
  text-shadow: 0 0 30px rgba(124,58,237,0.6);
  animation: float-y 4s ease-in-out infinite;
}

.hero-subtext {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 35px;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 30px;
}

.legal-disclaimer {
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  max-width: 600px;
  margin: 0 auto;
}

.legal-disclaimer span {
  display: inline-block;
  margin-top: 5px;
  color: var(--gold-start);
  font-weight: bold;
}

/* ==========================================================================
   MAIN GAME EXPERIENCE
   ========================================================================== */
.game-section {
  padding: var(--space-desktop) 0;
  position: relative;
  background: linear-gradient(to bottom, var(--void-black), var(--layer-bg));
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.section-header h2 {
  font-size: 3rem;
  margin-bottom: 15px;
}

.game-showcase {
  max-width: 1260px;
  margin: 0 auto;
  position: relative;
}

/* Game Glass Container */
.game-glass-wrapper {
  background: rgba(26, 16, 53, 0.6);
  backdrop-filter: blur(40px);
  border: 1px solid var(--violet-glow);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: 0 20px 80px rgba(0,0,0,0.8), 0 0 40px var(--violet-glow);
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-glass-wrapper:hover {
  transform: scale(1.01);
  box-shadow: 0 20px 80px rgba(0,0,0,0.9), 0 0 60px rgba(124,58,237,0.6);
}

.game-ui-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 20px;
}

.game-title-bar {
  display: flex;
  align-items: center;
  gap: 15px;
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  color: var(--cyan-start);
}
.game-title-bar img {
  width: 24px; height: 24px;
}

.game-controls {
  display: flex;
  gap: 15px;
}
.control-btn {
  background: var(--glass-bg);
  border: 1px solid rgba(255,255,255,0.1);
  color: white;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
}
.control-btn:hover {
  background: rgba(255,255,255,0.1);
}

/* The actual Iframe */
.iframe-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  position: relative;
}

.iframe-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Floating Game Elements */
.game-widgets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 30px;
}
.widget-card {
  background: var(--glass-bg);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
}
.widget-card h4 {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.widget-card .value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold-start);
  text-shadow: 0 0 10px var(--gold-glow);
}

/* ==========================================================================
   PREMIUM CONTENT / FEATURES (SaaS BENTO GRID)
   ========================================================================== */
.features-section {
  padding: var(--space-desktop) 0;
  background: var(--void-black);
  position: relative;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 30px;
  grid-auto-rows: minmax(300px, auto);
}

.bento-item {
  border-radius: var(--radius-lg);
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s ease;
}

.bento-item:hover {
  transform: translateY(-10px);
}

.bento-item img.bg-image {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform 0.6s ease;
}
.bento-item:hover img.bg-image {
  transform: scale(1.05);
}

.bento-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(to top, rgba(5,8,22,1) 0%, rgba(5,8,22,0.2) 100%);
  z-index: -1;
}

.bento-content {
  z-index: 1;
}
.bento-content h3 {
  font-size: 2rem;
  margin-bottom: 15px;
}
.bento-content p {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* Specific Grid Spans */
.item-why-play { grid-column: span 8; }
.item-mage-features { grid-column: span 4; }
.item-arcane-world { grid-column: span 5; }
.item-community { grid-column: span 7; }

/* ==========================================================================
   LEGAL PAGES STRUCTURE
   ========================================================================== */
.legal-page-header {
  padding: 180px 0 80px;
  text-align: center;
  background: radial-gradient(circle at top, var(--layer-bg) 0%, var(--void-black) 100%);
  border-bottom: 1px solid var(--glass-border);
}

.legal-page-header h1 {
  font-size: 4rem;
  margin-bottom: 20px;
}

.legal-content-section {
  padding: var(--space-desktop) 0;
  background: var(--void-black);
}

.legal-container {
  max-width: 900px;
  margin: 0 auto;
}

.legal-text-box {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 60px;
  color: var(--text-secondary);
}

.legal-text-box h2 {
  font-family: 'Inter', sans-serif;
  font-size: 1.8rem;
  color: white;
  margin-top: 40px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.legal-text-box h2:first-child {
  margin-top: 0;
}

.legal-text-box p {
  margin-bottom: 20px;
  line-height: 1.8;
}
.legal-text-box ul {
  list-style: disc;
  margin-left: 20px;
  margin-bottom: 20px;
}
.legal-text-box li {
  margin-bottom: 10px;
}

/* Contact/About specific grids */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 40px;
}
.info-card {
  background: rgba(255,255,255,0.03);
  padding: 30px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
}
.info-card h3 {
  color: var(--cyan-start);
  margin-bottom: 15px;
}

/* ==========================================================================
   FOOTER SYSTEM
   ========================================================================== */
.arcane-footer {
  background: var(--layer-bg);
  border-top: 1px solid var(--violet-glow);
  padding: 80px 0 40px;
  position: relative;
  overflow: hidden;
}

.arcane-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 2px;
  background: var(--premium-grad);
  opacity: 0.5;
}

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

.footer-brand p {
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-links h4 {
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  margin-bottom: 25px;
  color: white;
}

.footer-links ul li {
  margin-bottom: 12px;
}
.footer-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
}
.footer-links a:hover {
  color: var(--cyan-start);
  padding-left: 5px;
}

.footer-contact p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.eighteen-plus {
  width: 40px; height: 40px;
  border: 2px solid var(--text-muted);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-disclaimer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  width: 100%;
  margin-top: 20px;
}

/* ==========================================================================
   MOBILE EXPERIENCE & RESPONSIVE
   ========================================================================== */
.mobile-nav-bar {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 400px;
  background: rgba(17, 24, 39, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid var(--cyan-glow);
  border-radius: 30px;
  padding: 15px 25px;
  z-index: 2000;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.mobile-nav-item {
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
}
.mobile-nav-item.active {
  color: var(--cyan-start);
}

@media (max-width: 1024px) {
  .hero-headline { font-size: 3rem; }
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
  .item-why-play, .item-mage-features, .item-arcane-world, .item-community {
    grid-column: span 2;
  }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .arcane-hub-wrapper { display: none; } /* Hide desktop nav */
  .mobile-nav-bar { display: flex; } /* Show mobile nav */
  
  .hero-content { padding: 35px 25px; }
  .hero-headline { font-size: 2.2rem; }
  .hero-subtext { font-size: 0.95rem; }
  .hero-actions { flex-direction: column; }
  
  .game-widgets { grid-template-columns: 1fr; }
  
  .bento-grid { grid-template-columns: 1fr; }
  .item-why-play, .item-mage-features, .item-arcane-world, .item-community {
    grid-column: span 1;
  }
  
  .footer-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  
  .legal-page-header h1 { font-size: 2.5rem; }
  .legal-text-box { padding: 30px; }
  
  /* Padding adjustments */
  .game-section, .features-section, .legal-content-section {
    padding: var(--space-mobile) 0;
  }
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes float-hub {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}
@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}
@keyframes pulse-border {
  0% { opacity: 0.3; }
  100% { opacity: 0.8; }
}
@keyframes spin-portal {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes spin-portal-reverse {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}
@keyframes spin-magic {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}