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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f8f9fa;
}

header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

header h1 {
  font-size: 2rem;
  font-weight: 700;
}

header h1 a {
  color: white;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

nav a {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-weight: 500;
}

nav a:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-1px);
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

#app {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  min-height: 400px;
}

#app h2 {
  color: #2d3748;
  margin-bottom: 1rem;
  font-size: 1.8rem;
}

.question-card, .answer-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  background: white;
  transition: all 0.3s ease;
}

.question-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.question-card a {
  color: #2b6cb0;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 600;
  display: block;
  margin-bottom: 0.5rem;
}

.question-card a:hover {
  color: #1a365d;
}

.answer-card {
  background: #f7fafc;
  border-left: 4px solid #4299e1;
}

.meta {
  color: #718096;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

form {
  margin-top: 2rem;
}

form input, form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  font-size: 1rem;
  margin-bottom: 1rem;
  transition: border-color 0.3s ease;
}

form input:focus, form textarea:focus {
  outline: none;
  border-color: #4299e1;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

form textarea {
  min-height: 120px;
  resize: vertical;
}

form button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.error {
  color: #e53e3e;
  background: #fed7d7;
  padding: 0.75rem;
  border-radius: 6px;
  margin-top: 1rem;
  border: 1px solid #feb2b2;
}

#app p {
  color: #4a5568;
  margin-bottom: 1rem;
}

#app a {
  color: #4299e1;
  text-decoration: none;
}

#app a:hover {
  text-decoration: underline;
}

/* Loading state */
#questions-list:empty::after {
  content: "Loading...";
  display: block;
  text-align: center;
  color: #718096;
  padding: 2rem;
}

/* Responsive design */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 1rem;
  }
  
  nav {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  main {
    padding: 1rem;
  }
  
  #app {
    padding: 1.5rem;
  }
}
