:root {
  --bg: #101114;
  --card: #1d1f25;
  --border: #333743;
  --text: #eeeeee;
  --muted: #a8a8a8;
  --accent: #8ab4ff;
  --error: #ff7777;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: radial-gradient(circle at top, #1b2130, var(--bg));
  color: var(--text);
}

.container {
  width: min(1200px, calc(100% - 32px));
  margin: 24px auto;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

h1 {
  margin: 0 0 6px;
  font-size: 30px;
}

h2 {
  margin: 0 0 14px;
  font-size: 18px;
  color: var(--muted);
}

#status {
  margin: 0;
  color: var(--muted);
}

.error {
  color: var(--error);
  font-weight: bold;
  margin: 8px 0 0;
}

.links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.links a {
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.card {
  background: rgba(29, 31, 37, 0.92);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.22);
}

.weather-main {
  grid-column: span 2;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.main-temp {
  font-size: clamp(46px, 7vw, 76px);
  font-weight: 800;
  margin-bottom: 18px;
  letter-spacing: -2px;
}

.details {
  font-size: 20px;
  line-height: 36px;
  color: var(--muted);
}

.details strong,
.metric-line strong {
  color: var(--text);
}

.compact {
  font-size: 17px;
  line-height: 30px;
}

.metric-line {
  font-size: 18px;
  line-height: 34px;
  color: var(--muted);
}

.wind-card {
  text-align: center;
}

.compass {
  width: 170px;
  height: 170px;
  border: 2px solid var(--border);
  border-radius: 50%;
  margin: 8px auto 12px;
  position: relative;
  background: radial-gradient(circle, rgba(138,180,255,0.13), rgba(255,255,255,0.02));
}

.compass-label {
  position: absolute;
  font-weight: 700;
  color: var(--muted);
}

.compass-label.n { top: 8px; left: 50%; transform: translateX(-50%); }
.compass-label.e { right: 10px; top: 50%; transform: translateY(-50%); }
.compass-label.s { bottom: 8px; left: 50%; transform: translateX(-50%); }
.compass-label.w { left: 10px; top: 50%; transform: translateY(-50%); }

.needle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 68px;
  background: linear-gradient(to top, transparent 0%, var(--accent) 25%, #ffffff 100%);
  transform-origin: 50% 100%;
  transform: translate(-50%, -100%) rotate(0deg);
  border-radius: 999px;
  transition: transform 0.5s ease;
}

.center-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text);
  transform: translate(-50%, -50%);
}

.wind-direction {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 10px;
}

@media (max-width: 700px) {
  .weather-main { grid-column: span 1; }
  .details { font-size: 18px; line-height: 32px; }
}
