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

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #64748b;
  --accent: #0ea5e9;
  --success: #10b981;
  --bg: #f8fafc;
  --bg-white: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.1);
}

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

.app-container {
  min-height: 100vh;
}

.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 48px;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.logo-icon {
  width: 36px;
  height: 36px;
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--primary);
}

.nav-btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.nav-btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.nav-btn.secondary:hover {
  background: var(--bg);
}

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

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

.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero {
  padding: 80px 0;
  text-align: center;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.subtitle {
  font-size: 1.5rem;
  color: var(--text-light);
  margin-bottom: 24px;
}

.description {
  font-size: 1.125rem;
  color: var(--text);
  max-width: 700px;
  margin: 0 auto 32px;
}

.hero-features {
  text-align: left;
  max-width: 700px;
  margin: 0 auto 24px;
}

.feature-item {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px;
  background: var(--bg-white);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.check-icon {
  color: var(--success);
  font-weight: bold;
  flex-shrink: 0;
}

.mission-note {
  color: var(--text-light);
  font-style: italic;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.btn-primary, .btn-secondary {
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-size: 1rem;
}

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

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

.btn-secondary {
  background: var(--bg-white);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg);
}

.btn-full {
  width: 100%;
}

.mission-section {
  padding: 60px 0;
}

.mission-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white;
  padding: 48px;
  border-radius: 20px;
  text-align: center;
}

.mission-card h2 {
  font-size: 1.75rem;
  margin-bottom: 16px;
}

.mission-card p {
  font-size: 1.125rem;
  line-height: 1.8;
  opacity: 0.95;
  max-width: 800px;
  margin: 0 auto;
}

.guide-section {
  padding: 60px 0;
}

.guide-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 40px;
  color: var(--text);
}

.accordion {
  max-width: 800px;
  margin: 0 auto;
}

.accordion-item {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}

.accordion-header {
  width: 100%;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
}

.accordion-header:hover {
  background: var(--bg);
}

.accordion-icon {
  font-size: 1.5rem;
  color: var(--primary);
  transition: transform 0.3s;
}

.accordion-item.active .accordion-icon {
  transform: rotate(45deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 24px;
}

.accordion-item.active .accordion-content {
  max-height: 1000px;
  padding: 0 24px 24px;
}

.accordion-content h4 {
  color: var(--primary);
  margin: 16px 0 8px;
  font-size: 1rem;
}

.accordion-content ul {
  margin-left: 20px;
  color: var(--text-light);
}

.accordion-content li {
  margin-bottom: 8px;
}

.accordion-content .note {
  background: #fef3c7;
  padding: 12px 16px;
  border-radius: 8px;
  margin-top: 16px;
  color: #92400e;
}

.tools-section {
  padding: 60px 0;
}

.tools-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 32px;
}

.tools-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
}

.tab-btn {
  padding: 12px 24px;
  border: none;
  background: var(--bg-white);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-light);
  transition: all 0.2s;
  border: 1px solid var(--border);
}

.tab-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.tools-grid.hidden {
  display: none;
}

.tool-card {
  background: var(--bg-white);
  padding: 28px;
  border-radius: 16px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.tool-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.tool-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--text);
}

.tool-card p {
  font-size: 0.9rem;
  color: var(--text-light);
}

.feedback-section {
  padding: 60px 0 80px;
  text-align: center;
}

.feedback-section h2 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.feedback-section > p {
  color: var(--text-light);
  margin-bottom: 32px;
}

.feedback-form {
  max-width: 500px;
  margin: 0 auto;
  text-align: left;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: var(--bg-white);
  padding: 40px;
  border-radius: 20px;
  max-width: 450px;
  width: 90%;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.tool-modal-content {
  max-width: 800px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
}

.modal-close:hover {
  color: var(--text);
}

.auth-switch {
  text-align: center;
  margin-top: 20px;
  color: var(--text-light);
}

.auth-switch a {
  color: var(--primary);
  font-weight: 500;
}

#tool-container {
  min-height: 400px;
}

#tool-container h2 {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-interface {
  display: flex;
  flex-direction: column;
  height: 500px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: var(--bg);
  border-radius: 12px;
  margin-bottom: 16px;
}

.chat-message {
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 12px;
  max-width: 85%;
}

.chat-message.user {
  background: var(--primary);
  color: white;
  margin-left: auto;
}

.chat-message.assistant {
  background: var(--bg-white);
  border: 1px solid var(--border);
}

.chat-input-container {
  display: flex;
  gap: 12px;
}

.chat-input-container textarea {
  flex: 1;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  resize: none;
  font-family: inherit;
}

.chat-input-container button {
  padding: 14px 24px;
}

@media (max-width: 768px) {
  .top-nav {
    padding: 12px 20px;
  }
  
  .nav-links {
    display: none;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .subtitle {
    font-size: 1.25rem;
  }
  
  .hero-actions {
    flex-direction: column;
  }
  
  .mission-card {
    padding: 32px 24px;
  }
  
  .tools-grid {
    grid-template-columns: 1fr;
  }
}
