/* Custom properties for fine-grained cosmic design controls */
:root {
  --bg-deep: #07070e;
  --bg-nebula: radial-gradient(circle at 50% 30%, #15132d 0%, #07070e 70%);
  --text-primary: #f1f3f9;
  --text-secondary: #9ea5b8;
  --text-muted: #646a7c;
  
  --color-gold: #dfc394;
  --color-gold-glow: rgba(223, 195, 148, 0.15);
  --color-lavender: #b8a4e4;
  --color-lavender-glow: rgba(184, 164, 228, 0.2);
  --color-nebula-violet: #9d87d4;
  
  --font-display: 'Cinzel', serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'Space Mono', monospace;
  
  --card-border: 1px solid rgba(223, 195, 148, 0.12);
  --card-bg: rgba(15, 16, 28, 0.45);
  --card-blur: blur(16px);
  
  --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base System */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-deep);
  background-image: var(--bg-nebula);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Starfield Canvas background overlay */
#starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: auto; /* Allow interactive star linking on mouse movement */
}

/* Main Container Layout */
.container {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 80px;
  min-height: 100vh;
  justify-content: space-between;
}

/* Hero Header styling */
.hero-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(30px);
  animation: revealUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.logo-container {
  display: inline-block;
  margin-bottom: 28px;
  position: relative;
}

.gemini-logo {
  width: 90px;
  height: 90px;
  filter: drop-shadow(0 0 15px var(--color-lavender-glow));
  animation: floatLogo 6s ease-in-out infinite;
}

.subtitle {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--color-gold);
  text-transform: uppercase;
  margin-bottom: 16px;
  font-weight: 700;
  opacity: 0.9;
  text-shadow: 0 0 8px var(--color-gold-glow);
}

.title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #ffffff 30%, #e2d9f3 70%, #dfc394 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.01em;
}

.description {
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-weight: 300;
  max-width: 600px;
  margin: 0 auto;
}

/* Interactive Panel Styling - Glassmorphism */
.interactive-panel {
  max-width: 650px;
  width: 100%;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(40px);
  animation: revealUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

.panel-card {
  background: var(--card-bg);
  backdrop-filter: var(--card-blur);
  -webkit-backdrop-filter: var(--card-blur);
  border: var(--card-border);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 
    0 10px 40px -10px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.panel-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-gold), var(--color-lavender), transparent);
  opacity: 0.6;
}

.panel-card:hover {
  border-color: rgba(223, 195, 148, 0.25);
  box-shadow: 
    0 15px 50px -10px rgba(0, 0, 0, 0.6),
    0 0 30px -5px var(--color-lavender-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 10px;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  font-weight: 600;
}

.card-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 30px;
  font-weight: 300;
}

/* Elegant Cosmic Input Group */
.input-group {
  display: flex;
  gap: 12px;
  background: rgba(7, 7, 14, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 8px;
  border-radius: 12px;
  transition: var(--transition-fast);
}

.input-group:focus-within {
  border-color: rgba(184, 164, 228, 0.45);
  box-shadow: 0 0 15px rgba(184, 164, 228, 0.1);
}

.input-group input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 10px 16px;
  font-weight: 400;
}

.input-group input::placeholder {
  color: var(--text-muted);
}

.input-group button {
  background: linear-gradient(135deg, var(--color-gold), #c9ad7d);
  color: #07070e;
  border: none;
  outline: none;
  padding: 10px 24px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
  transition: var(--transition-fast);
  box-shadow: 0 4px 15px rgba(223, 195, 148, 0.2);
}

.input-group button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(223, 195, 148, 0.35);
  background: linear-gradient(135deg, #eedcc5, var(--color-gold));
}

.input-group button:active {
  transform: translateY(0);
}

/* Interactive Output Section */
.hidden-output {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease-in-out;
}

.hidden-output.active {
  max-height: 350px;
  opacity: 1;
  margin-top: 24px;
}

.output-divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(223, 195, 148, 0) 0%, rgba(223, 195, 148, 0.15) 30%, rgba(184, 164, 228, 0.15) 70%, rgba(184, 164, 228, 0) 100%);
  margin-bottom: 24px;
}

.welcome-message {
  font-size: 1.15rem;
  color: #e2d9f3;
  line-height: 1.7;
  font-weight: 300;
  margin-bottom: 24px;
  text-shadow: 0 0 10px rgba(184, 164, 228, 0.1);
}

.cosmic-attributes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.attr-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px 14px;
  border-radius: 100px;
  background: rgba(184, 164, 228, 0.05);
  border: 1px solid rgba(184, 164, 228, 0.15);
  color: var(--color-lavender);
  letter-spacing: 0.05em;
}

#attr-star {
  background: rgba(223, 195, 148, 0.05);
  border-color: rgba(223, 195, 148, 0.15);
  color: var(--color-gold);
}

/* Staggered features grid - modern asymmetry */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  opacity: 0;
  transform: translateY(40px);
  animation: revealUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}

.grid-card {
  background: rgba(10, 11, 20, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  padding: 32px;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.grid-card:hover {
  transform: translateY(-8px);
  background: rgba(15, 16, 28, 0.55);
  border-color: rgba(184, 164, 228, 0.15);
  box-shadow: 
    0 12px 30px -10px rgba(0, 0, 0, 0.4),
    0 0 20px -5px rgba(184, 164, 228, 0.08);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(184, 164, 228, 0.06);
  border: 1px solid rgba(184, 164, 228, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-lavender);
  transition: var(--transition-fast);
}

.grid-card:hover .card-icon {
  color: var(--color-gold);
  background: rgba(223, 195, 148, 0.06);
  border-color: rgba(223, 195, 148, 0.2);
  transform: scale(1.05);
}

.grid-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.03em;
}

.grid-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.6;
}

/* Footer Section */
.main-footer {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding-top: 32px;
  opacity: 0;
  animation: fadeIn 1.5s ease-out 1s forwards;
}

.footer-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--transition-fast);
  border-bottom: 1px solid transparent;
}

.footer-link:hover {
  color: var(--color-gold);
  border-bottom-color: rgba(223, 195, 148, 0.3);
}

.bullet {
  color: rgba(255, 255, 255, 0.1);
  font-size: 0.7rem;
}

/* Entry Keyframe Animations */
@keyframes revealUp {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes floatLogo {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(2deg);
  }
}

/* Adaptive Responsive Design */
@media (max-width: 768px) {
  .container {
    padding-top: 50px;
    gap: 50px;
  }
  
  .panel-card {
    padding: 30px 20px;
  }
  
  .input-group {
    flex-direction: column;
    background: transparent;
    border: none;
    padding: 0;
    gap: 16px;
  }
  
  .input-group input {
    background: rgba(7, 7, 14, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px 20px;
  }
  
  .input-group button {
    padding: 14px 20px;
    border-radius: 12px;
  }
  
  .cosmic-attributes {
    justify-content: center;
  }
}

/* Tactile Error Animation & Styles */
.input-group input.error {
  border-color: rgba(239, 68, 68, 0.4);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

