@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Pixelify+Sans:wght@400;500;600;700&display=swap');

body, input, select, textarea, button {
  font-family: 'Pixelify Sans', sans-serif;
}


:root {
  --primary: hsl(115, 65%, 45%);
  --primary-glow: hsl(115, 85%, 55%);
  --primary-dark: hsl(115, 75%, 15%);
  --secondary: hsl(25, 45%, 28%);
  --secondary-light: hsl(25, 35%, 42%);
  --crystal: hsl(150, 95%, 50%);
  --crystal-glow: hsla(150, 95%, 50%, 0.55);
  --bg-dark: hsl(140, 50%, 3%);
  --bg-card: hsla(140, 30%, 8%, 0.82);
  --text-light: hsl(0, 0%, 96%);
  --text-muted: hsl(140, 10%, 65%);
  --accent-gold: hsl(45, 95%, 50%);
  --accent-purple: hsl(280, 90%, 60%);
  --border: hsla(140, 30%, 20%, 0.4);
  --border-glow: hsla(115, 65%, 45%, 0.35);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  
  /* Holographic Variables */
  --x: 50%;
  --y: 50%;
  --rx: 0deg;
  --ry: 0deg;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  overflow-x: hidden;
}

body {
  font-family: 'Pixelify Sans', sans-serif;
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(at 0% 0%, hsla(115, 75%, 15%, 0.25) 0px, transparent 50%),
    radial-gradient(at 100% 0%, hsla(280, 90%, 20%, 0.2) 0px, transparent 50%),
    radial-gradient(at 50% 100%, hsla(25, 45%, 15%, 0.25) 0px, transparent 50%);
  color: var(--text-light);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Background Particle Canvas */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 12px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--secondary) 0%, var(--primary-dark) 100%);
  border: 2px solid var(--bg-dark);
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Typography */
h1, h2, h3, h4 {
  font-family: 'Press Start 2P', monospace;
  font-weight: 700;
  letter-spacing: 0.5px;
  word-break: break-word;
  overflow-wrap: break-word;
}

.pixel-text {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.75rem;
  color: var(--accent-gold);
}

/* Sticky Header with Mana Bar */
header {
  padding: 1rem 5%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-bottom: 2px solid var(--secondary);
  background: hsla(140, 50%, 2%, 0.92);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
  transition: var(--transition);
}

.logo-icon:hover {
  transform: rotate(360deg);
}

.logo-text {
  font-size: 1.6rem;
  background: linear-gradient(135deg, var(--text-light) 30%, var(--primary-glow) 70%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 15px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid transparent;
  transition: var(--transition);
}

.nav-links a:hover, .nav-links a.active {
  color: var(--text-light);
  background: hsla(115, 65%, 45%, 0.18);
  border-color: var(--border-glow);
  text-shadow: 0 0 5px var(--primary-glow);
}

/* Shaman Dashboard Bar */
.shaman-dashboard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 16px;
  gap: 20px;
}

.mana-container {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  max-width: 500px;
}

.mana-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.7rem;
  color: var(--primary-glow);
  white-space: nowrap;
}

.mana-bar-bg {
  width: 100%;
  height: 18px;
  background: #111;
  border: 2px solid var(--secondary);
  border-radius: 9px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.8);
}

.mana-bar-fill {
  height: 100%;
  width: 100%; /* Interactive */
  background: linear-gradient(90deg, hsl(115, 75%, 35%) 0%, var(--primary-glow) 70%, hsl(140, 95%, 65%) 100%);
  box-shadow: 0 0 10px var(--primary-glow);
  transition: width 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}

.mana-bar-fill::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(
    rgba(255,255,255,0.3) 0%,
    rgba(255,255,255,0) 50%,
    rgba(0,0,0,0.4) 100%
  );
}

.mana-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Press Start 2P', monospace;
  font-size: 0.65rem;
  color: #fff;
  text-shadow: 1px 1px 2px #000;
  z-index: 2;
}

