/* =========================================
   ATOMIC LAB - HOMEPAGE STYLES
   Complete homepage styling - NO VARIANTS
   ========================================= */

/* =================
   HERO LABORATORY SECTION
   ================= */

/* Hero Container with Dynamic Background - Full Width */
.hero-lab {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* Full-width background gradients */
  background: 
    radial-gradient(circle at 20% 80%, rgba(0, 212, 255, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(189, 0, 255, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(0, 255, 136, 0.08) 0%, transparent 60%),
    linear-gradient(180deg, #0A0A0F 0%, #0F1419 50%, #0A0A0F 100%);
}

/* Hero section - full width background override */
body .hero-lab {
  padding-top: 100px !important;
  width: 100vw !important;
  max-width: none !important;
  position: relative !important;
  left: 50% !important;
  right: 50% !important;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
  transform: none !important;
}

/* Animated Background Grid */
.hero-lab::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(0, 212, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: grid-move 20s linear infinite;
  opacity: 0.5;
  pointer-events: none;
}

@keyframes grid-move {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

/* Containment Field with Glow */
.containment-field {
  position: relative;
  z-index: 10;
  padding: 2rem;
  animation: containment-pulse 8s ease-in-out infinite;
  /* Centering overrides */
  max-width: 1600px;
  margin: 0 auto !important;
  width: 100%;
  left: 0 !important;
  right: 0 !important;
}

/* Keep content inside hero-lab centered */
.hero-lab .containment-field {
  max-width: 1600px !important;
  margin: 0 auto !important;
  padding: 0 2rem !important;
  animation: none !important;
  transform: scale(1) !important;
}

@keyframes containment-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

/* Fix all major sections centering EXCEPT hero-lab */
.title-hologram,
.hero-controls,
.lab-stats,
.featured-section,
.interface-grid,
.elements-showcase {
  transform: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 1600px !important;
  width: 100% !important;
  position: relative !important;
  left: 0 !important;
  right: 0 !important;
}

/* Prevent horizontal overflow */
body {
  overflow-x: hidden !important;
}

/* =================
   TITLE & TYPOGRAPHY
   ================= */

/* Title Hologram with Advanced Glitch */
.title-hologram {
  text-align: center !important;
  width: 100%;
  margin: 0 auto 3rem auto;
  opacity: 1 !important;
  position: relative;
}

.title-hologram h1,
.title-hologram p {
  text-align: center !important;
  margin-left: auto;
  margin-right: auto;
}

.title-hologram h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 900;
  background: linear-gradient(
    135deg,
    #00D4FF 0%,
    #BD00FF 25%,
    #00FF88 50%,
    #00D4FF 75%,
    #BD00FF 100%
  );
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 3s ease infinite;
  text-shadow: 
    0 0 40px rgba(0, 212, 255, 0.5),
    0 0 80px rgba(189, 0, 255, 0.3);
  letter-spacing: 0.1em;
  /* Fallback for better visibility */
  color: #00D4FF !important;
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Make H1 title visible with proper styling - Override for non-gradient version */
.title-hologram h1.no-gradient,
.glitch-text.no-gradient,
h1.glitch-text.no-gradient {
  /* Force visibility */
  opacity: 1 !important;
  visibility: visible !important;
  
  /* Force text color without gradient */
  background: transparent !important;
  color: #00d4ff !important;
  text-shadow: 0 0 20px #00d4ff !important;
  font-size: 3.5rem !important;
  
  /* Force text fill color */
  -webkit-text-fill-color: #00d4ff !important;
  
  /* Positioning */
  position: relative !important;
  display: block !important;
  width: 100% !important;
  text-align: center !important;
  transform: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Enhanced Glitch Effect */
.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  font-weight: inherit;
  font-size: inherit;
}

.glitch-text::before {
  animation: glitch-1 2s infinite;
  color: #00D4FF;
  z-index: -1;
  text-shadow: -2px 0 #FF00FF;
  opacity: 0.7;  /* Make glitch effect subtle */
}

.glitch-text::after {
  animation: glitch-2 2s infinite;
  color: #BD00FF;
  z-index: -2;
  text-shadow: 2px 0 #00FF88;
  opacity: 0.7;  /* Make glitch effect subtle */
}

@keyframes glitch-1 {
  0%, 100% { clip-path: inset(0 0 0 0); }
  25% { clip-path: inset(10% 0 50% 0); }
  50% { clip-path: inset(50% 0 20% 0); }
  75% { clip-path: inset(0 0 70% 0); }
}

@keyframes glitch-2 {
  0%, 100% { clip-path: inset(0 0 0 0); }
  25% { clip-path: inset(70% 0 0 0); }
  50% { clip-path: inset(20% 0 30% 0); }
  75% { clip-path: inset(0 0 10% 0); }
}

/* Disable glitch for simpler version */
.glitch-text.no-animation::before,
.glitch-text.no-animation::after {
  display: none !important;
}

/* Subtitle with Scanning Effect */
.subtitle-scan {
  font-size: clamp(1rem, 3vw, 1.5rem);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  position: relative;
  overflow: hidden;
  margin-top: 1rem;
}

.subtitle-scan::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 212, 255, 0.4),
    transparent
  );
  animation: scan-text 3s infinite;
}

@keyframes scan-text {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Force visibility on fade/slide animations */
.fade-in,
.slide-in-up,
.title-hologram .fade-in,
.title-hologram .slide-in-up,
.glitch-text.slide-in-up {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Centered fade animation */
@keyframes fadeInUpCentered {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.title-hologram .slide-in-up.animated {
  animation: fadeInUpCentered 0.6s ease-out forwards !important;
}

/* =================
   REACTOR CORE ANIMATION
   ================= */

.reactor-core {
  width: 300px;
  height: 300px;
  margin: 3rem auto;
  position: relative;
  transform-style: preserve-3d;
  perspective: 1000px;
  animation: none !important;
}

/* Reactor Rings with 3D Rotation */
.reactor-rings {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  animation: reactor-3d-rotate 10s linear infinite;
}

@keyframes reactor-3d-rotate {
  0% { transform: rotateX(0deg) rotateY(0deg); }
  100% { transform: rotateX(360deg) rotateY(360deg); }
}

.ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 3px solid;
  border-radius: 50%;
  opacity: 0.8;
  animation: none !important;
}

.ring-1 {
  width: 100%;
  height: 100%;
  border-color: var(--color-brand-primary);
  animation: ring-pulse 2s ease-in-out infinite !important;
  box-shadow: 
    0 0 30px var(--color-brand-primary),
    inset 0 0 30px rgba(0, 212, 255, 0.2);
}

.ring-2 {
  width: 70%;
  height: 70%;
  border-color: var(--neon-purple);
  animation: ring-pulse 2s ease-in-out infinite reverse !important;
  animation-delay: 0.5s;
  box-shadow: 
    0 0 25px var(--neon-purple),
    inset 0 0 25px rgba(189, 0, 255, 0.2);
  transform: translate(-50%, -50%) rotateY(60deg);
}

.ring-3 {
  width: 40%;
  height: 40%;
  border-color: var(--neon-green);
  animation: ring-pulse 2s ease-in-out infinite !important;
  animation-delay: 1s;
  box-shadow: 
    0 0 20px var(--neon-green),
    inset 0 0 20px rgba(0, 255, 136, 0.2);
  transform: translate(-50%, -50%) rotateX(60deg);
}

@keyframes ring-pulse {
  0%, 100% { 
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.8;
  }
  50% { 
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 1;
  }
}

/* Core Nucleus with Energy Pulse */
.core-nucleus {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: radial-gradient(
    circle,
    rgba(0, 212, 255, 0.9),
    rgba(189, 0, 255, 0.6),
    rgba(0, 255, 136, 0.3)
  );
  border-radius: 50%;
  box-shadow: 
    0 0 50px var(--color-brand-primary),
    0 0 100px rgba(0, 212, 255, 0.5),
    inset 0 0 30px rgba(255, 255, 255, 0.5);
  animation: core-energy 2s ease-in-out infinite;
}

@keyframes core-energy {
  0%, 100% { 
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 
      0 0 50px var(--color-brand-primary),
      0 0 100px rgba(0, 212, 255, 0.5),
      inset 0 0 30px rgba(255, 255, 255, 0.5);
  }
  50% { 
    transform: translate(-50%, -50%) scale(1.2);
    box-shadow: 
      0 0 80px var(--color-brand-primary),
      0 0 150px rgba(0, 212, 255, 0.8),
      inset 0 0 50px rgba(255, 255, 255, 0.8);
  }
}

/* Orbiting Particles */
.core-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--neon-blue);
  border-radius: 50%;
  box-shadow: 0 0 10px currentColor;
  animation: none !important;
}

.core-particle:nth-child(1) {
  animation: orbit-particle 3s linear infinite !important;
}

.core-particle:nth-child(2) {
  animation: orbit-particle 3s linear infinite reverse !important;
  animation-delay: 1s;
}

.core-particle:nth-child(3) {
  animation: orbit-particle 3s linear infinite !important;
  animation-delay: 2s;
}

@keyframes orbit-particle {
  0% { transform: rotate(0deg) translateX(180px) rotate(0deg); }
  100% { transform: rotate(360deg) translateX(180px) rotate(-360deg); }
}

/* =================
   HERO CONTROLS
   ================= */

.hero-controls {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 2rem;
  width: 100% !important;
  margin: 5rem auto 3rem auto !important; /* Increased top margin to prevent overlap */
  transform: none !important;
  position: relative !important;
  left: 0 !important;
  z-index: 15 !important; /* Higher z-index than element info */
  padding-top: 2rem !important; /* Additional padding for safety */
}

/* Holographic Buttons */
.btn-hologram,
.btn-plasma {
  padding: 1.2rem 3rem;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  border: 2px solid;
  background: transparent;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  color: inherit;
}

.btn-hologram {
  border-color: var(--color-brand-primary);
  color: var(--color-brand-primary);
  background: linear-gradient(
    135deg,
    rgba(0, 212, 255, 0.1),
    transparent,
    rgba(0, 212, 255, 0.1)
  );
}

.btn-plasma {
  border-color: var(--neon-purple);
  color: var(--neon-purple);
  background: linear-gradient(
    135deg,
    rgba(189, 0, 255, 0.1),
    transparent,
    rgba(189, 0, 255, 0.1)
  );
}

/* Button Scanning Effect */
.btn-scan {
  position: absolute;
  top: -2px;
  left: -100%;
  width: 100%;
  height: calc(100% + 4px);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.btn-hologram:hover .btn-scan,
.btn-plasma:hover .btn-scan {
  left: 100%;
}

/* Button Hover State with Lift */
.btn-hologram:hover,
.btn-plasma:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 
    0 10px 40px rgba(0, 212, 255, 0.4),
    inset 0 0 30px rgba(0, 212, 255, 0.2);
}

.btn-plasma:hover {
  box-shadow: 
    0 10px 40px rgba(189, 0, 255, 0.4),
    inset 0 0 30px rgba(189, 0, 255, 0.2);
}

/* Button Active State */
.btn-hologram:active,
.btn-plasma:active {
  transform: translateY(-2px) scale(1.02);
}

/* Button Glow Effect */
.btn-hologram::before,
.btn-plasma::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-radius: 50%;
  transition: all 0.5s;
}

