:root {
  --bg-color: #030308;
  --bg-gradient: radial-gradient(circle at top center, #111827 0%, #030308 100%);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --primary: #10b981;
  --primary-hover: #059669;
  --secondary: #3b82f6;
  --accent: #fbbf24;
  --glass-bg: rgba(255, 255, 255, 0.02);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  --font-family: 'Outfit', sans-serif;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
  font-family: var(--font-family);
  background: var(--bg-color);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::after {
  content: "PROTOTYPE";
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-33deg);
  font-size: 15vw;
  font-family: var(--font-family);
  font-weight: 800;
  color: rgba(255, 255, 255, 0.04);
  pointer-events: none;
  user-select: none;
  z-index: 9999;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
h1 {
  font-size: 4rem;
  line-height: 1.1;
  font-weight: 800;
  background: linear-gradient(to right, #fff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
h2 {
  font-size: 2.5rem;
  color: var(--text-main);
}
p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
}
a {
  color: var(--text-main);
  text-decoration: none;
  transition: var(--transition);
}

/* Layout */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 5%;
  background: rgba(3, 3, 8, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--glass-border);
}
.brand {
  font-weight: 800;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
}
.brand span {
  color: var(--primary);
}
.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.nav-links a {
  font-weight: 500;
  font-size: 1rem;
  color: var(--text-muted);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--primary);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0.5rem;
}

main {
  flex: 1;
  padding: 5rem 5%;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Glass Card */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: var(--glass-shadow);
  transition: var(--transition);
}
.glass-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.12);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-align: center;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 20px -6px rgba(16, 185, 129, 0.5);
}
.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -6px rgba(16, 185, 129, 0.6);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid rgba(255,255,255,0.1);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* Form Styles */
.custom-select {
  appearance: none;
  background: rgba(3, 3, 8, 0.6);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 0.8rem 2.5rem 0.8rem 1rem;
  border-radius: 12px;
  font-family: var(--font-family);
  font-size: 1rem;
  cursor: pointer;
  width: 100%;
  max-width: 300px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 256 256'%3E%3Cpath fill='%2394a3b8' d='M213.66 101.66l-80 80a8 8 0 0 1-11.32 0l-80-80A8 8 0 0 1 53.66 90.34L128 164.69l74.34-74.35a8 8 0 0 1 11.32 11.32z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}
.custom-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 3rem 0 6rem;
  max-width: 800px;
  margin: 0 auto;
}
.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
}
.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2.5rem;
}

/* Grid Layouts */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 4rem 0;
}
.step-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.step-card h3 {
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.5rem;
}
.step-number {
  background: rgba(16, 185, 129, 0.15);
  color: var(--primary);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.25rem;
  font-weight: 800;
}

/* Dual Pack List */
.pack-list {
  list-style: none;
  padding: 0;
}
.pack-list li {
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--text-main);
}
.pack-list i {
  color: var(--primary);
  font-size: 1.5rem;
  margin-top: 2px;
}

/* Map specific styles */
#map {
  height: 600px;
  width: 100%;
  border-radius: 24px;
  z-index: 10;
  border: 1px solid var(--glass-border);
}
.map-container {
  position: relative;
  margin-top: 2rem;
}
.map-legend {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
  padding: 1.5rem;
  background: rgba(3, 3, 8, 0.9);
  backdrop-filter: blur(10px);
  min-width: 220px;
  border: 1px solid var(--glass-border);
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}
.legend-item:last-child {
  margin-bottom: 0;
}
.legend-color {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}
.bg-green { background: var(--primary); box-shadow: 0 0 12px var(--primary); border: 1px solid #000; }
.bg-blue { background: var(--secondary); box-shadow: 0 0 12px var(--secondary); border: 1px solid #000; }
.bg-yellow { background: var(--accent); box-shadow: 0 0 12px var(--accent); border: 1px solid #000; }

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-in {
  animation: fadeIn 0.8s ease-out forwards;
}

/* Philosophy format */
.dialogue {
  background: rgba(255, 255, 255, 0.02);
  border-left: 4px solid var(--primary);
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 16px 16px 0;
}
.dialogue strong {
  color: #fff;
}
.translation {
  font-size: 1.5rem;
  color: var(--primary);
  margin: 1rem 0;
  text-align: center;
  font-weight: 700;
  letter-spacing: 1px;
}
.saying-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

/* Translator App Styles */
.mic-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.1);
  border: 2px solid var(--primary);
  color: var(--primary);
  font-size: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2rem auto;
  cursor: pointer;
  transition: var(--transition);
}
.mic-btn:hover {
  background: rgba(16, 185, 129, 0.2);
  transform: scale(1.05);
}
.mic-btn.listening {
  background: var(--primary);
  color: #fff;
  animation: pulse-mic 1.5s infinite;
}
@keyframes pulse-mic {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { box-shadow: 0 0 0 20px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.translate-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
  margin-top: 1rem;
  min-height: 120px;
}

/* Mobile App View */
.mobile-app-wrapper {
  max-width: 480px;
  margin: 0 auto;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
}

/* Responsive align & Mobile Nav */
@media (max-width: 768px) {
  h1 { font-size: 2.75rem; text-align: center; }
  h2 { font-size: 2rem; text-align: center; }
  .hero p { text-align: center; }
  .hero-actions { flex-direction: column; width: 100%; }
  .btn { width: 100%; justify-content: center; }
  main { padding: 3rem 5%; }
  
  .grid-3 { grid-template-columns: 1fr; gap: 1.5rem; }
  .step-card { align-items: center; text-align: center; padding: 2rem 1.5rem; }
  .step-card h3 { flex-direction: column; gap: 1rem; }
  
  /* Dual pack section stacking logic */
  .dual-pack { flex-direction: column !important; text-align: center; }
  .pack-list li { justify-content: flex-start; text-align: left; }
  .pack-list i { margin-top: 4px; }
  
  /* Form adjustments */
  .custom-select { max-width: 100%; }

  /* Mobile Nav */
  .menu-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    flex-direction: column;
    background: rgba(3, 3, 8, 0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0;
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0); /* Hidden */
    transition: clip-path 0.3s ease-out;
  }
  .nav-links.open {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); /* Revealed */
  }
  .nav-links a {
    padding: 1.5rem;
    width: 100%;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.05);
  }
}

@media (max-width: 600px) {
    .saying-cards {
        grid-template-columns: 1fr;
    }
}