.feed-mud-btn {
  font-family: 'Pixelify Sans', sans-serif;
  font-weight: 600;
  background: linear-gradient(135deg, var(--secondary) 0%, #150a05 100%);
  color: var(--accent-gold);
  border: 1px solid var(--secondary-light);
  border-radius: 8px;
  padding: 4px 12px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.feed-mud-btn:hover {
  transform: scale(1.05);
  border-color: var(--accent-gold);
  box-shadow: 0 0 8px rgba(229, 179, 36, 0.4);
}

/* Main Layout */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 24px;
  display: flex;
  flex-direction: column;
  gap: 5.5rem;
}

/* Beautiful Tribal Cards */
.card-glass {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 2px solid var(--border);
  border-radius: 28px;
  padding: 2.8rem;
  box-shadow: 
    0 15px 35px rgba(0, 0, 0, 0.5),
    inset 0 0 20px rgba(115, 185, 85, 0.05);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card-glass::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--secondary) 0%, var(--primary) 50%, var(--accent-purple) 100%);
}

.card-glass:hover {
  border-color: var(--border-glow);
  box-shadow: 
    0 20px 45px rgba(0, 0, 0, 0.6),
    0 0 25px rgba(115, 230, 85, 0.12);
}

/* Hero Section */
.hero-container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 4rem;
  align-items: center;
}

.hero-left {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.badge {
  background: linear-gradient(90deg, #112c16 0%, #0d1e11 100%);
  border: 2px solid var(--primary-glow);
  color: var(--primary-glow);
  padding: 8px 18px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 10px;
  box-shadow: 0 0 15px rgba(92, 172, 72, 0.25);
  letter-spacing: 1px;
}

.badge-dot {
  width: 10px;
  height: 10px;
  background-color: var(--primary-glow);
  border-radius: 50%;
  animation: pulse-glow 1s infinite alternate;
}

.hero-title {
  font-size: 4.2rem;
  line-height: 1.08;
  background: linear-gradient(135deg, var(--text-light) 20%, var(--primary-glow) 60%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 10px rgba(0,0,0,0.3));
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  font-weight: 400;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 0.5rem;
}

/* Buttons Revamp */
.btn {
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 0.95rem;
  padding: 10px 22px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 700;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  white-space: nowrap;
}

.btn::after {
  content: '';
  position: absolute;
  top: 0; left: -50%; width: 200%; height: 100%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.15), transparent);
  transform: skewX(-25deg);
  transition: 0.75s;
}

.btn:hover::after {
  left: 125%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--text-light);
  border: 2px solid var(--primary-glow);
  box-shadow: 0 5px 20px rgba(115, 230, 85, 0.35);
}

.btn-primary:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 25px rgba(115, 230, 85, 0.55);
}

.btn-primary:active {
  transform: translateY(-1px);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--bg-card) 0%, #17241b 100%);
  color: var(--text-light);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  transform: translateY(-4px);
  background: hsla(140, 30%, 15%, 0.8);
  border-color: var(--primary-glow);
  box-shadow: 0 8px 20px rgba(115, 230, 85, 0.15);
}

/* Hero Mascot Frame */
.hero-right {
  display: flex;
  justify-content: center;
  position: relative;
}

.hero-image-wrapper {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image {
  width: 92%;
  height: 92%;
  object-fit: contain;
  animation: float 6s ease-in-out infinite;
  filter: drop-shadow(0 15px 30px rgba(0,0,0,0.6));
  cursor: pointer;
  transition: transform 0.2s;
}

.hero-image:active {
  transform: scale(0.95);
}

.crystal-glow-back {
  display: none;
}

/* Floating Elements style */
.floating-item {
  position: absolute;
  pointer-events: none;
  font-size: 2rem;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
}

.f-rock {
  top: 15%;
  right: 8%;
  animation: float 4s ease-in-out infinite alternate;
}

.f-coin {
  bottom: 20%;
  left: 5%;
  animation: float 5s ease-in-out infinite 0.7s alternate;
}

/* Stats Container Revamp */
.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 1.5rem;
}

