/* Shared styles - Inspired by modern minimal design */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');

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

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #fafafa;
  color: #0a0a0a;
  min-height: 100vh;
  line-height: 1.6;
}

/* Header */
.header {
  background: #ffffff;
  border-bottom: 1px solid #e5e5e5;
  padding: 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
}

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

.header h1 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 2px;
  color: #0a0a0a;
}

.header p {
  font-size: 13px;
  color: #666;
  font-weight: 400;
}

.back-btn {
  background: #0a0a0a;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.back-btn:hover {
  background: #333;
  transform: translateY(-1px);
}

/* Container */
.container {
  max-width: 900px;
  margin: 30px auto;
  padding: 0 20px;
}

.card {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  border: 1px solid #e5e5e5;
  margin-bottom: 20px;
}

/* Info Box */
.info-box {
  background: #f5f5f5;
  border-left: 3px solid #0a0a0a;
  padding: 16px;
  border-radius: 6px;
  margin-bottom: 24px;
  font-size: 14px;
  color: #333;
  line-height: 1.7;
}

.info-box strong { 
  color: #0a0a0a;
  font-weight: 600;
}

/* Form Elements */
textarea, input[type="text"], input[type="email"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s;
  background: #fafafa;
  color: #0a0a0a;
}

textarea {
  min-height: 180px;
  font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
  resize: vertical;
  line-height: 1.6;
}

textarea:focus, input:focus {
  outline: none;
  border-color: #0a0a0a;
  background: white;
}

/* Buttons */
.btn {
  width: 100%;
  padding: 14px;
  background: #0a0a0a;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 16px;
  font-family: inherit;
}

.btn:hover {
  background: #333;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn:active {
  transform: scale(0.98);
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.stat-card {
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  border: 1px solid;
  background: white;
}

.stat-card.live, .stat-card.good { 
  border-color: #10b981;
  background: #f0fdf4;
}
.stat-card.die, .stat-card.not-exist { 
  border-color: #ef4444;
  background: #fef2f2;
}
.stat-card.disabled { 
  border-color: #f59e0b;
  background: #fffbeb;
}
.stat-card.unknown { 
  border-color: #6b7280;
  background: #f9fafb;
}

.stat-number {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 4px;
  color: #0a0a0a;
}

.stat-label {
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
  opacity: 0.7;
}

/* Results */
.results {
  max-height: 500px;
  overflow-y: auto;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  margin-top: 20px;
  background: white;
}

.result-item {
  padding: 14px 16px;
  border-bottom: 1px solid #f5f5f5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  transition: background 0.2s;
}

.result-item:hover {
  background: #fafafa;
}

.result-item:last-child { 
  border-bottom: none; 
}

.result-text {
  font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
  flex: 1;
  word-break: break-all;
  font-size: 13px;
}

.result-info {
  font-size: 12px;
  color: #666;
  margin: 0 12px;
  font-weight: 500;
}

.result-status {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.status-live, .status-good { 
  background: #d1fae5;
  color: #065f46;
}
.status-die, .status-not-exist { 
  background: #fee2e2;
  color: #991b1b;
}
.status-disabled { 
  background: #fef3c7;
  color: #92400e;
}
.status-unknown { 
  background: #f3f4f6;
  color: #374151;
}

/* Download Buttons */
.download-btns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.btn-download {
  padding: 10px 14px;
  border: 1.5px solid;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-download:hover { 
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn-download:active { 
  transform: scale(0.98); 
}

.btn-download.live, .btn-download.good { 
  border-color: #10b981;
  color: #065f46;
}
.btn-download.live:hover, .btn-download.good:hover {
  background: #f0fdf4;
}

.btn-download.die, .btn-download.not-exist { 
  border-color: #ef4444;
  color: #991b1b;
}
.btn-download.die:hover, .btn-download.not-exist:hover {
  background: #fef2f2;
}

.btn-download.disabled { 
  border-color: #f59e0b;
  color: #92400e;
}
.btn-download.disabled:hover {
  background: #fffbeb;
}

.btn-download.unknown { 
  border-color: #6b7280;
  color: #374151;
}
.btn-download.unknown:hover {
  background: #f9fafb;
}

/* Loading */
.loading {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.spinner {
  border: 3px solid #f5f5f5;
  border-top: 3px solid #0a0a0a;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
  .header h1 { font-size: 18px; }
  .card { padding: 24px 20px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat-number { font-size: 28px; }
  .container { margin: 20px auto; }
}

/* Scrollbar */
.results::-webkit-scrollbar {
  width: 8px;
}

.results::-webkit-scrollbar-track {
  background: #f5f5f5;
}

.results::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

.results::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}
