:root {
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.12);
  --text-main: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.75);
  --accent: #64ffda;
  --accent-glow: rgba(100, 255, 218, 0.35);
  --dot-off: rgba(255, 255, 255, 0.1);
}

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

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(-45deg, #0a192f, #112240, #1d3b66, #0f2027);
  background-size: 400% 400%;
  animation: gradientBG 20s ease infinite;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.bg-animation {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
}
.bg-animation::before, .bg-animation::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.35; animation: float 18s infinite ease-in-out;
}
.bg-animation::before { width: 700px; height: 700px; background: #2a9d8f; top: -15%; left: -10%; }
.bg-animation::after { width: 600px; height: 600px; background: #e76f51; bottom: -15%; right: -10%; animation-delay: -6s; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -40px) scale(1.15); }
  66% { transform: translate(-30px, 30px) scale(0.9); }
}

.dashboard { width: 100%; max-width: 1400px; display: flex; flex-direction: column; gap: 28px; }

.glass-header {
  text-align: center; padding: 24px;
  background: var(--glass-bg); backdrop-filter: blur(18px) saturate(180%); -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid var(--glass-border); border-radius: 24px;
}
.glass-header h1 { font-size: 1.9rem; font-weight: 500; letter-spacing: -0.5px; }
#header-date { color: var(--text-muted); margin-top: 6px; font-size: 0.95rem; }

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

.panel {
  background: var(--glass-bg); backdrop-filter: blur(22px) saturate(190%); -webkit-backdrop-filter: blur(22px) saturate(190%);
  border: 1px solid var(--glass-border); border-radius: 24px; padding: 32px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.35), inset 0 0 0 1px rgba(255,255,255,0.06);
  display: flex; flex-direction: column; transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.panel:hover { transform: translateY(-4px); box-shadow: 0 14px 48px rgba(0,0,0,0.45), inset 0 0 0 1px rgba(255,255,255,0.12); }

.panel h2 { font-size: 1.35rem; margin-bottom: 22px; font-weight: 500; letter-spacing: -0.3px; opacity: 0.95; }

/* Klocka */
.clock-panel { text-align: center; align-items: center; }
#digital-time { font-size: clamp(2.8rem, 7vw, 4.2rem); font-weight: 600; letter-spacing: -1px; margin: 12px 0; text-shadow: 0 0 18px var(--accent-glow); }
.binary-clock { display: flex; justify-content: center; gap: 14px; margin-top: 24px; }
.bin-col { display: flex; flex-direction: column-reverse; gap: 9px; }
.dot { width: 15px; height: 15px; border-radius: 50%; background: var(--dot-off); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.dot.active { background: var(--accent); box-shadow: 0 0 14px var(--accent), 0 0 5px #fff; transform: scale(1.2); }
.sec-col .dot.active { background: #ff6b9d; box-shadow: 0 0 14px #ff6b9d; }

/* Väder */
.weather-current { display: flex; align-items: center; justify-content: space-around; padding: 18px; background: rgba(255,255,255,0.04); border-radius: 16px; margin-bottom: 16px; }
.temp-big { font-size: 3.2rem; font-weight: bold; line-height: 1; }
.weather-icon { font-size: 4.2rem; line-height: 1; }
.forecast-grid { display: grid; gap: 8px; max-height: 220px; overflow-y: auto; padding-right: 6px; }
.day-card { background: rgba(255,255,255,0.05); padding: 14px; border-radius: 14px; display: flex; justify-content: space-between; align-items: center; font-size: 0.9rem; transition: background 0.2s; }
.day-card:hover { background: rgba(255,255,255,0.1); }

/* Namn */
.name-highlight { font-size: 1.7rem; color: var(--accent); margin-bottom: 24px; text-align: center; line-height: 1.4; word-break: break-word; }
.names-panel ul { list-style: none; padding: 0; max-height: 260px; overflow-y: auto; }
.names-panel li { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.08); display: flex; justify-content: space-between; font-size: 0.9rem; }

/* Inställningar */
.settings-panel { text-align: center; align-items: center; }
.btn-glass { background: rgba(255,255,255,0.08); border: 1px solid var(--glass-border); color: white; padding: 11px 26px; border-radius: 10px; cursor: pointer; margin-top: 18px; transition: all 0.2s; font-weight: 500; }
.btn-glass:hover { background: rgba(255,255,255,0.18); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.3); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 4px; }

@media (max-width: 768px) {
  .grid-layout { grid-template-columns: 1fr; gap: 20px; }
  body { padding: 12px; align-items: flex-start; }
  .dashboard { gap: 18px; }
  .panel { padding: 24px; }
}
