:root {
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
  --bg: #ffffff;
  --surface: #f8fafc;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
  --primary: #60a5fa;
  --primary-hover: #3b82f6;
  --success: #34d399;
  --error: #f87171;
  --warning: #fbbf24;
  --bg: #0f172a;
  --surface: #1e293b;
  --border: #334155;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 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;
  padding: 20px;
}

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

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

.header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: var(--primary);
}

.subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Search Section */
.search-section {
  background: var(--surface);
  padding: 30px;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 30px;
  box-shadow: var(--shadow);
}

.input-group {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.domain-input {
  flex: 1;
  padding: 14px 18px;
  font-size: 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s;
}

.domain-input:focus {
  outline: none;
  border-color: var(--primary);
}

.btn {
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

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

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

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

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

/* Record Types */
.record-types {
  margin-bottom: 20px;
}

.record-type-label {
  display: block;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

.record-type-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.record-btn {
  padding: 8px 16px;
  border: 2px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

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

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

/* DNS Server Selector */
.dns-server-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dns-server-label {
  font-weight: 600;
  color: var(--text);
}

.dns-server-select {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}

/* Examples */
.examples-section {
  margin-bottom: 30px;
}

.examples-label {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.examples {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.example-btn {
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

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

/* Loading */
.loading {
  text-align: center;
  padding: 40px;
}

.spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 20px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hidden {
  display: none;
}

/* Error Message */
.error-message {
  background: #fef2f2;
  color: #991b1b;
  padding: 16px 20px;
  border-radius: 8px;
  border-left: 4px solid var(--error);
  margin-bottom: 20px;
}

[data-theme="dark"] .error-message {
  background: #7f1d1d;
  color: #fecaca;
}

/* Results */
.results-section {
  margin-bottom: 40px;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.results-header h2 {
  font-size: 1.8rem;
  color: var(--text);
}

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

.results-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Record Card */
.record-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.record-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

.record-type-badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--primary);
  color: white;
  border-radius: 4px;
  font-weight: 600;
  font-size: 14px;
}

.record-count {
  color: var(--text-muted);
  font-size: 14px;
}

.record-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.record-item {
  padding: 12px 16px;
  background: var(--bg);
  border-radius: 6px;
  border: 1px solid var(--border);
  font-family: 'Courier New', monospace;
  font-size: 14px;
  word-break: break-all;
}

.record-item-label {
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.record-value {
  color: var(--text);
  font-weight: 500;
}

.record-ttl {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 4px;
}

/* Info Section */
.info-section {
  background: var(--surface);
  padding: 30px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.info-section h3 {
  color: var(--text);
  margin-bottom: 12px;
  font-size: 1.5rem;
}

.info-section h4 {
  color: var(--text);
  margin-top: 24px;
  margin-bottom: 12px;
  font-size: 1.2rem;
}

.info-section p {
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.8;
}

.record-info-list {
  list-style: none;
  padding: 0;
}

.record-info-list li {
  padding: 10px 0;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.record-info-list li:last-child {
  border-bottom: none;
}

.record-info-list strong {
  color: var(--primary);
  font-weight: 600;
  margin-right: 8px;
}

/* Responsive */
@media (max-width: 768px) {
  .header h1 {
    font-size: 2rem;
  }

  .input-group {
    flex-direction: column;
  }

  .dns-server-section {
    flex-direction: column;
    align-items: stretch;
  }

  .results-header {
    flex-direction: column;
    align-items: stretch;
  }

  .results-actions {
    width: 100%;
  }

  .results-actions .btn {
    flex: 1;
  }

  .record-type-buttons {
    justify-content: center;
  }
}