.stat-item {
  background: linear-gradient(135deg, rgba(0,0,0,0.5) 0%, rgba(10,20,12,0.3) 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.6rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.4);
  transition: var(--transition);
}

.stat-item:hover {
  border-color: var(--primary-glow);
  transform: translateY(-2px);
  box-shadow: 
    inset 0 2px 10px rgba(0,0,0,0.4),
    0 5px 15px rgba(92, 172, 72, 0.1);
}

.stat-value {
  font-family: 'Press Start 2P', monospace;
  font-size: 1.15rem;
  color: var(--accent-gold);
  text-shadow: 0 0 8px rgba(229, 179, 36, 0.3);
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

/* Section Header Styling */
.section-title {
  font-size: 2.8rem;
  margin-bottom: 0.8rem;
  text-align: center;
  background: linear-gradient(135deg, var(--text-light) 30%, var(--primary-glow) 80%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

.section-desc {
  text-align: center;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 3.5rem auto;
  font-size: 1.1rem;
}

/* Glowing Runes Soundboard */
.soundboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 24px;
}

.sound-btn {
  background: linear-gradient(135deg, #1c241e 0%, #0d120f 100%);
  border: 2px solid var(--secondary);
  border-radius: 24px;
  padding: 2.2rem 1.6rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  transition: var(--transition);
  text-align: center;
  position: relative;
  box-shadow: 
    0 8px 16px rgba(0,0,0,0.5),
    inset 0 2px 5px rgba(255,255,255,0.05);
}

.sound-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 22px;
  background: radial-gradient(circle, rgba(115, 230, 85, 0.15) 0%, transparent 70%);
  opacity: 0;
  transition: var(--transition);
}

.sound-btn:hover {
  transform: translateY(-8px);
  border-color: var(--primary-glow);
  box-shadow: 
    0 15px 30px rgba(0, 0, 0, 0.6),
    0 0 25px rgba(115, 230, 85, 0.35);
}

.sound-btn:hover::before {
  opacity: 1;
}

.sound-btn:active {
  transform: scale(0.96) translateY(-2px);
}

.sound-icon {
  font-size: 3rem;
  transition: var(--transition);
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.sound-btn:hover .sound-icon {
  transform: scale(1.22) rotate(6deg);
}

.sound-name {
  font-family: 'Pixelify Sans', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-light);
  text-shadow: 1px 1px 2px #000;
}

.sound-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Crystal Oracle Section */
.crystal-oracle-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.oracle-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.crystal-ball-wrapper {
  width: 270px;
  height: 270px;
  position: relative;
  cursor: pointer;
}

.crystal-base {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 45px;
  background: linear-gradient(90deg, #1f130b 0%, var(--secondary) 50%, #1f130b 100%);
  border: 3px solid #110905;
  border-radius: 12px;
  box-shadow: 
    0 10px 15px rgba(0,0,0,0.7),
    inset 0 2px 4px rgba(255,255,255,0.1);
  z-index: 1;
}

.crystal-sphere {
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 35% 30%, hsl(140, 95%, 65%) 0%, hsl(150, 95%, 35%) 45%, hsl(160, 100%, 10%) 90%);
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.2);
  box-shadow: 
    inset 0 0 40px rgba(255, 255, 255, 0.5),
    0 0 50px var(--crystal-glow);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  animation: float 5s ease-in-out infinite alternate;
}

.crystal-sphere::after {
  content: '';
  position: absolute;
  top: 15px;
  left: 15px;
  width: 90px;
  height: 45px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 50% 50% 40% 40%;
  transform: rotate(-35deg);
}

.crystal-sphere.shaking {
  animation: shake 0.12s infinite;
}

.crystal-sphere.glowing {
  background: radial-gradient(circle at 35% 30%, hsl(280, 95%, 75%) 0%, var(--accent-purple) 45%, hsl(285, 100%, 15%) 90%);
  box-shadow: 
    inset 0 0 50px rgba(255, 255, 255, 0.7),
    0 0 70px var(--accent-purple);
}

.oracle-hint {
  margin-top: 2.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-glow);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.oracle-right {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.oracle-input-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.oracle-input-group label {
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
}

.oracle-input {
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid var(--border);
  border-radius: 18px;
  padding: 18px 24px;
  color: var(--text-light);
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 1.15rem;
  outline: none;
  transition: var(--transition);
}

.oracle-input:focus {
  border-color: var(--primary-glow);
  box-shadow: 0 0 15px rgba(115, 230, 85, 0.35);
}

.oracle-bubble {
  background: linear-gradient(135deg, rgba(0,0,0,0.5) 0%, rgba(10,20,12,0.3) 100%);
  border: 2px solid var(--border);
  border-radius: 24px;
  padding: 30px;
  position: relative;
  min-height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 600;
  border-left-width: 10px;
  border-left-color: var(--primary-glow);
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.5);
  transition: var(--transition);
}

.oracle-bubble.glow-purple {
  border-left-color: var(--accent-purple);
  box-shadow: 
    inset 0 2px 10px rgba(0,0,0,0.5),
    0 0 20px rgba(168, 85, 247, 0.2);
}

/* Meme Lab - Stone Frame */
.meme-builder {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: flex-start;
}

.meme-preview-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  min-width: 0;
}

