/* ThaiClick Website Styles */

:root {
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --green-500: #22c55e;
  --red-500: #ef4444;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.6;
  color: var(--gray-800);
  background: white;
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: white;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: white;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--blue-500) 0%, var(--blue-700) 100%);
  color: white;
  padding-bottom: 4rem;
}

.hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 2rem 2rem;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 1.5rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  font-size: 0.95rem;
  opacity: 0.85;
}

.dot {
  width: 4px;
  height: 4px;
  background: currentColor;
  border-radius: 50%;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: white;
  color: var(--blue-600);
}

.btn-primary:hover {
  background: var(--gray-100);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
}

.full-width {
  width: 100%;
  justify-content: center;
}

/* Demo Browser */
.hero-demo {
  max-width: 600px;
  margin: 3rem auto 0;
  padding: 0 2rem;
}

.demo-browser {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.demo-toolbar {
  background: var(--gray-100);
  padding: 0.75rem 1rem;
  display: flex;
  gap: 0.5rem;
}

.demo-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.demo-dot.red { background: #ff5f57; }
.demo-dot.yellow { background: #ffbd2e; }
.demo-dot.green { background: #28c840; }

.demo-content {
  padding: 2rem;
  position: relative;
  min-height: 120px;
}

.demo-thai {
  font-size: 1.5rem;
  color: var(--gray-800);
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.word {
  padding: 0.125rem 0.25rem;
  border-radius: 4px;
  cursor: pointer;
}

.word.new { border-bottom: 2px solid var(--red-500); }
.word.learning { border-bottom: 2px solid var(--amber-500); }
.word.known { border-bottom: 2px solid var(--green-500); }
.word.highlight {
  background: rgba(59, 130, 246, 0.15);
  border-bottom: 2px solid var(--blue-500);
}

.demo-popup {
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--gray-800);
  color: white;
  padding: 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.popup-word {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.popup-roman {
  color: var(--gray-400);
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.popup-def {
  margin-bottom: 0.75rem;
}

.popup-actions {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
}

.popup-audio, .popup-save {
  cursor: pointer;
  opacity: 0.8;
}

/* Features Section */
.features {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.features h2, .how-it-works h2, .pricing h2, .faq h2 {
  text-align: center;
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 3rem;
  color: var(--gray-900);
}

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

.feature {
  padding: 1.5rem;
  border-radius: 12px;
  background: var(--gray-50);
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.feature h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--gray-900);
}

.feature p {
  color: var(--gray-600);
  font-size: 0.95rem;
}

/* How It Works */
.how-it-works {
  background: var(--gray-50);
  padding: 5rem 2rem;
}

.steps {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  max-width: 900px;
  margin: 0 auto;
}

.step {
  text-align: center;
  flex: 1;
  min-width: 200px;
}

.step-number {
  width: 48px;
  height: 48px;
  background: var(--blue-600);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 auto 1rem;
}

.step h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.step p {
  color: var(--gray-600);
  font-size: 0.95rem;
}

.step-arrow {
  font-size: 2rem;
  color: var(--gray-300);
}

/* Pricing Section */
.pricing {
  padding: 5rem 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.pricing-subtitle {
  text-align: center;
  color: var(--gray-600);
  margin-top: -2rem;
  margin-bottom: 3rem;
}

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

.pricing-card {
  border: 2px solid var(--gray-200);
  border-radius: 16px;
  padding: 2rem;
  position: relative;
}

.pricing-card.featured {
  border-color: var(--blue-500);
  box-shadow: 0 10px 40px rgba(59, 130, 246, 0.15);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--blue-500);
  color: white;
  padding: 0.25rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.pricing-header h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.pricing-price {
  margin-bottom: 1.5rem;
}

.pricing-price .price {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gray-900);
}

.pricing-price .period {
  color: var(--gray-500);
}

.pricing-features {
  list-style: none;
  margin-bottom: 2rem;
}

.pricing-features li {
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pricing-features .check {
  color: var(--green-500);
  font-weight: bold;
}

.pricing-features .x {
  color: var(--gray-300);
}

.pricing-note {
  text-align: center;
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-top: 0.75rem;
}

.pricing-card .btn-primary {
  background: var(--blue-600);
  color: white;
}

.pricing-card .btn-primary:hover {
  background: var(--blue-700);
}

.pricing-card .btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
  border: 2px solid var(--gray-200);
}

/* FAQ Section */
.faq {
  background: var(--gray-50);
  padding: 5rem 2rem;
}

.faq-list {
  max-width: 700px;
  margin: 0 auto;
}

.faq-item {
  background: white;
  border-radius: 8px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.faq-item summary {
  padding: 1.25rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--gray-400);
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item p {
  padding: 0 1.25rem 1.25rem;
  color: var(--gray-600);
}

/* Footer */
.footer {
  background: var(--gray-900);
  color: white;
  padding: 3rem 2rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--gray-400);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: white;
}

.footer-copyright {
  color: var(--gray-500);
  font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
  .nav {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-links {
    gap: 1rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 0.5rem;
  }

  .hero-stats .dot {
    display: none;
  }

  .demo-popup {
    position: static;
    transform: none;
    margin-top: 1.5rem;
  }

  .step-arrow {
    display: none;
  }

  .steps {
    flex-direction: column;
  }
}

/* Legal Pages */
.legal-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.legal-page h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.legal-page .last-updated {
  color: var(--gray-500);
  margin-bottom: 2rem;
}

.legal-page h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--gray-900);
}

.legal-page p, .legal-page li {
  color: var(--gray-700);
  margin-bottom: 1rem;
}

.legal-page ul {
  padding-left: 1.5rem;
}

.legal-page a {
  color: var(--blue-600);
}