.btn-hologram::before {
  background: radial-gradient(
    circle,
    rgba(0, 212, 255, 0.8),
    transparent
  );
}

.btn-plasma::before {
  background: radial-gradient(
    circle,
    rgba(189, 0, 255, 0.8),
    transparent
  );
}

.btn-hologram:hover::before,
.btn-plasma:hover::before {
  width: 300%;
  height: 300%;
  opacity: 0;
}

/* =================
   LAB STATS SECTION
   ================= */

.lab-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  width: 100% !important;
  margin: 4rem auto !important;
  transform: none !important;
  max-width: 1200px !important;
}

/* Holographic Stat Panels - ENHANCED VISIBILITY */
.stat-panel {
  background: linear-gradient(
    135deg,
    rgba(0, 50, 80, 0.9),  /* Much lighter background */
    rgba(0, 60, 90, 0.85),
    rgba(0, 45, 75, 0.8)
  );
  border: 2px solid rgba(0, 212, 255, 0.5);
  border-radius: 8px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  transform: none !important;
  animation: none !important;
  /* backdrop-filter removed for text clarity */
  box-shadow: 
    0 0 30px rgba(0, 212, 255, 0.4),
    inset 0 0 20px rgba(0, 212, 255, 0.1);
}

.stat-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--color-brand-primary),
    transparent
  );
  animation: scan-line 3s infinite;
}

@keyframes scan-line {
  0% { left: -100%; }
  100% { left: 100%; }
}

.stat-panel:hover {
  transform: translateY(-5px);
  border-color: var(--color-brand-primary);
  background: linear-gradient(
    135deg,
    rgba(0, 60, 100, 0.95),  /* Even lighter on hover */
    rgba(0, 70, 110, 0.9),
    rgba(0, 55, 90, 0.85)
  );
  box-shadow: 
    0 10px 40px rgba(0, 212, 255, 0.4),
    inset 0 0 30px rgba(0, 212, 255, 0.15);
}

/* Panel Status Indicator */
.panel-status {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #00ff88;
  text-shadow: 0 0 10px currentColor;
  animation: none !important;
  opacity: 1 !important;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: currentColor;
  border-radius: 50%;
  box-shadow: 0 0 10px currentColor;
  animation: none !important;
}

.status-dot.active {
  background: #00ff88;
  box-shadow: 
    0 0 10px #00ff88,
    0 0 20px rgba(0, 255, 136, 0.5);
}

.status-dot.pulse {
  animation: dot-pulse 2s ease-in-out infinite !important;
}

@keyframes dot-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 10px currentColor;
  }
  50% {
    transform: scale(1.5);
    box-shadow: 0 0 20px currentColor;
  }
}

/* Stat Values with Gradient */
.stat-label {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.stat-value {
  font-size: 3rem;
  font-weight: 900;
  font-family: var(--font-mono);
  /* Solid color instead of gradient for better readability */
  color: #00d4ff !important;
  text-shadow: 
    0 0 20px rgba(0, 212, 255, 0.8),
    0 0 10px rgba(0, 212, 255, 0.6);
  margin: 0.5rem 0;
  animation: none !important;
  transform: scale(1) !important;
  display: block;
  min-height: 3.5rem; /* Prevent collapse when empty */
  line-height: 1.2;
  /* Ensure no filters affect text */
  filter: none !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ensure stat values always show */
.stat-value:empty::before {
  content: '0';
  color: #00d4ff;
}

@keyframes value-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Stat Progress Bar */
.stat-progress {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 1rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--color-brand-primary),
    var(--neon-purple),
    var(--neon-green)
  );
  background-size: 200% 100%;
  animation: gradient-flow 3s linear infinite;
  transition: width 1s ease;
}

