:root {
  color-scheme: dark;
  --glass-bg: rgba(30, 32, 46, 0.55);
  --glass-border: rgba(255, 255, 255, 0.14);
  --text: #f0f0f5;
  --text-dim: #a8a8b8;
  --accent: #7dd3fc;
  --accent2: #c084fc;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: #14141f;
}

body {
  background: radial-gradient(1200px 800px at 10% -10%, #2a1f4d 0%, transparent 60%),
              radial-gradient(1000px 700px at 110% 10%, #0f3d4a 0%, transparent 55%),
              linear-gradient(180deg, #14141f 0%, #0c0c14 100%);
  min-height: 100vh;
}

.bg-blobs { position: fixed; inset: 0; overflow: hidden; z-index: -1; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.35; }
.b1 { width: 480px; height: 480px; background: #7c3aed; top: -120px; left: -100px; }
.b2 { width: 420px; height: 420px; background: #06b6d4; top: 200px; right: -140px; }
.b3 { width: 380px; height: 380px; background: #db2777; bottom: -160px; left: 30%; }

.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand-title { font-weight: 700; font-size: 15px; letter-spacing: .3px; }
.brand-domain { color: var(--text-dim); font-size: 13px; }
.stats { color: var(--text-dim); font-size: 13px; }

.wrap { max-width: 900px; margin: 0 auto; padding: 12px 24px 80px; display: flex; flex-direction: column; gap: 20px; }

.calendar-card { padding: 24px 28px; }
.calendar-header { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.year-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.year-btn {
  border: 1px solid var(--glass-border); background: rgba(255,255,255,0.04); color: var(--text-dim);
  padding: 6px 14px; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 600;
}
.year-btn.active { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #131320; border-color: transparent; }

.month-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.month-block { background: rgba(255,255,255,0.03); border-radius: 14px; padding: 12px; }
.month-title { font-size: 13px; font-weight: 700; margin-bottom: 8px; color: var(--text-dim); }
.dow-row, .day-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.dow-cell { font-size: 10px; text-align: center; color: var(--text-dim); opacity: .6; padding-bottom: 4px; }
.day-cell {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: 10px; border-radius: 6px; color: var(--text-dim); position: relative;
}
.day-cell.has-capture {
  cursor: pointer; color: #131320; font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
}
.day-cell.has-capture:hover { outline: 2px solid rgba(255,255,255,0.6); }
.day-cell.empty { visibility: hidden; }
.calendar-empty { color: var(--text-dim); padding: 20px 0; text-align: center; }

.day-popover {
  position: fixed; z-index: 500; padding: 14px; min-width: 200px; max-height: 300px; overflow-y: auto;
}
.day-popover h4 { margin: 0 0 8px; font-size: 12px; color: var(--text-dim); }
.day-popover .time-row {
  padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; display: flex; justify-content: space-between;
}
.day-popover .time-row:hover { background: rgba(255,255,255,0.1); }
.day-popover .close-btn {
  position: absolute; top: 8px; right: 10px; cursor: pointer; color: var(--text-dim); background: none; border: none; font-size: 16px;
}

@media (max-width: 600px) {
  .topbar { padding: 16px; }
  .wrap { padding: 8px 12px 60px; }
}