.canvas-container {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1;
  background: #000;
  border-radius: 28px;
  overflow: hidden;
  border: 8px solid var(--secondary);
  box-shadow: 
    0 15px 40px rgba(0,0,0,0.7),
    0 0 25px rgba(92, 172, 72, 0.15);
  position: relative;
}

.canvas-container canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

.canvas-container canvas:active {
  cursor: grabbing;
}

.meme-controls {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.control-group label {
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-light);
}

.control-group input[type="text"] {
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 14px 20px;
  color: var(--text-light);
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 1.05rem;
  outline: none;
  transition: var(--transition);
  width: 100%;
  min-width: 0;
}

.control-group input[type="text"]:focus {
  border-color: var(--primary-glow);
  box-shadow: 0 0 10px rgba(115, 230, 85, 0.25);
}

/* Template Selector Revamp */
.template-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.template-option {
  border: 3px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  background: #000;
}

.template-option.active {
  border-color: var(--primary-glow);
  box-shadow: 0 0 15px var(--primary-glow);
  transform: scale(1.05);
}

.template-option img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.template-option:hover img {
  transform: scale(1.1);
}

.template-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 40%, rgba(0,0,0,0));
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
  padding: 10px 4px 6px 4px;
}

.font-controls {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
  gap: 15px;
}

.font-control-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.font-control-item select, .font-control-item input[type="color"] {
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  color: var(--text-light);
  font-family: 'Pixelify Sans', sans-serif;
  outline: none;
  cursor: pointer;
  font-weight: 600;
  width: 100%;
}

.font-control-item input[type="color"] {
  height: 50px;
  padding: 4px;
}

/* Legendary Goblin Holographic Card Generator */
.name-generator-container {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 4rem;
  align-items: center;
}

.quiz-side {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.quiz-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-field label {
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
}

.quiz-field input, .quiz-field select {
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 16px 20px;
  color: var(--text-light);
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 1.1rem;
  outline: none;
  transition: var(--transition);
}

.quiz-field input:focus, .quiz-field select:focus {
  border-color: var(--primary-glow);
}

.result-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  perspective: 1000px; /* Enable 3D Card Hover Tilt */
}