@keyframes gradient-flow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* =================
   FEATURED ELEMENTS SECTION
   ================= */

.featured-section {
  margin: 6rem auto;
  text-align: center;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 900;
  background: linear-gradient(
    135deg,
    var(--color-brand-primary),
    var(--neon-purple)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--color-text-secondary);
  font-size: 1.1rem;
  margin-bottom: 3rem;
}

/* Elements Showcase Grid */
.elements-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

/* Enhanced Element Hex Cards */
.element-hex {
  width: 150px;
  height: 150px;
  margin: 0 auto;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  display: block;
  text-decoration: none;
}

.hex-inner {
  width: 100%;
  height: 100%;
  position: relative;
  background: 
    linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(189, 0, 255, 0.05)),
    rgba(0, 20, 40, 0.8);
  border: 2px solid rgba(0, 212, 255, 0.5);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-shadow: 
    0 0 30px rgba(0, 212, 255, 0.3),
    inset 0 0 20px rgba(0, 212, 255, 0.1);
  transition: all 0.3s ease;
}

.element-hex:hover .hex-inner {
  background: 
    linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(189, 0, 255, 0.1)),
    rgba(0, 20, 40, 0.9);
  border-color: #00d4ff;
  box-shadow: 
    0 0 50px rgba(0, 212, 255, 0.5),
    inset 0 0 30px rgba(0, 212, 255, 0.2);
  transform: translateY(-5px) scale(1.05);
}

.element-number {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.8rem;
  color: rgba(0, 212, 255, 0.7);
  font-weight: 600;
}

.element-symbol {
  font-size: 2.5rem;
  font-weight: 900;
  color: #00d4ff;
  text-shadow: 0 0 20px currentColor;
  margin: 0.5rem 0;
  line-height: 1;
}

.element-name {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.electron-orbit {
  position: absolute;
  width: 80%;
  height: 80%;
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 50%;
  top: 10%;
  left: 10%;
  animation: orbitSpin 10s linear infinite;
  pointer-events: none;
}

.electron-orbit::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  background: #00d4ff;
  border-radius: 50%;
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 10px #00d4ff;
}

@keyframes orbitSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Category-specific colors */
.element-nonmetal .hex-inner {
  border-color: rgba(0, 255, 136, 0.5);
}

.element-transition .hex-inner {
  border-color: rgba(255, 193, 7, 0.5);
}

.element-actinide .hex-inner {
  border-color: rgba(255, 0, 128, 0.5);
}

.element-noble .hex-inner {
  border-color: rgba(189, 0, 255, 0.5);
}

/* Remove duplicate styles - already defined above */

/* =================
   INTERFACE PANELS
   ================= */

.interface-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 4rem auto;
}

/* Holographic Interface Panel - Enhanced Sci-Fi Look */
.hologram-panel {
  background: 
    linear-gradient(135deg, rgba(0, 212, 255, 0.12), rgba(189, 0, 255, 0.08)),
    linear-gradient(45deg, transparent 30%, rgba(0, 212, 255, 0.05) 50%, transparent 70%),
    rgba(0, 20, 40, 0.8);
  border: 2px solid rgba(0, 212, 255, 0.6);
  border-radius: 12px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 0 40px rgba(0, 212, 255, 0.4),
    inset 0 0 30px rgba(0, 212, 255, 0.15),
    0 4px 20px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(25px);
  transition: all 0.3s ease;
}

.hologram-panel:hover {
  border-color: rgba(0, 212, 255, 0.8);
  box-shadow: 
    0 0 60px rgba(0, 212, 255, 0.5),
    inset 0 0 40px rgba(0, 212, 255, 0.2),
    0 8px 30px rgba(0, 0, 0, 0.6);
  transform: translateY(-5px) scale(1.02);
  background: 
    linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(189, 0, 255, 0.1)),
    linear-gradient(45deg, transparent 30%, rgba(0, 212, 255, 0.06) 50%, transparent 70%),
    rgba(0, 20, 40, 0.85);
}

.hologram-panel::before,
.hologram-panel::after {
  content: '';
  position: absolute;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(0, 212, 255, 0.1),
    transparent
  );
  animation: scan-vertical 4s linear infinite;
}

.hologram-panel::before {
  width: 100%;
  height: 100px;
  top: -100px;
  left: 0;
}

.hologram-panel::after {
  width: 100px;
  height: 100%;
  top: 0;
  left: -100px;
  transform: rotate(90deg);
  animation-delay: 2s;
}

@keyframes scan-vertical {
  0% { transform: translateY(0); }
  100% { transform: translateY(calc(100% + 100px)); }
}

/* =================
   ATOM SLIDESHOW
   ================= */

.atom-slideshow {
  position: relative;
  width: 100%;
  max-width: 1200px;
  height: 600px;
  margin: 60px auto;
  perspective: 1000px;
  transform: none !important;
  left: 0 !important;
  right: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Homepage Orbital System - Clean 3D Implementation */
.homepage-orbital {
  position: relative !important;
  width: 400px !important;
  height: 400px !important;
  margin: 0 auto !important;
  transform-style: preserve-3d !important;
  perspective: 1500px !important;
}

.homepage-orbital .electron-shell {
  position: absolute !important;
  animation-play-state: running !important;
  opacity: 0.7 !important;
  border-width: 2px !important;
  border-color: #00d4ff !important;
  box-shadow: 
    0 0 20px rgba(0, 212, 255, 0.4),
    inset 0 0 10px rgba(0, 212, 255, 0.2) !important;
  transform-style: preserve-3d !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) rotateX(60deg) !important;
}

/* Shell sizes for homepage - properly scaled */
/* Homepage orbital system - always visible */
.homepage-orbital {
  opacity: 1 !important;
  visibility: visible !important;
  position: relative !important;
  width: 400px !important;
  height: 400px !important;
  display: block !important;
}

/* Homepage electron shells - ensure visibility */
.homepage-orbital .electron-shell {
  border: 2px solid rgba(0, 212, 255, 0.6) !important;
  border-radius: 50% !important;
  animation-play-state: running !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  opacity: 0.7 !important;
}

.homepage-orbital .electron-shell[data-shell="1"] {
  width: 120px !important;
  height: 120px !important;
  border-color: #00d4ff !important;
  animation: homepage-rotate-shell-1 3s linear infinite !important;
}

.homepage-orbital .electron-shell[data-shell="2"] {
  width: 180px !important;
  height: 180px !important;
  border-color: #00b8e6 !important;
  animation: homepage-rotate-shell-2 3.5s linear infinite !important;
  transform: translate(-50%, -50%) rotateX(20deg) !important;
}

.homepage-orbital .electron-shell[data-shell="3"] {
  width: 240px !important;
  height: 240px !important;
  border-color: #0099ff !important;
  animation: homepage-rotate-shell-3 4s linear infinite !important;
  transform: translate(-50%, -50%) rotateY(25deg) !important;
}

