@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap');

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

html, body {
  height: 100%;
}

body {
  font-family: 'Space Mono', monospace;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  transition: background 0.5s;
}

/* Themes — derived from andressacosta.me palette (#8C00FF, #00C2FF, #FE00B0) */
body.theme-go {
  background: #1a0a33;
  color: #c084fc;
}

body.theme-caution {
  background: #2e0a2a;
  color: #fe7eb8;
}

body.theme-stop {
  background: #2e0a1a;
  color: #ff6b9d;
}

body.theme-chill {
  background: #0a1a2e;
  color: #00c2ff;
}

body.theme-loading {
  background: #0d0d14;
  color: #555;
}

.screen {
  text-align: center;
  padding: 24px;
  max-width: 600px;
  width: 100%;
}

.hidden {
  display: none !important;
}

/* Loading */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #222;
  border-top-color: #8C00FF;
  border-right-color: #00C2FF;
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: spin 0.8s linear infinite;
}

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

.loading-text {
  font-size: 1rem;
  opacity: 0.6;
}

/* Main content */
.top-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.5;
  margin-bottom: 24px;
}

.big-text {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
}

.theme-go .big-text {
  background: linear-gradient(135deg, #8C00FF, #00C2FF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.theme-chill .big-text {
  background: linear-gradient(135deg, #00C2FF, #FE00B0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.theme-caution .big-text {
  background: linear-gradient(135deg, #FE00B0, #8C00FF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sub-text {
  font-size: clamp(1rem, 3vw, 1.3rem);
  opacity: 0.7;
  line-height: 1.5;
  max-width: 480px;
  margin: 0 auto;
}

/* Best city highlight */
.city-highlight {
  margin-top: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.city-highlight .arrow {
  font-size: 2.5rem;
}

.city-detail {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.city-name {
  font-size: 1.5rem;
  font-weight: 700;
}

.city-note {
  font-size: 0.85rem;
  opacity: 0.6;
}

/* Alternatives */
.alternatives {
  margin-top: 40px;
}

.alt-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.35;
  margin-bottom: 12px;
}

.alt-item {
  display: inline-block;
  padding: 6px 14px;
  margin: 4px;
  border: 1px solid;
  border-radius: 999px;
  font-size: 0.8rem;
  opacity: 0.5;
  font-family: 'Space Mono', monospace;
  cursor: pointer;
  transition: opacity 0.2s;
}

.alt-item:hover {
  opacity: 0.9;
}

/* Weather bar */
.weather-bar {
  margin-top: 48px;
  font-size: 0.8rem;
  opacity: 0.4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dot::before {
  content: '\00B7';
}

/* Settings */
.settings-bar {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.75rem;
  opacity: 0.3;
  transition: opacity 0.2s;
}

.settings-bar:hover {
  opacity: 0.7;
}

.settings-bar label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.settings-bar input[type="range"] {
  width: 80px;
  accent-color: currentColor;
}

button {
  font-family: 'Space Mono', monospace;
  background: none;
  color: inherit;
  border: 1px solid;
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 0.75rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

button:hover {
  opacity: 1;
}

/* Error */
#error .sub-text {
  margin-bottom: 24px;
}

#error button {
  font-size: 0.9rem;
  padding: 8px 20px;
}

/* City search fallback */
.search-box {
  display: flex;
  gap: 8px;
  margin-top: 32px;
  justify-content: center;
}

.search-box input {
  font-family: 'Space Mono', monospace;
  font-size: 1rem;
  padding: 10px 16px;
  border: 1px solid #444;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
  outline: none;
  width: 240px;
  transition: border-color 0.2s;
}

.search-box input:focus {
  border-color: #8C00FF;
}

.search-box button {
  font-size: 1rem;
  padding: 10px 20px;
}

.city-results {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.city-result-item {
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  padding: 8px 20px;
  border: 1px solid #333;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  cursor: pointer;
  transition: border-color 0.2s, opacity 0.2s;
  opacity: 0.6;
  width: 300px;
  text-align: left;
}

.city-result-item:hover {
  opacity: 1;
  border-color: #8C00FF;
}

/* Language toggle */
.lang-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 4px;
  z-index: 10;
}

.lang-btn {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  padding: 4px 10px;
  background: none;
  color: inherit;
  border: 1px solid;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.3;
  transition: opacity 0.2s;
}

.lang-btn:hover {
  opacity: 0.8;
}

.lang-btn.active {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}

/* Footer */
footer {
  position: fixed;
  bottom: 16px;
  font-size: 0.65rem;
  opacity: 0.25;
  text-align: center;
  font-family: 'Space Mono', monospace;
}

footer a {
  color: inherit;
  text-decoration: underline;
}