/* Legendary Holographic Trading Card */
.goblin-card {
  width: 100%;
  max-width: 380px;
  background: linear-gradient(135deg, #18281a 0%, #150905 50%, #0d0f1a 100%);
  border: 6px solid var(--accent-gold);
  border-radius: 28px;
  padding: 2rem;
  box-shadow: 
    0 30px 60px rgba(0,0,0,0.8),
    0 0 40px rgba(229, 179, 36, 0.15);
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.1s ease;
  user-select: none;
}

/* holographic shine overlay */
.goblin-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 20%,
    rgba(255, 255, 255, 0.15) 30%,
    rgba(115, 230, 85, 0.2) 40%,
    rgba(168, 85, 247, 0.2) 50%,
    rgba(255, 255, 255, 0.15) 60%,
    transparent 80%
  );
  background-size: 200% 200%;
  background-position: var(--x) var(--y);
  mix-blend-mode: color-dodge;
  pointer-events: none;
  z-index: 10;
  opacity: 0.85;
  transition: opacity 0.5s;
}

.goblin-card::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 2px dashed rgba(229, 179, 36, 0.35);
  border-radius: 20px;
  pointer-events: none;
  z-index: 2;
}

.goblin-card-header {
  text-align: center;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(229, 179, 36, 0.25);
  transform: translateZ(30px); /* 3D layer pop */
}

.goblin-card-header h3 {
  font-size: 2rem;
  color: var(--accent-gold);
  text-shadow: 0 0 10px rgba(229, 179, 36, 0.4);
}

.goblin-card-header span {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.65rem;
  letter-spacing: 1px;
  color: var(--primary-glow);
}

.goblin-card-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 4px solid var(--accent-gold);
  margin: 12px auto;
  overflow: hidden;
  background: #000;
  box-shadow: 
    0 0 25px rgba(229, 179, 36, 0.3),
    inset 0 0 15px rgba(0,0,0,0.8);
  transform: translateZ(40px);
}

.goblin-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.goblin-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 8px;
  transform: translateZ(25px);
}

.goblin-substat {
  background: rgba(0, 0, 0, 0.6);
  padding: 12px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid rgba(229, 179, 36, 0.15);
}

.goblin-substat-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
}

.goblin-substat-val {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.8rem;
  color: var(--accent-gold);
  margin-top: 6px;
}

.goblin-card-desc {
  font-size: 0.95rem;
  color: var(--text-light);
  text-align: center;
  font-style: italic;
  transform: translateZ(20px);
  background: rgba(0,0,0,0.3);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.05);
}

/* Footer styling */
footer {
  text-align: center;
  padding: 4rem 0;
  margin-top: 6rem;
  border-top: 2px solid var(--secondary);
  background: hsla(140, 50%, 2%, 0.95);
}

.footer-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.2rem;
}

.footer-desc {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 550px;
  margin: 0 auto 2rem auto;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 2rem;
}

.social-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.social-btn:hover {
  background: var(--primary);
  border-color: var(--primary-glow);
  color: #fff;
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(115, 230, 85, 0.4);
}

.copyright {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Interactive Mascot Overlay - Sticky Screen Corner */
.mascot-container {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  gap: 15px;
  pointer-events: none;
}

.mascot-bubble {
  background: linear-gradient(135deg, #1f140d 0%, #150904 100%);
  border: 3px solid var(--secondary-light);
  border-radius: 20px;
  padding: 16px 20px;
  max-width: 250px;
  color: var(--text-light);
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0,0,0,0.6);
  position: relative;
  opacity: 0;
  transform: translateY(20px) scale(0.8);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: auto;
}

.mascot-bubble.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Bubble Arrow tail pointing to mascot */
.mascot-bubble::after {
  content: '';
  position: absolute;
  bottom: 20px;
  right: -15px;
  border-width: 10px 0 10px 15px;
  border-style: solid;
  border-color: transparent var(--secondary-light);
  display: block;
  width: 0;
}

.mascot-bubble::before {
  content: '';
  position: absolute;
  bottom: 22px;
  right: -11px;
  border-width: 8px 0 8px 12px;
  border-style: solid;
  border-color: transparent #150904;
  display: block;
  width: 0;
  z-index: 2;
}

.mascot-avatar-wrapper {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 3px solid var(--primary-glow);
  background: #000;
  overflow: hidden;
  box-shadow: 
    0 10px 25px rgba(0,0,0,0.6),
    0 0 15px rgba(115, 230, 85, 0.3);
  pointer-events: auto;
  cursor: pointer;
  transition: var(--transition);
}

.mascot-avatar-wrapper:hover {
  transform: scale(1.1) rotate(5deg);
}

.mascot-avatar-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Toast styling */
.toast {
  position: fixed;
  bottom: 30px;
  left: 30px; /* Shift to left to not clash with mascot */
  background: rgba(115, 230, 85, 0.9);
  color: #fff;
  padding: 16px 24px;
  border-radius: 14px;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 1001;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Animations */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-16px); }
  100% { transform: translateY(0px); }
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 10px rgba(115, 230, 85, 0.4); opacity: 0.8; }
  100% { box-shadow: 0 0 25px rgba(115, 230, 85, 0.95); opacity: 1; }
}