.homepage-orbital .electron-shell[data-shell="4"] {
  width: 300px !important;
  height: 300px !important;
  border-color: #0080ff !important;
  animation: homepage-rotate-shell-4 4.5s linear infinite !important;
  transform: translate(-50%, -50%) rotateX(15deg) rotateY(15deg) !important;
}

.homepage-orbital .electron-shell[data-shell="5"] {
  width: 340px !important;
  height: 340px !important;
  border-color: #0066ff !important;
  animation: homepage-rotate-shell-5 5s linear infinite !important;
  transform: translate(-50%, -50%) rotateX(30deg) !important;
}

.homepage-orbital .electron-shell[data-shell="6"] {
  width: 370px !important;
  height: 370px !important;
  border-color: #004dcc !important;
  animation: homepage-rotate-shell-6 5.5s linear infinite !important;
  transform: translate(-50%, -50%) rotateY(35deg) !important;
}

.homepage-orbital .electron-shell[data-shell="7"] {
  width: 390px !important;
  height: 390px !important;
  border-color: #0033aa !important;
  animation: homepage-rotate-shell-7 6s linear infinite !important;
  transform: translate(-50%, -50%) rotateX(10deg) rotateY(10deg) !important;
}

.homepage-orbital .nucleus {
  animation: homepage-nucleus-pulse 2s ease-in-out infinite !important;
  animation-play-state: running !important;
}

#atomSlideshow,
#atomContainer,
.atom-container {
  overflow: visible !important;
  position: relative;
}

#atomSlideshow {
  padding: 80px !important;
  margin: 40px auto 160px auto !important; /* Prevent overlap with sections below */
  width: 800px !important;
  height: 500px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  perspective: 2000px !important;
  transform-style: preserve-3d !important;
  z-index: 1 !important;
}

#atomContainer {
  width: min(400px, 90vw) !important;  /* Responsive width */
  height: min(400px, 90vw) !important; /* Maintain square aspect ratio */
  max-width: 400px !important;
  position: relative !important;
  margin: 0 auto !important;
  transform-style: preserve-3d !important;
  perspective: 2000px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.atom-container {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s;
  padding: 20px;
  box-sizing: border-box;
  perspective: 1500px;
}

/* Homepage nucleus styling with proper content layout */
.homepage-orbital .nucleus {
  width: 50px !important;
  height: 50px !important;
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  background: 
    radial-gradient(circle at 30% 30%, #00ffff, #00d4ff 40%, #0066cc) !important;
  box-shadow: 
    0 0 60px #00d4ff,
    0 0 80px rgba(0, 212, 255, 0.6),
    0 0 100px rgba(0, 212, 255, 0.4),
    inset 0 0 20px #0066cc,
    inset -5px -5px 10px rgba(0, 0, 0, 0.3) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 10 !important;
}

/* Nucleus content styling */
.homepage-orbital .nucleus-content {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  height: 100% !important;
  color: #000 !important;
  font-weight: bold !important;
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.5) !important;
}

.homepage-orbital .nucleus-symbol {
  font-size: 1.3rem !important;
  line-height: 1 !important;
  color: #ffffff !important; /* White text for visibility */
  text-shadow: 
    0 0 10px rgba(0, 0, 0, 0.8),
    0 2px 4px rgba(0, 0, 0, 0.9) !important; /* Dark shadow for contrast */
}

.homepage-orbital .nucleus-info {
  font-size: 0.6rem !important;
  line-height: 1 !important;
  margin-top: 2px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  color: rgba(255, 255, 255, 0.9) !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8) !important;
}

@keyframes nucleusPulse {
  0%, 100% { 
    transform: scale(1);
    box-shadow: 
      0 0 60px #00d4ff,
      0 0 80px rgba(0, 212, 255, 0.6),
      0 0 100px rgba(0, 212, 255, 0.4),
      inset 0 0 20px #0066cc;
  }
  50% { 
    transform: scale(1.1);
    box-shadow: 
      0 0 80px #00d4ff,
      0 0 100px rgba(0, 212, 255, 0.8),
      0 0 120px rgba(0, 212, 255, 0.6),
      inset 0 0 30px #0066cc;
  }
}

.nucleus-content {
  text-align: center;
  color: white;
  font-weight: bold;
  font-size: 0.7rem !important;
}

/* Protons & Neutrons */
.proton,
.neutron {
  position: absolute;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  animation: nucleusVibrate 2s infinite;
}

