* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: #f9fafb;
  color: #111827;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.container-custom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header Styles */
.header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 50;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: #1e3a8a;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo span {
  font-weight: 600;
  font-size: 1.25rem;
  color: #111827;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: #4b5563;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: #1e3a8a;
}

/* Button Styles */
.btn-primary {
  background: #1e3a8a;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  display: inline-block;
}

.btn-primary:hover {
  background: #1e40af;
}

.btn-secondary {
  background: white;
  border: 1px solid #d1d5db;
  color: #374151;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}

.btn-secondary:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

/* Card Styles */
.card {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  border: 1px solid #e5e7eb;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Section Styles */
.section-padding {
  padding: 4rem 0;
}

.bg-gray-50 {
  background: #f9fafb;
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* Feature Card */
.feature-card {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  border: 1px solid #e5e7eb;
  transition: box-shadow 0.2s;
}

.feature-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: #4b5563;
  margin-bottom: 1rem;
}

/* Protractor Tool */
.protractor-canvas {
  background: #f3f4f6;
  display: flex;
  justify-content: center;
  padding: 1rem;
}

canvas {
  background: white;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  max-width: 100%;
  height: auto;
  cursor: crosshair;
}

.control-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  padding: 1rem;
}

.slider-group {
  background: #f9fafb;
  padding: 0.75rem;
  border-radius: 0.75rem;
}

.slider-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.slider-group input[type="range"] {
  width: 100%;
}

.angle-badge {
  background: #1e3a8a;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Tutorial Steps */
.step-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.step-item {
  background: white;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.step-number {
  width: 48px;
  height: 48px;
  background: #1e3a8a;
  color: white;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
}

.step-title {
  font-size: 1.35rem;
  font-weight: 600;
}

.step-body {
  padding: 1.5rem;
}

.step-body ul {
  margin-left: 1.25rem;
  margin-bottom: 1rem;
  color: #4b5563;
}

.step-body li {
  margin: 0.5rem 0;
}

.pro-tip {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: #92400e;
}

/* Testimonial Card */
.testimonial-card {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  border: 1px solid #e5e7eb;
}

.stars {
  color: #fbbf24;
  margin-bottom: 0.5rem;
}

/* FAQ Styles */
.faq-item {
  border-bottom: 1px solid #e5e7eb;
  padding: 1rem 0;
}

.faq-question {
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
}

.faq-answer {
  display: none;
  padding-top: 0.5rem;
  color: #4b5563;
}

/* Application Card */
.application-card {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  border: 1px solid #e5e7eb;
}

.application-card h4 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.application-card ol {
  margin-left: 1.25rem;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #4b5563;
}

.application-card li {
  margin: 0.25rem 0;
}

/* Troubleshooting */
.troubleshoot-item {
  background: #fef2f2;
  border-left: 4px solid #dc2626;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

/* Badge */
.badge {
  background: #e0e7ff;
  color: #1e3a8a;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
  display: inline-block;
}

/* Points List */
.points-list {
  max-height: 280px;
  overflow-y: auto;
  font-size: 0.875rem;
}

.point-item {
  background: #f3f4f6;
  margin: 0.5rem 0;
  padding: 0.5rem;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.remove-point {
  background: #dc2626;
  border: none;
  color: white;
  border-radius: 4px;
  padding: 0 6px;
  cursor: pointer;
}

/* Footer */
footer {
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
  padding: 2rem 0;
  margin-top: 2rem;
}

/* CTA Section */
.cta-section {
  background: #1e3a8a;
  border-radius: 1rem;
  padding: 3rem 2rem;
  text-align: center;
  color: white;
}

/* Quick Angle Buttons */
.quick-angles {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.quick-angle {
  background: white;
  border: 1px solid #d1d5db;
  padding: 0.25rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.quick-angle:hover {
  background: #1e3a8a;
  color: white;
  border-color: #1e3a8a;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
  
  .section-padding {
    padding: 2rem 0;
  }
  
  .step-header {
    flex-direction: column;
    text-align: center;
  }
}