@keyframes shake {
  0% { transform: translate(1px, 1px) rotate(0deg); }
  10% { transform: translate(-1px, -2px) rotate(-1deg); }
  20% { transform: translate(-3px, 0px) rotate(1deg); }
  30% { transform: translate(0px, 2px) rotate(0deg); }
  40% { transform: translate(1px, -1px) rotate(1deg); }
  50% { transform: translate(-1px, 2px) rotate(-1deg); }
  60% { transform: translate(-3px, 1px) rotate(0deg); }
  70% { transform: translate(2px, 1px) rotate(-1deg); }
  80% { transform: translate(-1px, -1px) rotate(1deg); }
  90% { transform: translate(2px, 2px) rotate(0deg); }
  100% { transform: translate(1px, -2px) rotate(-1deg); }
}



/* CA and Buy Buttons Styles */
.ca-container {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.5);
  border: 2px dashed var(--primary-glow);
  padding: 10px 20px;
  border-radius: 12px;
  max-width: fit-content;
  margin-top: 10px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6);
}

.ca-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.8rem;
  color: var(--accent-gold);
}

.ca-address {
  font-weight: 600;
  color: var(--text-light);
  letter-spacing: 0.5px;
}

.ca-copy-btn {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border: 1px solid var(--primary-glow);
  color: #fff;
  border-radius: 8px;
  padding: 6px 14px;
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.ca-copy-btn:hover {
  transform: scale(1.05);
  border-color: var(--accent-gold);
  box-shadow: 0 0 10px rgba(115, 230, 85, 0.4);
}

.ca-copy-btn:active {
  transform: scale(0.95);
}

.nav-buy-btn {
  background: linear-gradient(135deg, var(--accent-gold) 0%, #b8860b 100%);
  color: #000 !important;
  border: 1px solid var(--accent-gold);
  border-radius: 20px;
  font-weight: 700;
  padding: 8px 18px;
  text-decoration: none;
  box-shadow: 0 0 10px rgba(229, 179, 36, 0.3);
  transition: var(--transition);
  margin-left: 10px;
  display: inline-block;
}

.nav-buy-btn:hover {
  background: var(--accent-gold) !important;
  color: #000 !important;
  box-shadow: 0 0 18px var(--accent-gold) !important;
  transform: translateY(-2px);
}

.btn-buy-hero {
  background: linear-gradient(135deg, var(--accent-gold) 0%, #8b6508 100%) !important;
  color: #000 !important;
  border: 2px solid var(--accent-gold) !important;
  box-shadow: 0 5px 20px rgba(229, 179, 36, 0.35) !important;
  font-weight: 700;
}

.btn-buy-hero:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 25px rgba(229, 179, 36, 0.55) !important;
}

/* Goblin Origin Story Styles */
.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 1rem;
}

.story-panel {
  background: linear-gradient(135deg, rgba(8, 15, 10, 0.8) 0%, rgba(3, 6, 8, 0.9) 100%);
  border: 4px solid var(--secondary);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 
    0 10px 25px rgba(0, 0, 0, 0.6),
    inset 0 0 15px rgba(115, 185, 85, 0.03);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.story-panel:hover {
  transform: translateY(-8px);
  border-color: var(--primary-glow);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.8),
    0 0 25px rgba(115, 230, 85, 0.25);
}

.story-image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-bottom: 4px solid var(--secondary);
  background: #000;
}

