/**
 * Base Styles - Magic Cat Themes Showcase
 * Shared foundation styles with Oracle
 */

/* ===== CSS VARIABLES ===== */
:root {
  /* Dark Theme (default) */
  --bg-primary: #1a0b2e;
  --bg-secondary: #2d1b4e;
  --bg-card: rgba(75, 50, 125, 0.3);
  --text-primary: #ffffff;
  --text-secondary: #e0d0ff;
  --text-muted: #b8a0e8;
  --accent-primary: #a855f7;
  --accent-secondary: #9333ea;
  --glow-color: rgba(168, 85, 247, 0.6);
  --border-color: rgba(168, 85, 247, 0.3);
}

/* ===== TYPOGRAPHY ===== */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  color: var(--text-primary);
  
  /* Background - Forest theme (same as Oracle) */
  background-image:
    linear-gradient(rgba(100, 50, 200, 0.3), rgba(50, 30, 150, 0.35)),
    url("../assets/images/backgrounds/ForestDark.png");
  
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-blend-mode: multiply;
  
  /* Performance */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  
  /* Smooth theme transitions */
  transition: background-image 0.5s ease-in-out, color 0.3s ease;
}

/* ===== LIGHT THEME ===== */
body.light-theme {
  --bg-primary: #f8f4ff;
  --bg-secondary: #e9deff;
  --bg-card: rgba(255, 255, 255, 0.9);
  --text-primary: #3b0764;
  --text-secondary: #6b21a8;
  --text-muted: #7c3aed;
  --accent-primary: #7c3aed;
  --accent-secondary: #6b21a8;
  --glow-color: rgba(124, 58, 237, 0.5);
  --border-color: rgba(124, 58, 237, 0.4);
  
  /* Light background */
  background-image:
    linear-gradient(rgba(248, 244, 255, 0.9), rgba(233, 222, 255, 0.85)),
    url("../assets/images/backgrounds/ForestLight.png");
}

/* Override Tailwind text colors in light theme */
body.light-theme .text-purple-200,
body.light-theme .text-purple-300,
body.light-theme .text-purple-400 {
  color: var(--text-secondary) !important;
}

body.light-theme h1,
body.light-theme h2,
body.light-theme h3 {
  color: var(--text-primary) !important;
}

/* ===== UTILITIES ===== */
.magic-glow {
  box-shadow: 0 0 25px var(--glow-color);
}

.magic-text {
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Light theme override for gradient text */
body.light-theme .magic-text {
  background: linear-gradient(135deg, #7c3aed 0%, #db2777 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== SPARKLES CONTAINER ===== */
#sparkles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 5;
}

/* ===== PARTICLE STYLING ===== */
.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(200, 150, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(200, 150, 255, 0.8);
  pointer-events: none;
}

/* Golden particles */
.golden-particle {
  background: radial-gradient(circle, #FFD700 0%, #FFC107 100%) !important;
  box-shadow: 
    0 0 20px rgba(255, 215, 0, 0.9),
    0 0 40px rgba(255, 193, 7, 0.6) !important;
}

/* ===== LOGO STYLING ===== */
.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Horizontal header layout */
.header-horizontal {
  display: flex;
  align-items: center;
  justify-content: center; /* Center horizontally */
  gap: 2rem;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
}

.logo-container-horizontal {
  flex-shrink: 0; /* Don't shrink logo */
}

.title-container-horizontal {
  flex: 0 1 auto; /* Don't grow, shrink if needed */
  text-align: left;
}

.cat-logo {
  width: 120px;
  height: 120px;
  object-fit: cover; /* Changed from contain to cover */
  
  /* Position face/eyes in center of circle */
  object-position: center 55%; /* Perfect balance - face centered */
  
  /* Make it circular (crystal ball effect) */
  border-radius: 50%;
  border: 3px solid rgba(168, 85, 247, 0.5);
  
  /* Magic glow */
  filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.6));
  box-shadow: 
    0 0 30px rgba(168, 85, 247, 0.4),
    inset 0 0 20px rgba(168, 85, 247, 0.1);
  
  animation: float 4s ease-in-out infinite;
  
  /* Smooth transitions for rotation */
  transition: opacity 0.3s ease, transform 0.3s ease;
  
  /* Center display */
  display: block;
  margin: 0 auto;
}

.cat-logo:hover {
  transform: scale(1.1) rotate(5deg);
  filter: drop-shadow(0 0 40px rgba(168, 85, 247, 1));
  box-shadow: 
    0 0 50px rgba(168, 85, 247, 0.6),
    inset 0 0 30px rgba(168, 85, 247, 0.2);
  cursor: pointer;
}

.cat-logo-small {
  width: 80px;
  height: 80px;
  object-fit: cover;
  
  /* Position face/eyes in center */
  object-position: center 55%;
  
  /* Make it circular */
  border-radius: 50%;
  border: 2px solid rgba(168, 85, 247, 0.4);
  
  filter: drop-shadow(0 0 15px rgba(168, 85, 247, 0.5));
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
  
  /* Center display */
  display: block;
  margin: 0 auto;
}

/* Update cat image for light theme */
body.light-theme .cat-logo,
body.light-theme .cat-logo-small {
  filter: drop-shadow(0 0 15px rgba(124, 58, 237, 0.4));
  border-color: rgba(124, 58, 237, 0.5);
  box-shadow: 
    0 0 30px rgba(124, 58, 237, 0.3),
    inset 0 0 20px rgba(124, 58, 237, 0.1);
}

body.light-theme .cat-logo:hover {
  filter: drop-shadow(0 0 40px rgba(124, 58, 237, 0.8));
  box-shadow: 
    0 0 50px rgba(124, 58, 237, 0.5),
    inset 0 0 30px rgba(124, 58, 237, 0.2);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  /* Stack vertically on mobile */
  .header-horizontal {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
  
  .title-container-horizontal {
    text-align: center;
  }
  
  .cat-logo {
    width: 100px;
    height: 100px;
  }
  
  .cat-logo-small {
    width: 60px;
    height: 60px;
  }
  
  /* Better spacing on mobile */
  body {
    padding: 0;
  }
  
  /* Better text readability */
  .magic-text {
    font-size: 2rem !important; /* Override Tailwind text-4xl */
    line-height: 1.2;
  }
}

/* Extra small phones */
@media (max-width: 480px) {
  .header-horizontal {
    gap: 1rem;
  }
  
  .cat-logo {
    width: 80px;
    height: 80px;
  }
  
  .magic-text {
    font-size: 1.75rem !important;
  }
}