.proton {
  background: radial-gradient(circle, #00d4ff, #0066cc) !important;
  box-shadow: 0 0 10px #00d4ff !important;
}

.neutron {
  background: radial-gradient(circle, #868e96, #495057);
  box-shadow: 0 0 10px #868e96;
}

@keyframes nucleusVibrate {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(1px, -1px); }
  50% { transform: translate(-1px, 1px); }
  75% { transform: translate(1px, 1px); }
}

/* OLD SHELL STYLES - REPLACED BY ORBITAL SYSTEM */
/* Keeping commented out for reference
.electron-shell {
  position: absolute;
  border: 2px solid rgba(0, 212, 255, 0.5) !important;
  border-radius: 50% !important;
  transform-style: preserve-3d;
  transform-origin: center center !important;
  box-shadow: 
    0 0 20px rgba(0, 212, 255, 0.6),
    inset 0 0 15px rgba(0, 212, 255, 0.3);
  backface-visibility: visible;
}

.electron {
  position: absolute !important;
  width: 12px !important;
  height: 12px !important;
  background: 
    radial-gradient(circle at 35% 35%, #ffffff 0%, #00ffff 20%, #00d4ff 50%, #0066cc 100%) !important;
  border-radius: 50% !important;
  box-shadow: 
    0 0 15px #00ffff,
    0 0 30px #00d4ff, 
    0 0 45px #00d4ff,
    0 0 60px rgba(0, 212, 255, 0.6),
    inset -2px -2px 4px rgba(0, 102, 204, 0.5),
    inset 2px 2px 4px rgba(255, 255, 255, 0.3) !important;
  z-index: 50;
  transform-style: preserve-3d;
  top: -6px !important;
  left: 50% !important;
  transform: translateX(-50%);
  transform-origin: center center;
}
*/

/* Enhanced visible electrons for homepage - keep larger size */
.homepage-orbital .electron {
  width: 10px !important;  /* Larger for homepage visibility */
  height: 10px !important; /* Larger for homepage visibility */
  position: absolute !important;
  background: 
    radial-gradient(circle at 35% 35%, #ffffff 0%, #00ffff 20%, #00d4ff 50%, #0066cc 100%) !important;
  box-shadow: 
    0 0 20px rgba(0, 212, 255, 1),
    0 0 40px rgba(0, 212, 255, 0.8),
    0 0 60px rgba(0, 212, 255, 0.6) !important;
  border-radius: 50% !important;
  z-index: 5 !important;
  animation: electronGlow 2s ease-in-out infinite !important;
}

@keyframes electronGlow {
  0%, 100% { 
    box-shadow: 
      0 0 20px rgba(0, 212, 255, 1),
      0 0 40px rgba(0, 212, 255, 0.8),
      0 0 60px rgba(0, 212, 255, 0.6);
  }
  50% { 
    box-shadow: 
      0 0 30px rgba(0, 212, 255, 1),
      0 0 60px rgba(0, 212, 255, 0.9),
      0 0 80px rgba(0, 212, 255, 0.7);
  }
}

/* OLD Individual electron orbital animations - replaced by orbital system 
.shell-1 .electron:nth-child(1) {
  animation: electronOrbit1 2s linear infinite, electronGlow 2s ease-in-out infinite !important;
}

.shell-1 .electron:nth-child(2) {
  animation: electronOrbit1 2s linear infinite, electronGlow 2s ease-in-out infinite !important;
  animation-delay: 1s, 0.5s !important;
}
*/

/* Individual electron orbital animations for shell 2 (3s orbit) */
.shell-2 .electron:nth-child(1) {
  animation: electronOrbit2 3s linear infinite, electronGlow 2s ease-in-out infinite !important;
}

.shell-2 .electron:nth-child(2) {
  animation: electronOrbit2 3s linear infinite, electronGlow 2s ease-in-out infinite !important;
  animation-delay: 0.375s, 0.25s !important;
}

.shell-2 .electron:nth-child(3) {
  animation: electronOrbit2 3s linear infinite, electronGlow 2s ease-in-out infinite !important;
  animation-delay: 0.75s, 0.5s !important;
}

.shell-2 .electron:nth-child(4) {
  animation: electronOrbit2 3s linear infinite, electronGlow 2s ease-in-out infinite !important;
  animation-delay: 1.125s, 0.75s !important;
}

.shell-2 .electron:nth-child(5) {
  animation: electronOrbit2 3s linear infinite, electronGlow 2s ease-in-out infinite !important;
  animation-delay: 1.5s, 1s !important;
}

.shell-2 .electron:nth-child(6) {
  animation: electronOrbit2 3s linear infinite, electronGlow 2s ease-in-out infinite !important;
  animation-delay: 1.875s, 1.25s !important;
}

.shell-2 .electron:nth-child(7) {
  animation: electronOrbit2 3s linear infinite, electronGlow 2s ease-in-out infinite !important;
  animation-delay: 2.25s, 1.5s !important;
}

.shell-2 .electron:nth-child(8) {
  animation: electronOrbit2 3s linear infinite, electronGlow 2s ease-in-out infinite !important;
  animation-delay: 2.625s, 1.75s !important;
}

/* Individual electron orbital animations for shell 3 (4s orbit) */
.shell-3 .electron:nth-child(1) {
  animation: electronOrbit3 4s linear infinite, electronGlow 2s ease-in-out infinite !important;
}

.shell-3 .electron:nth-child(2) {
  animation: electronOrbit3 4s linear infinite, electronGlow 2s ease-in-out infinite !important;
  animation-delay: 0.5s, 0.33s !important;
}

.shell-3 .electron:nth-child(3) {
  animation: electronOrbit3 4s linear infinite, electronGlow 2s ease-in-out infinite !important;
  animation-delay: 1s, 0.66s !important;
}

.shell-3 .electron:nth-child(4) {
  animation: electronOrbit3 4s linear infinite, electronGlow 2s ease-in-out infinite !important;
  animation-delay: 1.5s, 1s !important;
}

.shell-3 .electron:nth-child(5) {
  animation: electronOrbit3 4s linear infinite, electronGlow 2s ease-in-out infinite !important;
  animation-delay: 2s, 1.33s !important;
}

.shell-3 .electron:nth-child(6) {
  animation: electronOrbit3 4s linear infinite, electronGlow 2s ease-in-out infinite !important;
  animation-delay: 2.5s, 1.66s !important;
}

.shell-3 .electron:nth-child(7) {
  animation: electronOrbit3 4s linear infinite, electronGlow 2s ease-in-out infinite !important;
  animation-delay: 3s, 2s !important;
}

.shell-3 .electron:nth-child(8) {
  animation: electronOrbit3 4s linear infinite, electronGlow 2s ease-in-out infinite !important;
  animation-delay: 3.5s, 0.5s !important;
}

/* Electron orbital keyframes for each shell */
@keyframes electronOrbit1 {
  from {
    transform: rotate(0deg) translateY(-75px) rotate(0deg);
  }
  to {
    transform: rotate(360deg) translateY(-75px) rotate(-360deg);
  }
}

@keyframes electronOrbit2 {
  from {
    transform: rotate(0deg) translateY(-110px) rotate(0deg);
  }
  to {
    transform: rotate(360deg) translateY(-110px) rotate(-360deg);
  }
}

@keyframes electronOrbit3 {
  from {
    transform: rotate(0deg) translateY(-150px) rotate(0deg);
  }
  to {
    transform: rotate(360deg) translateY(-150px) rotate(-360deg);
  }
}

/* Electron glow pulsing effect */
@keyframes electronGlow {
  0%, 100% {
    box-shadow: 
      0 0 15px #00ffff,
      0 0 30px #00d4ff, 
      0 0 45px #00d4ff,
      0 0 60px rgba(0, 212, 255, 0.6),
      inset -2px -2px 4px rgba(0, 102, 204, 0.5),
      inset 2px 2px 4px rgba(255, 255, 255, 0.3);
    opacity: 0.9;
  }
  50% {
    box-shadow: 
      0 0 20px #00ffff,
      0 0 40px #00d4ff, 
      0 0 60px #00d4ff,
      0 0 80px rgba(0, 212, 255, 0.8),
      inset -2px -2px 6px rgba(0, 102, 204, 0.6),
      inset 2px 2px 6px rgba(255, 255, 255, 0.4);
    opacity: 1;
  }
}

/* OLD Shell sizes and animations - replaced by orbital system
.shell-1 {
  width: 150px;
  height: 150px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotateX(70deg) rotateY(0deg);
  animation: orbitRotate1 20s linear infinite;
  opacity: 0.9;
}

.shell-2 {
  width: 220px;
  height: 220px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotateX(45deg) rotateY(25deg);
  animation: orbitRotate2 25s linear infinite reverse;
  opacity: 0.85;
}

.shell-3 {
  width: 300px;
  height: 300px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotateX(30deg) rotateY(-20deg) rotateZ(45deg);
  animation: orbitRotate3 30s linear infinite;
  opacity: 0.8;
}
*/

/* Homepage shell rotation animations */
/* Homepage nucleus pulse animation */
@keyframes homepage-nucleus-pulse {
  0%, 100% { 
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 
      0 0 60px #00d4ff,
      0 0 80px rgba(0, 212, 255, 0.6),
      0 0 100px rgba(0, 212, 255, 0.4),
      inset 0 0 20px #0066cc;
  }
  50% { 
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 
      0 0 80px #00d4ff,
      0 0 100px rgba(0, 212, 255, 0.8),
      0 0 120px rgba(0, 212, 255, 0.6),
      inset 0 0 30px #0066cc;
  }
}

@keyframes homepage-rotate-shell-1 {
  from { transform: translate(-50%, -50%) rotateZ(0deg); }
  to { transform: translate(-50%, -50%) rotateZ(360deg); }
}

@keyframes homepage-rotate-shell-2 {
  from { transform: translate(-50%, -50%) rotateX(20deg) rotateZ(0deg); }
  to { transform: translate(-50%, -50%) rotateX(20deg) rotateZ(360deg); }
}

@keyframes homepage-rotate-shell-3 {
  from { transform: translate(-50%, -50%) rotateY(25deg) rotateZ(0deg); }
  to { transform: translate(-50%, -50%) rotateY(25deg) rotateZ(360deg); }
}

@keyframes homepage-rotate-shell-4 {
  from { transform: translate(-50%, -50%) rotateX(15deg) rotateY(15deg) rotateZ(0deg); }
  to { transform: translate(-50%, -50%) rotateX(15deg) rotateY(15deg) rotateZ(360deg); }
}

@keyframes homepage-rotate-shell-5 {
  from { transform: translate(-50%, -50%) rotateX(30deg) rotateZ(0deg); }
  to { transform: translate(-50%, -50%) rotateX(30deg) rotateZ(360deg); }
}

@keyframes homepage-rotate-shell-6 {
  from { transform: translate(-50%, -50%) rotateY(35deg) rotateZ(0deg); }
  to { transform: translate(-50%, -50%) rotateY(35deg) rotateZ(360deg); }
}

@keyframes homepage-rotate-shell-7 {
  from { transform: translate(-50%, -50%) rotateX(10deg) rotateY(10deg) rotateZ(0deg); }
  to { transform: translate(-50%, -50%) rotateX(10deg) rotateY(10deg) rotateZ(360deg); }
}

@keyframes orbitRotate1 {
  from { 
    transform: translate(-50%, -50%) rotateX(70deg) rotateY(0deg) rotateZ(0deg);
  }
  to { 
    transform: translate(-50%, -50%) rotateX(70deg) rotateY(0deg) rotateZ(360deg);
  }
}

@keyframes orbitRotate2 {
  from { 
    transform: translate(-50%, -50%) rotateX(45deg) rotateY(25deg) rotateZ(0deg);
  }
  to { 
    transform: translate(-50%, -50%) rotateX(45deg) rotateY(25deg) rotateZ(-360deg);
  }
}

@keyframes orbitRotate3 {
  from { 
    transform: translate(-50%, -50%) rotateX(30deg) rotateY(-20deg) rotateZ(45deg) rotateX(0deg);
  }
  to { 
    transform: translate(-50%, -50%) rotateX(30deg) rotateY(-20deg) rotateZ(45deg) rotateX(360deg);
  }
}

@keyframes orbitRotate {
  from { transform: translate(-50%, -50%) rotateX(60deg) rotateZ(0deg); }
  to { transform: translate(-50%, -50%) rotateX(60deg) rotateZ(360deg); }
}

/* Element Info Display */
.element-info {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  margin-top: 40px !important;
  margin-bottom: 30px !important; /* Add bottom margin to prevent overlap */
  width: 100% !important;
  text-align: center !important;
  position: absolute !important;
  bottom: -140px !important; /* Adjusted to give more space */
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 10 !important;
}

.element-symbol-display {
  font-size: 3rem !important;
  font-weight: 900;
  color: var(--neon-blue);
  text-shadow: 0 0 20px currentColor;
  margin: 0 !important;
  line-height: 1.2 !important;
  opacity: 0;
  animation: fadeInUp 0.8s forwards;
}

.element-name-display {
  font-size: 1.5rem !important;
  color: var(--color-text-primary);
  margin: 0 0 1rem 0 !important;
  letter-spacing: 0.1em;
  line-height: 1.2 !important;
  opacity: 0;
  animation: fadeInUp 0.8s 0.2s forwards;
}

.element-link-btn {
  display: inline-block;
  margin: 0 auto !important;
  padding: 0.8rem 2rem !important;
  font-size: 1rem !important;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(0, 212, 255, 0.2));
  border: 2px solid var(--neon-blue);
  color: var(--neon-blue);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.15em;
  border-radius: 4px;
  transition: all 0.3s ease;
  opacity: 0;
  animation: fadeInUp 0.8s 0.4s forwards;
  white-space: nowrap !important;
  position: relative !important;
  transform: none !important;
  z-index: 5 !important;
}

.element-link-btn:hover {
  background: rgba(0, 212, 255, 0.2);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
  transform: translateY(-2px);
}

/* Element Stats */
.element-stats {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  opacity: 1; /* Make visible immediately */
  z-index: 10;
  pointer-events: none;
  background: rgba(0, 50, 80, 0.9); /* Lighter background for better visibility */
  /* backdrop-filter removed to prevent text blur */
  padding: 1.5rem;
  border-radius: 12px;
  border: 2px solid rgba(0, 212, 255, 0.5);  /* Brighter border */
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(0, 212, 255, 0.3),
    inset 0 0 20px rgba(0, 212, 255, 0.1);
}

.element-stats.left {
  left: -280px; /* Positioned to the left of the atom */
  text-align: right;
  animation: slideInFromLeft 0.8s ease-out forwards;
  width: 230px; /* Fixed width for consistency */
}

.element-stats.right {
  right: -280px; /* Positioned to the right of the atom */
  text-align: left;
  animation: slideInFromRight 0.8s ease-out forwards;
  width: 230px; /* Fixed width for consistency */
}

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateY(-50%) translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateY(-50%) translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}

