:root {
  /* Color Psychology: Focus & Calm (Pure Dark Mode Default) */
  /* Primary: Teal - Promotes clarity, concentration, and calm energy */
  --primary: 185 80% 45%;
  --primary-foreground: 0 0% 100%;
  
  /* Accent: Emerald - Positive reinforcement, success, and growth */
  --accent: 150 65% 45%;
  --accent-foreground: 0 0% 100%;
  
  /* Warning: Amber - Grabs attention gently without inducing anxiety */
  --warning: 35 90% 55%;
  --warning-foreground: 0 0% 100%;
  
  /* Destructive: Soft Crimson - clear urgency, error indication */
  --destructive: 350 70% 50%;
  --destructive-foreground: 0 0% 100%;

  /* Backgrounds: Deep Navy/Slate - Massively reduces eye strain, anchors deep focus */
  --background: 225 25% 9%;
  --background-secondary: 225 25% 13%;
  --background-tertiary: 225 25% 17%;
  
  /* Foregrounds: Soft off-whites to prevent harsh glare against dark backgrounds */
  --foreground: 210 20% 92%;
  --foreground-secondary: 210 20% 70%;
  --foreground-muted: 210 15% 55%;

  /* Cards */
  --card: 225 25% 13%;
  --card-foreground: 210 20% 92%;
  --card-border: 225 20% 22%;

  --border: 225 20% 22%;
  --input: 225 25% 9%;
  --ring: 185 80% 45%;

  /* Flat Colors */
  --gradient-primary: hsl(var(--primary));
  --gradient-accent: hsl(var(--accent));
  --gradient-warning: hsl(var(--warning));
  --gradient-card: hsl(var(--card));

  /* Clean Mac-like Shadows adapted for depth in Dark Mode */
  --shadow-glow: 0 4px 15px rgb(0 0 0 / 0.2);
  --shadow-glow-accent: 0 4px 15px rgb(0 0 0 / 0.2);
  --shadow-glow-warning: 0 4px 15px rgb(0 0 0 / 0.2);
  --shadow-elegant: 0 15px 40px -5px rgb(0 0 0 / 0.6), 0 5px 15px -5px rgb(0 0 0 / 0.4);

  /* Animation */
  --transition-spring: all 0.2s ease-out;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: hsl(var(--background));
  background-image: radial-gradient(circle at 15% 50%, hsl(var(--primary) / 0.12), transparent 45%),
                    radial-gradient(circle at 85% 30%, hsl(var(--accent) / 0.10), transparent 45%);
  color: hsl(var(--foreground));
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Background particles */
.bg-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: hsl(var(--primary) / 0.3);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
  }
}

/* Navigation */
.nav {
  background: hsl(var(--background-secondary) / 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid hsl(var(--border));
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
}

.nav-icon {
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
}

.nav-redirect-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--gradient-primary);
  color: hsl(var(--primary-foreground));
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition-spring);
  box-shadow: var(--shadow-glow);
  white-space: nowrap;
}

.nav-redirect-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-accent);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
  position: relative;
  z-index: 1;
}

/* Animations */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.animate-slide-up {
  animation: slideUp 0.8s ease-out;
}

.animate-fade-in {
  animation: fadeIn 0.5s ease-out;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 3rem;
}

.header-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-primary);
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-glow);
}

.header-greeting {
  font-size: 1.25rem;
  color: var(--gradient-primary);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.header-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: hsl(var(--foreground));
  margin-bottom: 1rem;
}

.header-subtitle {
  font-size: 1.25rem;
  color: hsl(var(--foreground-secondary));
  max-width: 600px;
  margin: 0 auto 2rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.tag {
  background: hsl(var(--background-secondary));
  color: hsl(var(--foreground));
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  border: 1px solid hsl(var(--border));
}

@keyframes glassPulse {
  0% { box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3), 0 0 0 0 hsl(var(--primary) / 0.0); }
  50% { box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3), 0 0 20px 2px hsl(var(--primary) / 0.15); }
  100% { box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3), 0 0 0 0 hsl(var(--primary) / 0.0); }
}

/* Card */
.card {
  background: rgba(255, 255, 255, 0.03); /* fully clear glass base */
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.06); /* subtle glossy border */
  border-radius: 24px;
  padding: 2rem;
  margin-bottom: 2rem;
  transition: var(--transition-spring);
  animation: glassPulse 5s infinite ease-in-out;
}

