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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #0f1117;
  color: #e1e4e8;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
}

.container {
  width: 100%;
  max-width: 600px;
  padding: 0 1.5rem;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.subtitle {
  color: #8b949e;
  margin-bottom: 2rem;
}

/* Search */
.search-box {
  display: flex;
  gap: 0.5rem;
}

#domain-input {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid #30363d;
  border-radius: 8px;
  background: #161b22;
  color: #e1e4e8;
  outline: none;
  transition: border-color 0.15s;
}

#domain-input:focus {
  border-color: #58a6ff;
}

#search-btn {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  background: #238636;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
}

#search-btn:hover {
  background: #2ea043;
}

#search-btn:disabled {
  background: #21262d;
  color: #484f58;
  cursor: not-allowed;
}

/* Result card */
.result {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  border-radius: 10px;
  border: 1px solid #30363d;
  background: #161b22;
}

.result.hidden {
  display: none;
}

.result.available {
  border-color: #238636;
}

.result.taken {
  border-color: #f85149;
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.result-domain {
  font-size: 1.25rem;
  font-weight: 600;
  word-break: break-all;
}

.badge {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge.available {
  background: rgba(35, 134, 54, 0.2);
  color: #3fb950;
}

.badge.taken {
  background: rgba(248, 81, 73, 0.15);
  color: #f85149;
}

.detail-row {
  font-size: 0.85rem;
  color: #8b949e;
  margin-bottom: 0.5rem;
}

.pricing-row {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.price-item {
  display: flex;
  flex-direction: column;
}

.price-label {
  font-size: 0.75rem;
  color: #8b949e;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.price-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: #e1e4e8;
}

/* Suggestions */
.suggestions {
  margin-top: 1.5rem;
}

.suggestions.hidden {
  display: none;
}

.suggestions h3 {
  font-size: 0.9rem;
  color: #8b949e;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.suggestions-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.suggestion-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid #30363d;
  background: #161b22;
  cursor: pointer;
  transition: border-color 0.15s;
}

.suggestion-card:hover {
  border-color: #58a6ff;
}

.suggestion-domain {
  font-weight: 500;
}

.suggestion-price {
  color: #8b949e;
  font-size: 0.9rem;
}

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid #30363d;
  border-top-color: #58a6ff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 0.5rem;
}

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

.error-text {
  color: #f85149;
}