.stat-item {
  display: flex;
  flex-direction: column;
  margin: 1rem 0;
  padding: 0.8rem 1.2rem;
  background: linear-gradient(135deg, rgba(0, 50, 80, 0.9), rgba(0, 60, 90, 0.85));  /* Lighter background */
  border: 2px solid rgba(0, 212, 255, 0.5);  /* Brighter border */
  border-radius: 8px;
  box-shadow: 
    0 0 30px rgba(0, 212, 255, 0.4),
    inset 0 0 20px rgba(0, 212, 255, 0.1);
  /* backdrop-filter removed to prevent text blur */
  min-width: 180px;
  position: relative;
  z-index: 1;
}

.stat-item .stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(0, 212, 255, 0.9);
  margin-bottom: 0.3rem;
  font-weight: 600;
  text-shadow: 0 0 5px rgba(0, 212, 255, 0.3);
  /* Ensure no blur affects this text */
  filter: none !important;
  opacity: 1 !important;
}

.stat-item .stat-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: #00d4ff;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
  /* Ensure text is crystal clear */
  filter: none !important;
  opacity: 1 !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  z-index: 2;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInStats {
  to {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: scale(0.9);
  }
}

/* Transition effects */
.atom-slideshow.transitioning .element-symbol-display,
.atom-slideshow.transitioning .element-name-display,
.atom-slideshow.transitioning .element-stats,
.atom-slideshow.transitioning .element-link-btn {
  animation: fadeOut 0.5s forwards;
}

/* =================
   RESPONSIVE DESIGN
   ================= */