.story-panel:hover .story-image-container {
  border-bottom-color: var(--primary-glow);
}

.story-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.story-panel:hover .story-img {
  transform: scale(1.06);
}

.story-badge {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  border: 2px solid var(--border);
  color: var(--text-light);
  padding: 6px 12px;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.65rem;
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  transition: var(--transition);
}

.story-badge.glow-green {
  border-color: var(--primary-glow);
  color: var(--primary-glow);
  text-shadow: 0 0 5px var(--primary-glow);
  box-shadow: 
    0 4px 10px rgba(0, 0, 0, 0.5),
    0 0 10px rgba(115, 230, 85, 0.3);
}

.story-badge.glow-gold {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  text-shadow: 0 0 5px var(--accent-gold);
  box-shadow: 
    0 4px 10px rgba(0, 0, 0, 0.5),
    0 0 10px rgba(229, 179, 36, 0.3);
}

.story-panel:hover .story-badge {
  transform: translateX(-50%) scale(1.05);
}

.story-caption {
  padding: 1.5rem 1.2rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  text-align: center;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.story-panel:hover .story-caption {
  color: var(--text-light);
}




/* Responsiveness */
@media (max-width: 900px) {
  .hero-container, .crystal-oracle-container, .meme-builder, .name-generator-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-right {
    order: -1;
  }
  
  .oracle-left {
    margin-bottom: 1rem;
  }
  
  main {
    padding: 2rem 16px;
    gap: 3rem;
  }
}

/* Mobile Devices Optimization (max-width: 768px) */
@media (max-width: 768px) {
  main {
    padding: 1.5rem 12px;
    gap: 2.5rem;
  }

  header {
    padding: 0.8rem 12px;
    gap: 10px;
  }

  .header-top {
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }
  
  .logo {
    justify-content: center;
  }
  
  .logo-text {
    font-size: 1.2rem;
  }
  
  .logo-icon {
    width: 36px;
    height: 36px;
  }
  
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    width: 100%;
  }
  
  .nav-links a {
    font-size: 0.7rem;
    padding: 5px 10px;
  }
  
  .nav-buy-btn {
    margin-left: 0;
    font-size: 0.7rem !important;
    padding: 5px 12px !important;
  }
  
  .shaman-dashboard {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 10px;
  }
  
  .mana-container {
    width: 100%;
    max-width: 100%;
    flex-direction: column;
    gap: 6px;
  }
  
  .mana-label {
    font-size: 0.55rem;
    white-space: normal;
    text-align: center;
  }
  
  .mana-value {
    font-size: 0.5rem;
  }
  
  .feed-mud-btn {
    width: 100%;
    justify-content: center;
    padding: 10px;
    font-size: 0.85rem;
  }
  
  .hero-left {
    text-align: center;
    align-items: center;
  }
  
  .hero-title {
    font-size: 1.6rem;
    line-height: 1.3;
  }
  
  .hero-subtitle {
    font-size: 0.95rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 10px;
  }
  
  .hero-buttons .btn {
    width: 100%;
    max-width: 100%;
    font-size: 0.85rem;
    padding: 10px 16px;
  }
  
  .ca-container {
    margin: 10px auto 0 auto;
    width: 100%;
    max-width: 100%;
    justify-content: center;
    padding: 8px 12px;
    gap: 8px;
    flex-wrap: wrap;
  }
  
  .ca-label {
    font-size: 0.6rem;
  }
  
  .ca-address {
    font-size: 0.8rem;
  }
  
  .ca-copy-btn {
    font-size: 0.8rem;
    padding: 5px 10px;
  }
  
  .stats-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    width: 100%;
  }
  
  .stat-item {
    padding: 0.8rem 0.4rem;
  }
  
  .stat-value {
    font-size: 0.75rem;
  }
  
  .stat-label {
    font-size: 0.65rem;
  }
  
  .hero-image-wrapper {
    max-width: 220px;
    margin: 0 auto;
  }
  
  .floating-item {
    font-size: 1.3rem;
  }
  
  .section-title {
    font-size: 1.2rem;
    line-height: 1.5;
  }
  
  .section-desc {
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
  }
  
  .card-glass {
    padding: 1.2rem;
    border-radius: 18px;
  }
  
  .mascot-container {
    display: none;
  }
  
  .meme-builder {
    gap: 1.5rem;
  }
  
  .meme-preview-side span {
    font-size: 0.75rem;
    word-break: break-word;
  }
  
  .control-group label {
    font-size: 1rem;
  }
  
  .font-controls {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .font-controls > .font-control-item:first-child {
    grid-column: span 2;
  }
  
  .goblin-card {
    padding: 1.2rem;
    max-width: 100%;
    border-width: 4px;
    border-radius: 18px;
  }
  
  .goblin-card-header h3 {
    font-size: 0.7rem;
  }
  
  .goblin-card-header span {
    font-size: 0.7rem;
  }
  
  .goblin-substat-label {
    font-size: 0.55rem;
  }
  
  .goblin-substat-val {
    font-size: 0.6rem;
  }
  
  .goblin-card-desc {
    font-size: 0.8rem;
    padding: 10px;
  }
  
  .sound-desc {
    font-size: 0.7rem;
  }
  
  .sound-btn {
    padding: 1.2rem 0.8rem;
    border-radius: 16px;
  }
  
  .sound-name {
    font-size: 1rem;
  }
  
  .sound-icon {
    font-size: 2rem;
  }
  
  .soundboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
  }
  
  .crystal-ball-wrapper {
    width: 180px;
    height: 180px;
  }
  
  .oracle-input {
    padding: 14px 16px;
    font-size: 1rem;
    border-radius: 14px;
  }
  
  .oracle-bubble {
    padding: 20px;
    font-size: 1rem;
    min-height: 100px;
    border-radius: 16px;
  }
  
  .canvas-container {
    border-width: 5px;
    border-radius: 18px;
  }
  
  .control-group input[type="text"] {
    padding: 10px 14px;
    font-size: 0.9rem;
    border-radius: 12px;
  }
  
  .template-selector {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 6px;
  }
  
  .template-option {
    border-radius: 12px;
  }
  
  .quiz-field input,
  .quiz-field select {
    font-size: 0.9rem;
  }
  
  .story-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .story-badge {
    font-size: 0.55rem;
    padding: 5px 10px;
  }
  
  .story-caption {
    padding: 1rem;
    font-size: 0.85rem;
  }
  
  footer {
    padding: 2rem 12px;
  }
  
  .footer-desc {
    font-size: 0.85rem;
  }
  
  .social-btn {
    width: 42px;
    height: 42px;
  }
  
  .copyright {
    font-size: 0.7rem;
  }
}

/* Super Small Screen (max-width: 380px) */
@media (max-width: 380px) {
  main {
    padding: 1rem 8px;
    gap: 2rem;
  }
  
  .card-glass {
    padding: 1rem;
    border-radius: 14px;
  }
  
  .hero-title {
    font-size: 1.3rem;
  }
  
  .section-title {
    font-size: 1rem;
  }
  
  .stats-container {
    grid-template-columns: 1fr 1fr;
  }
  
  .stat-value {
    font-size: 0.65rem;
  }
  
  .template-selector {
    grid-template-columns: 1fr 1fr;
  }
  
  .goblin-card-stats {
    grid-template-columns: 1fr;
  }
  
  .goblin-card {
    padding: 1rem;
    border-width: 3px;
  }
  
  .nav-links a {
    font-size: 0.6rem;
    padding: 4px 8px;
  }
}
