/* Reset & biến */
:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-card: #1c2128;
  --bg-hover: #21262d;
  --border: #30363d;
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --accent: #58a6ff;
  --accent-hover: #79c0ff;
  --success: #3fb950;
  --warning: #d29922;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  text-align: center;
  padding: 48px 24px 32px;
  background: linear-gradient(180deg, rgba(88, 166, 255, 0.08) 0%, transparent 100%);
}

.header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.subtitle {
  color: var(--text-secondary);
  margin-top: 8px;
  font-size: 1rem;
}

/* Container */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 64px;
  flex: 1;
  width: 100%;
}

/* Search */
.search-section {
  margin-bottom: 40px;
}

.search-box {
  display: flex;
  gap: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  transition: border-color 0.2s;
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15);
}

.search-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 1.1rem;
  padding: 12px 16px;
}

.search-box input::placeholder {
  color: var(--text-secondary);
}

.search-box button {
  background: var(--accent);
  color: #0d1117;
  border: none;
  border-radius: 8px;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.search-box button:hover {
  background: var(--accent-hover);
}

.hint {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-top: 12px;
  text-align: center;
}

.hint code {
  background: var(--bg-card);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--accent);
}

/* Result Card */
.result-section {
  margin-bottom: 40px;
}

.result-section.hidden {
  display: none;
}

.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.result-card .result-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.result-item {
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 16px;
}

.result-item .label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.result-item .value {
  font-size: 1.15rem;
  font-weight: 600;
}

.result-item .value.accent {
  color: var(--accent);
}

.result-item .value.success {
  color: var(--success);
}

.result-item .value.warning {
  color: var(--warning);
}

.no-result {
  text-align: center;
  color: var(--text-secondary);
  padding: 24px;
  font-size: 1.05rem;
}

/* Table */
.table-section h2 {
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead {
  background: var(--bg-secondary);
  position: sticky;
  top: 0;
}

th {
  text-align: left;
  padding: 14px 16px;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--bg-hover);
}

td:first-child {
  font-family: 'SF Mono', 'Fira Code', monospace;
  color: var(--accent);
  font-weight: 600;
}

/* Footer */
.footer {
  text-align: center;
  padding: 24px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 600px) {
  .header h1 {
    font-size: 1.4rem;
  }
  .search-box {
    flex-direction: column;
  }
  .search-box button {
    width: 100%;
  }
  .result-grid {
    grid-template-columns: 1fr;
  }
}