:root {
  --primary: #4F46E5;
  --primary-hover: #4338CA;
  --secondary: #10B981;
  --secondary-hover: #059669;
  --bg: #F9FAFB;
  --card-bg: #FFFFFF;
  --text: #111827;
  --text-light: #6B7280;
  --border: #E5E7EB;
  --error: #EF4444;
  --success: #10B981;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
}

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

/* 图标样式 */
.icon {
  width: 24px;
  height: 24px;
  vertical-align: middle;
  margin-right: 8px;
  color: inherit;
}

.success-icon .icon {
  width: 48px;
  height: 48px;
  margin: 0;
}

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

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

.header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  margin-bottom: 40px;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 20px;
}

.nav a {
  color: var(--text-light);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radius);
  transition: all 0.2s;
}

.nav a:hover {
  background: var(--bg);
  color: var(--primary);
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
  margin-bottom: 20px;
}

.card-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text);
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  font-size: 14px;
}

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

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

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

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

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

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-block {
  display: block;
  width: 100%;
  text-align: center;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text);
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
}

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

.form-help {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.alert-success {
  background: #D1FAE5;
  color: #065F46;
}

.alert-error {
  background: #FEE2E2;
  color: #991B1B;
}

.alert-info {
  background: #DBEAFE;
  color: #1E40AF;
}

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

.hero h1 {
  font-size: 48px;
  margin-bottom: 20px;
  color: var(--text);
}

.hero p {
  font-size: 18px;
  color: var(--text-light);
  margin-bottom: 40px;
}

.search-box {
  max-width: 500px;
  margin: 0 auto;
}

.search-box input {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 16px;
}

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

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 60px;
}

.feature-card {
  background: var(--card-bg);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.feature-card h3 {
  margin-bottom: 10px;
  color: var(--primary);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.admin-card {
  background: var(--card-bg);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: var(--text);
}

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

.admin-card h3 {
  margin-bottom: 10px;
  color: var(--primary);
}

.admin-card p {
  color: var(--text-light);
  font-size: 14px;
}

.question-list {
  margin-bottom: 30px;
}

.question-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 15px;
}

.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.question-type {
  background: var(--bg);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-light);
}

.required-tag {
  color: var(--error);
  font-weight: bold;
  margin-left: 4px;
}

.optional-tag {
  color: var(--text-light);
  font-size: 11px;
  margin-left: 4px;
}

.question-text {
  font-weight: 500;
  margin-bottom: 10px;
}

.question-options {
  padding-left: 20px;
}

.option-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  font-weight: 600;
  color: var(--text);
  background: var(--bg);
}

tr:hover {
  background: var(--bg);
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.badge-active {
  background: #D1FAE5;
  color: #065F46;
}

.badge-inactive {
  background: #FEE2E2;
  color: #991B1B;
}

.actions {
  display: flex;
  gap: 10px;
}

.text-center {
  text-align: center;
}

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-20 {
  gap: 20px;
}

.footer {
  text-align: center;
  padding: 40px 0;
  color: var(--text-light);
  margin-top: 60px;
  border-top: 1px solid var(--border);
}

@media (max-width: 768px) {
  .header .container {
    flex-direction: column;
    gap: 20px;
  }

  .hero h1 {
    font-size: 32px;
  }

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

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

  .card {
    padding: 20px;
  }

  .table-wrapper {
    font-size: 14px;
  }
}

.radio-group, .checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.radio-item, .checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
}

.radio-item:hover, .checkbox-item:hover {
  border-color: var(--primary);
  background: var(--bg);
}

.radio-item input, .checkbox-item input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.survey-header {
  text-align: center;
  margin-bottom: 40px;
}

.survey-code {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 10px;
}

.survey-code span {
  background: var(--bg);
  padding: 4px 12px;
  border-radius: 4px;
  font-family: monospace;
}

.success-message {
  text-align: center;
  padding: 60px 20px;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: #D1FAE5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 40px;
  color: #065F46;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--bg);
  padding: 20px;
  border-radius: var(--radius);
  text-align: center;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 5px;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  padding-right: 40px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.remove-btn {
  color: var(--error);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.remove-btn:hover {
  opacity: 0.7;
}

.add-question-btn {
  width: 100%;
  padding: 15px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: none;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s;
}

.add-question-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.options-container {
  margin-top: 10px;
  padding-left: 10px;
}

.option-input {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.option-input input {
  flex: 1;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.login-card {
  max-width: 400px;
  margin: 0 auto;
}