:root {
  --bg: #0f172a;
  --panel: #1e293b;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
  --border: rgba(255, 255, 255, 0.1);
}

body.light {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --accent: #0284c7;
  --accent-gradient: linear-gradient(135deg, #0284c7 0%, #4f46e5 100%);
  --border: rgba(0, 0, 0, 0.1);
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  height: 100vh;
}

.top-brand {
  position: absolute;
  top: 4px;
  right: 12px;
  text-decoration: none;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: uppercase;
  z-index: 100;
  opacity: 0.7;
  transition: all 0.3s;
}

.top-brand:hover {
  opacity: 1;
  transform: scale(1.05);
}

.widget-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 10px;
  position: relative;
}

.current-weather {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 8px;
  background: var(--panel);
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.current-weather > div {
  min-width: 0;
}

.current-temp {
  font-size: 32px;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: 4px;
}

.location-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.weather-icon {
  width: 48px;
  height: 48px;
}

.forecast-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  flex-grow: 1;
}

.forecast-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 10px 4px;
  background: var(--panel);
  border-radius: 8px;
  border: 1px solid var(--border);
  text-align: center;
  min-height: 100px;
}

.day-name {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.forecast-icon {
  width: 32px;
  height: 32px;
  margin: 2px 0;
}

.temp-max {
  font-size: 13px;
  font-weight: 700;
}

.temp-min {
  font-size: 11px;
  color: var(--muted);
}


@media (max-width: 400px) {
  .current-temp { font-size: 24px; }
  .day-name { font-size: 9px; }
  .temp-max { font-size: 11px; }
  .temp-min { font-size: 9px; }
}
