:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;
  --primary: #0f172a;
  --good: #22c55e;
  --notexists: #ef4444;
  --verify: #f97316;
  --disable: #6b7280;
  --unknown: #94a3b8;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
}

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

.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

h1 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.hint {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

textarea {
  width: 100%;
  padding: 1rem;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  resize: vertical;
  transition: border-color 0.15s;
}

textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.options-row {
  margin-bottom: 0.75rem;
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.option-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.input-number {
  width: 4rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.vps-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.vps-stats .stat {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.vps-stats .stat.cpu b { color: var(--primary); }
.vps-stats .stat.ram b { color: var(--verify); }

.actions-row {
  margin-bottom: 1rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.btn-import {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: inherit;
  color: white;
  background: var(--text-muted);
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-import:hover { opacity: 0.9; }

.btn-download {
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
  color: var(--primary);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  display: inline-block;
}

.btn-download:hover { opacity: 0.9; }
.btn-download.hidden { display: none; }

.results-actions {
  margin-bottom: 1rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.timestamp { font-size: 0.85rem; color: var(--text-muted); }

button {
  padding: 0.6rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: inherit;
  color: white;
  background: var(--primary);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity 0.15s;
}

button:hover {
  opacity: 0.9;
}

button:active {
  opacity: 0.8;
}

#exportBtn {
  margin-top: 1rem;
  background: var(--text-muted);
}

.loading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.loading.hidden {
  display: none;
}

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.results-section {
  margin-top: 2rem;
}

.results-section.hidden {
  display: none;
}

.results-section h2 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  font-weight: 600;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
}

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

tr:not(:last-child) td {
  border-bottom: 1px solid var(--border);
}

.status { font-weight: 500; }

.status.good { color: var(--good); }
.status.notexists { color: var(--notexists); }
.status.verify { color: var(--verify); }
.status.disable { color: var(--disable); }
.status.unknown { color: var(--unknown); }

.error {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: #fef2f2;
  color: #dc2626;
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.error.hidden {
  display: none;
}
