* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

header {
  background-color: #1976d2;
  padding: 15px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  display: none;
}

.header-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.search-box {
  width: 100%;
  max-width: 1000px;
}

.search-input {
  width: 100%;
  padding: 12px 20px;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  background-color: white;
  color: #333;
}

.search-input:focus {
  outline: 2px solid #0d47a1;
  outline-offset: 2px;
}

.upload-zone {
  background: white;
  border: 3px dashed #1976d2;
  border-radius: 10px;
  padding: 60px 20px;
  text-align: center;
  margin: 100px auto;
  max-width: 600px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.upload-zone:hover {
  background-color: #f0f8ff;
  transform: translateY(-2px);
}

.upload-zone h2 {
  color: #1976d2;
  margin-bottom: 15px;
  font-size: 1.8rem;
}

.upload-zone p {
  color: #666;
  margin-bottom: 25px;
  font-size: 1.1rem;
}

.upload-btn {
  background-color: #1976d2;
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 5px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color 0.3s;
  font-weight: 500;
}

.upload-btn:hover {
  background-color: #1565c0;
}

.file-input {
  display: none;
}

.loading {
  text-align: center;
  padding: 60px;
  font-size: 1.3rem;
  color: #1976d2;
  font-weight: 500;
}

.error {
  background-color: #ffebee;
  color: #c62828;
  padding: 20px;
  border-radius: 5px;
  margin: 20px 0;
  text-align: center;
  font-size: 1.1rem;
}

.question-card {
  background: white;
  border-radius: 8px;
  margin: 15px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.2s ease;
}

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

.question-header {
  padding: 18px 20px;
  background-color: #f8f9fa;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.question-header:hover {
  background-color: #e3f2fd;
}

.question-title {
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.question-number {
  background-color: #1976d2;
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-right: 10px;
  min-width: 30px;
  text-align: center;
}

.question-info {
  flex: 1;
}

.question-name-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}

.question-name {
  font-weight: 600;
  color: #1976d2;
  font-size: 1.1rem;
}

.question-preview {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.toggle-btn {
  background: none;
  border: none;
  font-size: 1rem;
  color: #666;
  cursor: pointer;
  padding: 5px;
  flex-shrink: 0;
  margin-left: 10px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  margin-top: 2px;
}

.question-content {
  padding: 0;
  display: none;
}

.question-content.expanded {
  display: block;
}

.question-text {
  padding: 25px;
  background-color: #f8f9fa;
  border-bottom: 1px solid #eee;
  line-height: 1.7;
  white-space: pre-wrap;
}

.answers-section {
  padding: 25px;
}

.answers-title {
  font-weight: 600;
  color: #333;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.answers-list {
  list-style: none;
}

.answer-item {
  padding: 12px 15px;
  margin: 10px 0;
  background-color: #f8f9fa;
  border-radius: 5px;
  border-left: 4px solid #ddd;
  display: block;
}

.answer-item.correct {
  border-left-color: #4caf50;
  background-color: #e8f5e9;
  color: #2e7d32;
}

.stats {
  text-align: center;
  padding: 15px;
  background-color: #e3f2fd;
  border-radius: 5px;
  margin: 20px 0;
  color: #1976d2;
  font-weight: 500;
  display: none;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #666;
  display: none;
}

.empty-state h3 {
  margin-bottom: 15px;
  color: #1976d2;
  font-size: 1.4rem;
}

.empty-state p {
  font-size: 1.1rem;
}

@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  .upload-zone {
    margin: 50px auto;
    padding: 40px 15px;
  }

  .question-header {
    padding: 15px;
  }

  .question-title {
    gap: 10px;
  }

  .question-number {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }

  .question-name {
    font-size: 1rem;
  }

  .question-preview {
    font-size: 0.9rem;
  }

  .question-text,
  .answers-section {
    padding: 20px;
  }

  .search-input {
    padding: 10px 15px;
  }

  .toggle-btn {
    font-size: 0.9rem;
    width: 22px;
    height: 22px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 10px;
  }

  .upload-zone {
    margin: 30px auto;
    padding: 30px 15px;
  }

  .upload-zone h2 {
    font-size: 1.5rem;
  }

  .question-name-line {
    flex-wrap: wrap;
  }

  .toggle-btn {
    font-size: 0.85rem;
    width: 20px;
    height: 20px;
  }
}