.card:hover {
  transform: translateY(-4px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.card-header {
  text-align: center;
  margin-bottom: 2rem;
}

.card-title {
  font-size: 1.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.card-description {
  color: hsl(var(--foreground-secondary));
  font-size: 1.125rem;
}

.how-to-use {
  background: hsl(var(--background-tertiary));
  padding: 1rem 1.25rem;
  border-radius: 12px;
  text-align: left;
  margin-top: 1rem;
  margin-bottom: 2rem;
  color: hsl(var(--foreground-secondary));
}
.how-to-use p {
  margin-bottom: 0.5rem;
  color: hsl(var(--foreground));
}
.how-to-use ol {
  margin-left: 1.2rem;
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* Form */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.form-label {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-input,
.form-select {
  background: hsl(var(--background-tertiary));
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-size: 1.125rem;
  font-weight: 600;
  text-align: center;
  color: hsl(var(--foreground));
  transition: all 0.3s ease;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.2);
}

.form-hint {
  font-size: 0.875rem;
  color: hsl(var(--foreground-muted));
}

/* Live Preview */
.live-preview {
  background: var(--gradient-card);
  border: 1px solid hsl(var(--card-border));
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.live-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.live-title {
  font-size: 1.125rem;
  font-weight: 600;
}

.badge {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
}

.badge-success {
  background: hsl(var(--accent) / 0.2);
  color: hsl(var(--accent));
  border: 1px solid hsl(var(--accent) / 0.3);
}

.badge-warning {
  background: hsl(var(--warning) / 0.2);
  color: hsl(var(--warning));
  border: 1px solid hsl(var(--warning) / 0.3);
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: hsl(var(--foreground-secondary));
  margin-bottom: 0.75rem;
}

.progress-bar {
  height: 12px;
  background: hsl(var(--background-tertiary));
  border-radius: 9999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 9999px;
  transition: all 1s ease;
}

.progress-success {
  background: var(--gradient-accent);
  box-shadow: var(--shadow-glow-accent);
}

.progress-warning {
  background: var(--gradient-warning);
  box-shadow: var(--shadow-glow-warning);
}

/* Buttons */
.button-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.button {
  flex: 1;
  min-width: 200px;
  height: 56px;
  border-radius: 12px;
  font-size: 1.125rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition-spring);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.button-primary {
  background: var(--gradient-primary);
  color: hsl(var(--primary-foreground));
  box-shadow: var(--shadow-glow);
}

.button-primary:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-accent);
}

.button-secondary {
  background: transparent;
  color: hsl(var(--foreground));
  border: 2px solid hsl(var(--border));
}

.button-secondary:hover {
  background: hsl(var(--background-secondary));
  border-color: hsl(var(--foreground-secondary));
}

.button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid hsl(var(--primary-foreground));
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Results */
.results {
  margin-top: 1.5rem;
}

.result-card {
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid;
  transition: var(--transition-spring);
}

.result-success {
  border-color: hsl(var(--accent));
  box-shadow: var(--shadow-glow-accent);
}

.result-warning {
  border-color: hsl(var(--warning));
  box-shadow: var(--shadow-glow-warning);
}

.result-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.result-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.result-title.success {
  color: hsl(var(--accent));
}
.result-title.warning {
  color: hsl(var(--warning));
}

.result-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.result-section h4 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.result-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.result-label {
  color: hsl(var(--foreground-secondary));
}

.result-value {
  font-weight: 600;
}

.result-summary {
  background: hsl(var(--accent) / 0.1);
  border: 1px solid hsl(var(--accent) / 0.2);
  border-radius: 12px;
  padding: 1rem;
}

.result-summary.warning {
  background: hsl(var(--warning) / 0.1);
  border-color: hsl(var(--warning) / 0.2);
}

.result-summary p {
  margin: 0;
  font-weight: 500;
}

.result-summary.success p {
  color: hsl(var(--accent));
}
.result-summary.warning p {
  color: hsl(var(--warning));
}

/* Footer Updated: Mac-like Glass Aesthetic */
.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(20px);
  padding: 4rem 1rem 2rem;
  margin-top: 4rem;
}

.footer-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
}

/* Developer Profile Section */
.developer-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.developer-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  margin-bottom: 0.25rem;
}

.developer-bio {
  font-size: 0.9rem;
  color: hsl(var(--foreground-secondary));
  max-width: 400px;
  line-height: 1.6;
}

.social-links {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--foreground-secondary));
  transition: var(--transition-spring);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-link:hover {
  background: var(--gradient-primary);
  color: white;
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

/* Community Section */
.community-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.whatsapp-btn {
  background: #25D366 !important;
  color: white !important;
  border-radius: 9999px !important;
  padding: 0 2rem !important;
  height: 52px !important;
  font-size: 1rem !important;
  box-shadow: 0 8px 16px rgba(37, 211, 102, 0.2) !important;
  transition: var(--transition-spring) !important;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
}

.whatsapp-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(37, 211, 102, 0.4) !important;
}

/* Services Links */
.services-links {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.service-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: hsl(var(--foreground-secondary));
  text-decoration: none;
  transition: var(--transition-spring);
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.service-link:hover {
  color: hsl(var(--foreground));
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

/* Copyright & Bottom */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 2rem;
  width: 100%;
  text-align: center;
  font-size: 0.85rem;
  color: hsl(var(--foreground-muted));
}

.footer-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-brand-icon {
  width: 32px;
  height: 32px;
  background: var(--gradient-primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
}

.footer-brand-text h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0;
}

.footer-brand-text p {
  font-size: 0.875rem;
  color: hsl(var(--foreground-muted));
  margin: 0;
}

.footer-description {
  color: hsl(var(--foreground-secondary));
  margin-bottom: 1rem;
  line-height: 1.6;
}

.footer-badges {
  display: flex;
  gap: 0.5rem;
}

.footer-section h4 {
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-link {
  color: hsl(var(--foreground-secondary));
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: hsl(var(--foreground));
}

/* New service description styling */
.footer-service-desc {
  font-size: 0.875rem;
  color: hsl(var(--foreground-muted));
  margin-top: 0.25rem;
  margin-bottom: 0;
}

.footer-bottom {
  border-top: 1px solid hsl(var(--border));
  margin-top: 2rem;
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: hsl(var(--foreground-secondary));
}

.footer-legal {
  display: flex;
  gap: 1.5rem;
}

/* Icons */
.icon {
  width: 20px;
  height: 20px;
}

/* Responsive */
@media (max-width: 768px) {
  .header-title {
    font-size: 2rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .button-group {
    flex-direction: column;
  }

  .button {
    min-width: auto;
  }

  .result-content {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .nav-redirect-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
  }
}

/* Error Alert */
.alert {
  background: hsl(var(--destructive) / 0.1);
  border: 1px solid hsl(var(--destructive) / 0.2);
  color: hsl(var(--destructive));
  padding: 1rem;
  border-radius: 12px;
  margin-top: 1rem;
  display: none;
}

.alert.show {
  display: block;
  animation: fadeIn 0.3s ease;
}
