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

:root {
  --primary-color: #2563eb;
  --primary-dark: #1e40af;
  --secondary-color: #10b981;
  --text-color: #1f2937;
  --text-light: #6b7280;
  --bg-color: #f9fafb;
  --white: #ffffff;
  --border-color: #e5e7eb;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: var(--white);
  padding: 0.5rem 1rem;
  text-decoration: none;
  z-index: 1000;
}

.skip-link:focus {
  top: 0;
}

/* Header & Navigation */
header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

/* Navigation Link Animation */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #2563eb;
  transition: width 0.3s ease;
}

.dark .nav-link::after {
  background-color: #60a5fa;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: #2563eb;
  font-weight: 600;
}

.dark .nav-link.active {
  color: #60a5fa;
}

.nav-link.active::after {
  width: 100%;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 4rem 2rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* Proxy Form */
.proxy-form {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.input-group {
  display: flex;
  gap: 0.5rem;
  box-shadow: var(--shadow-lg);
  border-radius: 0.5rem;
  overflow: hidden;
}

.proxy-input {
  flex: 1;
  padding: 1rem 1.5rem;
  border: 2px solid var(--border-color);
  border-right: none;
  font-size: 1rem;
  outline: none;
}

.proxy-input:focus {
  border-color: var(--primary-color);
}

.btn-primary {
  padding: 1rem 2rem;
  background: var(--secondary-color);
  color: var(--white);
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-primary:hover {
  background: #059669;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* Intro Section */
.intro-section {
  background: var(--white);
  padding: 3rem 2rem;
  text-align: center;
}

.intro-section h2 {
  font-size: 2rem;
  color: var(--text-color);
  margin-bottom: 1rem;
}

.intro-section p {
  font-size: 1.125rem;
  color: var(--text-light);
  line-height: 1.8;
  max-width: 800px;
  margin: 0 auto;
}

/* Features Section */
.features {
  background: var(--bg-color);
  padding: 4rem 2rem;
}

/* Use Cases Section */
.usecases-section {
  background: var(--bg-color);
  padding: 4rem 2rem;
}

.usecases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.usecase-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--white);
  border-radius: 0.5rem;
  border-left: 4px solid var(--primary-color);
  transition: transform 0.3s, box-shadow 0.3s;
}

.usecase-card:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-lg);
}

.usecase-icon {
  font-size: 2rem;
  min-width: 3rem;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  background: rgba(37, 99, 235, 0.1);
  border-radius: 0.5rem;
  flex-shrink: 0;
}

.usecase-card:hover .usecase-icon {
  background: var(--primary-color);
  color: var(--white);
  transform: scale(1.1);
  transition: all 0.3s ease;
}

.usecase-text {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text-color);
  line-height: 1.5;
}

.features h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 3rem;
  color: var(--text-color);
}

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

.feature-card {
  padding: 2rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  transition: transform 0.3s, box-shadow 0.3s;
  text-align: center;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--primary-color);
  background: rgba(37, 99, 235, 0.1);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
  background: var(--primary-color);
  color: var(--white);
  transform: scale(1.1) rotate(5deg);
}

.feature-card h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.feature-card p {
  color: var(--text-light);
  line-height: 1.8;
}

/* Content Section */
.content-section {
  margin-bottom: 3rem;
}

.content-section h2 {
  font-size: 1.75rem;
  color: var(--text-color);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-color);
}

.content-section p {
  color: var(--text-light);
  margin-bottom: 1rem;
  line-height: 1.8;
}

/* FAQ Section */
.faq-page-title {
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 3px solid var(--primary-color);
}

.faq-item {
  margin-bottom: 1.5rem;
  background: var(--white);
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  transition: transform 0.2s, box-shadow 0.2s;
}

.faq-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.faq-link {
  display: block;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
}

.faq-question {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.faq-question::after {
  content: '\f054';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 0.875rem;
  margin-left: auto;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
}

.faq-item:hover .faq-question::after {
  opacity: 1;
  transform: translateX(4px);
}

.faq-answer {
  color: var(--text-light);
  line-height: 1.8;
}

/* Individual FAQ Page */
.faq-detail {
  max-width: 900px;
  margin: 0 auto;
}

.faq-detail-content {
  background: var(--white);
  padding: 3rem;
  border-radius: 0.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary-color);
}

.faq-detail-content h1 {
  color: var(--primary-color);
  font-size: 2rem;
  margin-bottom: 2rem;
  line-height: 1.3;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
}

.faq-detail-content h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  margin-top: 2rem;
  font-size: 1.5rem;
}

.faq-detail-content h3 {
  color: var(--text-color);
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.faq-detail-content p {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.faq-detail-content ul, .faq-detail-content ol {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.faq-detail-content li {
  margin-bottom: 0.5rem;
}

.faq-answer-summary {
  margin-top: 1.5rem;
}

.answer-summary {
  background: rgba(37, 99, 235, 0.05);
  padding: 1.5rem;
  border-left: 4px solid var(--secondary-color);
  border-radius: 0.375rem;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text-color);
  margin-bottom: 2rem;
}

.detailed-answer {
  margin-top: 2rem;
}

.faq-meta {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-light);
  font-size: 0.9rem;
}

.faq-meta i {
  color: var(--primary-color);
  margin-right: 0.5rem;
}

.back-to-faq {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: var(--white);
  text-decoration: none;
  border-radius: 0.375rem;
  transition: background 0.3s, transform 0.2s;
  margin-bottom: 2rem;
  font-weight: 600;
}

.back-to-faq:hover {
  background: var(--primary-dark);
  transform: translateX(-4px);
}

.faq-navigation {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.faq-navigation .btn-link {
  flex: 1;
  min-width: 200px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.related-faqs {
  background: var(--white);
  padding: 2rem;
  border-radius: 0.5rem;
  margin-top: 3rem;
}

.related-faqs h2 {
  font-size: 1.5rem;
  color: var(--text-color);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--primary-color);
}

.related-faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.related-faq-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: var(--bg-color);
  border-radius: 0.375rem;
  text-decoration: none;
  color: var(--text-color);
  transition: all 0.3s;
  border-left: 3px solid transparent;
}

.related-faq-item:hover {
  background: var(--white);
  border-left-color: var(--primary-color);
  transform: translateX(4px);
  box-shadow: var(--shadow);
}

.related-faq-item i {
  color: var(--primary-color);
  font-size: 1.25rem;
}

/* Footer */
footer {
  background: var(--text-color);
  color: var(--white);
  padding: 2rem;
  text-align: center;
  margin-top: 4rem;
}

footer p {
  margin-bottom: 0.5rem;
  opacity: 0.8;
}

/* 404 Page */
.error-page {
  text-align: center;
  padding: 4rem 2rem;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.error-page h1 {
  font-size: 4rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.error-page p {
  font-size: 1.25rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

.btn-link {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: var(--white);
  text-decoration: none;
  border-radius: 0.375rem;
  transition: background 0.3s;
}

.btn-link:hover {
  background: var(--primary-dark);
}

/* Responsive Design */
@media (max-width: 768px) {

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

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

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

  .proxy-input {
    border-right: 2px solid var(--border-color);
    border-bottom: none;
  }

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

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

  .usecase-card {
    flex-direction: column;
    text-align: center;
  }

  .usecase-icon {
    font-size: 2.5rem;
    width: 4rem;
    height: 4rem;
  }

  .error-page h1 {
    font-size: 3rem;
  }
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--white);
  animation: spin 1s ease-in-out infinite;
}

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