@media (max-width: 768px) {
  .hero-lab {
    min-height: 100vh;
    padding: 1rem;
  }

  .title-hologram h1 {
    font-size: 2.5rem;
  }

  .subtitle-scan {
    font-size: 1rem;
  }

  .reactor-core {
    width: 200px;
    height: 200px;
  }
  
  /* Responsive atom slideshow */
  .atom-slideshow {
    width: 100%;
    max-width: 100%;
    height: 500px;
    padding: 0 20px;
  }
  
  #atomSlideshow {
    width: 100% !important;
    max-width: 100% !important;
    height: 500px !important;
    padding: 40px 20px !important;
  }
  
  #atomContainer {
    width: 280px !important;
    height: 280px !important;
  }
  
  /* Hide side stats on mobile */
  .element-stats.left,
  .element-stats.right {
    display: none !important;
  }
  
  /* Adjust shells for mobile - maintain 3D perspective */
  .shell-1 {
    width: 120px;
    height: 120px;
    transform: translate(-50%, -50%) rotateX(70deg) rotateY(0deg);
  }
  
  .shell-2 {
    width: 180px;
    height: 180px;
    transform: translate(-50%, -50%) rotateX(45deg) rotateY(25deg);
  }
  
  .shell-3 {
    width: 240px;
    height: 240px;
    transform: translate(-50%, -50%) rotateX(30deg) rotateY(-20deg) rotateZ(45deg);
  }

  .hero-controls {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .btn-hologram,
  .btn-plasma {
    width: 100%;
    max-width: 300px;
  }

  .lab-stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .stat-value {
    font-size: 2rem;
  }

  .elements-showcase {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .elements-showcase .element-hex {
    width: 120px;
    height: 120px;
  }

  .interface-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .section-title {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .title-hologram h1 {
    font-size: 2rem;
  }

  .subtitle-scan {
    font-size: 0.875rem;
  }

  .reactor-core {
    width: 150px;
    height: 150px;
  }

  .btn-hologram,
  .btn-plasma {
    padding: 1rem 2rem;
    font-size: 0.9rem;
  }

  .stat-panel {
    padding: 1.5rem;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .elements-showcase {
    grid-template-columns: 1fr;
  }
}

/* =================
   PERFORMANCE OPTIMIZATIONS
   ================= */

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* GPU Acceleration for Animations */
.reactor-rings,
.ring,
.core-particle,
.btn-scan,
.hologram-panel::before,
.hologram-panel::after {
  will-change: transform;
  transform: translateZ(0);
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .hero-lab {
    background: var(--color-bg-primary);
  }

  .btn-hologram,
  .btn-plasma {
    border-width: 3px;
  }

  .stat-panel,
  .hologram-panel {
    border-width: 2px;
  }
}

/* Disable animations for improved performance */
.no-animation,
.no-animation * {
  animation: none !important;
  transition: none !important;
}

/* Logo atom styling */
.atom-logo {
  width: 40px !important;
  height: 40px !important;
  position: relative;
  display: inline-block;
}

.atom-logo .nucleus {
  width: 10px !important;
  height: 10px !important;
  background: #00d4ff !important;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  box-shadow: 0 0 10px #00d4ff !important;
}

.atom-logo .electron-ring {
  width: 100%;
  height: 100%;
  border: 2px solid #00d4ff;
  border-radius: 50%;
  position: absolute;
  opacity: 0.6;
}

/* Disable specific animations on load */
.containment-field,
.stat-value,
.panel-status,
.status-dot:not(.pulse),
.pulse-ring,
.ring:not(.ring-1):not(.ring-2):not(.ring-3),
.nucleus:not(.core-nucleus),
.core-particle:not(:nth-child(1)):not(:nth-child(2)):not(:nth-child(3)),
.reactor-core:not(.reactor-core),
.reactor-rings .ring-1,
.reactor-rings .ring-2,
.reactor-rings .ring-3 {
  animation: none !important;
}

/* =================
   PANEL HEADERS & QUICK LINKS
   ================= */

.panel-header {
  position: relative;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(0, 212, 255, 0.3);
}

.panel-header h3 {
  font-size: 1rem;
  color: #00d4ff;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin: 0;
  text-shadow: 0 0 15px currentColor;
  font-weight: 700;
}

.panel-content {
  position: relative;
  overflow: hidden;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  margin: 0.5rem 0;
  background: linear-gradient(90deg, rgba(0, 212, 255, 0.05), transparent);
  border-left: 2px solid rgba(0, 212, 255, 0.5);
  transition: all 0.3s ease;
}

.status-item:hover {
  background: linear-gradient(90deg, rgba(0, 212, 255, 0.1), transparent);
  border-left-color: #00d4ff;
  padding-left: 1rem;
}

.status-item span:not(.status-dot) {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

.quick-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.quick-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), transparent);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 8px;
  color: var(--color-text-primary);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.quick-link:hover {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(189, 0, 255, 0.1));
  border-color: rgba(0, 212, 255, 0.6);
  transform: translateX(5px);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.quick-link .link-icon {
  font-size: 1.5rem;
  color: #00d4ff;
  text-shadow: 0 0 10px currentColor;
}

.quick-link span:not(.link-icon) {
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* Homepage Orbital System Specific Styles */
.homepage-orbital {
  width: 400px !important;
  height: 400px !important;
  position: relative !important;
  margin: 0 auto !important;
  opacity: 1 !important;
  transform: none !important;
  top: auto !important;
  left: auto !important;
}

/* Enable animations for homepage orbital shells */
.homepage-orbital .electron-shell {
  animation-play-state: running !important;
  opacity: 0.8 !important;
  border-width: 2px !important;
  box-shadow: 
    0 0 20px currentColor,
    inset 0 0 10px currentColor;
}

/* Homepage shell sizes - larger for better visibility */
.homepage-orbital .electron-shell[data-shell="1"] {
  width: 100px !important;
  height: 100px !important;
  animation: homepage-rotate-shell-1 4s linear infinite !important;
}

.homepage-orbital .electron-shell[data-shell="2"] {
  width: 150px !important;
  height: 150px !important;
  animation: homepage-rotate-shell-2 5s linear infinite reverse !important;
}

.homepage-orbital .electron-shell[data-shell="3"] {
  width: 200px !important;
  height: 200px !important;
  animation: homepage-rotate-shell-3 6s linear infinite !important;
}

.homepage-orbital .electron-shell[data-shell="4"] {
  width: 250px !important;
  height: 250px !important;
  animation: homepage-rotate-shell-4 7s linear infinite reverse !important;
}

.homepage-orbital .electron-shell[data-shell="5"] {
  width: 300px !important;
  height: 300px !important;
  animation: homepage-rotate-shell-5 8s linear infinite !important;
}

.homepage-orbital .electron-shell[data-shell="6"] {
  width: 350px !important;
  height: 350px !important;
  animation: homepage-rotate-shell-6 9s linear infinite reverse !important;
}

.homepage-orbital .electron-shell[data-shell="7"] {
  width: 380px !important;
  height: 380px !important;
  animation: homepage-rotate-shell-7 10s linear infinite !important;
}

/* Make electrons rotate with their shells - electrons are children of wrappers */
.homepage-orbital .electron-wrapper {
  /* Wrappers don't need animation - they're positioned by rotation transform */
  /* The parent shell's rotation will carry them */
}

/* Homepage electrons - larger and brighter */
.homepage-orbital .electron {
  width: 12px !important;
  height: 12px !important;
  background: radial-gradient(circle, 
    #00ffff 0%, 
    #00d4ff 40%, 
    transparent 70%) !important;
  box-shadow: 
    0 0 20px #00ffff,
    0 0 30px #00d4ff,
    0 0 40px rgba(0, 212, 255, 0.6) !important;
  opacity: 1 !important;
}

/* Ensure nucleus pulses on homepage */
.homepage-orbital .nucleus {
  animation: homepage-nucleus-pulse 3s ease-in-out infinite !important;
}

/* ===================================
   MINI PERIODIC TABLE SECTION
   =================================== */

.mini-table-section {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  margin: 5rem auto 3rem auto !important;
  transform: none !important;
  position: relative !important;
  left: 0 !important;
  z-index: 15 !important;
  max-width: 1600px !important;
}

.mini-table-header {
  text-align: center;
  margin-bottom: 2rem;
}

.mini-table-title {
  font-size: 1.8rem;
  font-weight: 700;
  font-family: var(--font-primary);
  color: var(--color-brand-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.mini-table-description {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  font-family: var(--font-secondary);
  line-height: 1.6;
  margin-bottom: 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.mini-periodic-table {
  display: grid;
  grid-template-columns: repeat(18, 1fr);
  grid-template-rows: repeat(10, 1fr); /* Added rows for lanthanides and actinides */
  gap: 2px;
  width: 100%;
  max-width: 800px; /* Doubled from 400px */
  height: 280px; /* Doubled from 140px */
  padding: 20px; /* Doubled from 10px */
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), transparent);
  border: 2px solid var(--color-brand-primary);
  border-radius: 12px;
  position: relative;
  transition: none; /* Remove hover transition since elements will be clickable */
  box-shadow: 0 5px 20px rgba(0, 212, 255, 0.2);
}

/* Mini elements - override all main table styles */
.mini-periodic-table .element-hex {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  min-height: 24px !important; /* Doubled from 12px */
  min-width: 24px !important; /* Doubled from 12px */
  border-radius: 4px !important;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  transform: none !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 0.75rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  /* overflow: hidden removed to allow hover effects to show properly */
  text-decoration: none !important;
}

.mini-periodic-table .element-hex:hover {
  transform: scale(1.1) !important;
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.4) !important;
  z-index: 100 !important;
  position: relative !important;
}

.mini-periodic-table .hex-inner {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1px !important;
  height: 100% !important;
  width: 100% !important;
  pointer-events: none;
  margin: 0 !important;
}

.mini-periodic-table .element-number {
  display: none !important; /* Hide atomic numbers in mini table cells */
}

.mini-periodic-table .element-symbol {
  font-size: 0.9rem !important; /* Increased from 0.6rem */
  font-weight: 700 !important;
  line-height: 1 !important;
  margin: 0 !important;
  display: block !important;
}

.mini-periodic-table .element-name {
  display: none; /* Hide element names in mini table */
}

/* Override any stagger animations for mini table */
.mini-periodic-table .stagger-item {
  animation: none !important;
  transform: none !important;
}

/* Full table button */
.full-table-button-section {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  width: 100%;
}

.btn-full-table {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--color-brand-primary), var(--color-brand-secondary));
  border: 2px solid var(--color-brand-primary);
  border-radius: 8px;
  color: #000;
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.btn-full-table:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
  background: linear-gradient(135deg, rgba(0, 212, 255, 1), rgba(0, 255, 255, 1));
}

.btn-full-table:active {
  transform: translateY(-1px) scale(1.02);
}

.btn-full-table .btn-icon {
  font-size: 1.1rem;
}

/* Responsive design for mini table */
@media (max-width: 768px) {
  .mini-table-section {
    margin: 3rem auto 2rem auto !important;
  }
  
  .mini-table-title {
    font-size: 1.4rem;
  }
  
  .mini-table-description {
    font-size: 1rem;
    padding: 0 1rem;
  }
  
  .mini-periodic-table {
    max-width: 95%;
    height: 220px !important; /* Increased proportionally */
    padding: 16px !important;
  }
  
  .mini-periodic-table .element-hex {
    min-height: 18px !important;
    min-width: 18px !important;
  }
  
  .mini-periodic-table .element-number {
    font-size: 0.5rem !important;
  }
  
  .mini-periodic-table .element-symbol {
    font-size: 0.7rem !important;
  }
  
  .mini-table-hint {
    font-size: 0.75rem;
    bottom: -30px;
  }
}

@media (max-width: 480px) {
  .mini-table-title {
    font-size: 1.2rem;
  }
  
  .mini-table-description {
    font-size: 0.9rem;
  }
  
  .mini-periodic-table {
    height: 180px !important; /* Increased for mobile */
    padding: 12px !important;
    max-width: 95%;
  }
  
  .mini-periodic-table .element-hex {
    min-height: 14px !important;
    min-width: 14px !important;
  }
  
  .mini-periodic-table .element-number {
    font-size: 0.4rem !important;
  }
  
  .mini-periodic-table .element-symbol {
    font-size: 0.6rem !important;
  }
}

/* Keyboard accessibility */
.mini-periodic-table:focus {
  outline: 2px solid var(--color-brand-primary);
  outline-offset: 4px;
}

/* =================
   HOMEPAGE ORBITAL ANIMATION FIX
   ================= */

/* Reduce orbital animation size in homepage showcase to match periodic table */
.elements-showcase .element-hex .electron-orbital-system {
  width: 80px !important; /* Match periodic table size */
  height: 80px !important;
  overflow: hidden !important; /* Prevent overflow */
}

/* Nucleus scaling for homepage showcase */
.elements-showcase .element-hex .nucleus {
  width: 8px !important; /* Smaller nucleus like periodic table */
  height: 8px !important;
  font-size: 6px !important;
}

/* Electron shell scaling for homepage showcase - EXACT MATCH with periodic table */
.elements-showcase .element-hex .electron-shell[data-shell="1"] { width: 25px !important; height: 25px !important; }
.elements-showcase .element-hex .electron-shell[data-shell="2"] { width: 35px !important; height: 35px !important; }
.elements-showcase .element-hex .electron-shell[data-shell="3"] { width: 45px !important; height: 45px !important; }
.elements-showcase .element-hex .electron-shell[data-shell="4"] { width: 55px !important; height: 55px !important; }
.elements-showcase .element-hex .electron-shell[data-shell="5"] { width: 65px !important; height: 65px !important; }
.elements-showcase .element-hex .electron-shell[data-shell="6"] { width: 75px !important; height: 75px !important; }
.elements-showcase .element-hex .electron-shell[data-shell="7"] { width: 85px !important; height: 85px !important; } /* Matches periodic table - will be clipped */

/* Electron size scaling */
.elements-showcase .element-hex .electron {
  width: 3px !important; /* Smaller electrons */
  height: 3px !important;
}

/* On hover, maintain the smaller orbital system */
.elements-showcase .element-hex:hover .electron-orbital-system {
  width: 80px !important;
  height: 80px !important;
  overflow: hidden !important;
}

/* Mobile responsiveness for homepage showcase orbitals - EXACT MATCH with periodic table */
@media (max-width: 768px) {
  .elements-showcase .element-hex .electron-orbital-system {
    width: 80px !important; /* Keep same as desktop - consistent with periodic table */
    height: 80px !important;
  }
  
  /* Mobile uses same sizes as desktop periodic table for consistency */
  .elements-showcase .element-hex .electron-shell[data-shell="1"] { width: 25px !important; height: 25px !important; }
  .elements-showcase .element-hex .electron-shell[data-shell="2"] { width: 35px !important; height: 35px !important; }
  .elements-showcase .element-hex .electron-shell[data-shell="3"] { width: 45px !important; height: 45px !important; }
  .elements-showcase .element-hex .electron-shell[data-shell="4"] { width: 55px !important; height: 55px !important; }
  .elements-showcase .element-hex .electron-shell[data-shell="5"] { width: 65px !important; height: 65px !important; }
  .elements-showcase .element-hex .electron-shell[data-shell="6"] { width: 75px !important; height: 75px !important; }
  .elements-showcase .element-hex .electron-shell[data-shell="7"] { width: 85px !important; height: 85px !important; } /* Will be clipped by overflow:hidden */
}

/* End of Homepage Styles */