.widget {
  border-radius: var(--radius);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}

.glass {
  background: linear-gradient(165deg, rgba(255,255,255,0.06), rgba(255,255,255,0.01) 40%), var(--bg-panel);
  border: 1px solid rgba(255,255,255,0.14);
  border-top-color: rgba(255,255,255,0.28);
  backdrop-filter: blur(24px) saturate(165%);
  -webkit-backdrop-filter: blur(24px) saturate(165%);
  box-shadow:
    0 10px 36px rgba(0,0,0,0.4),
    inset 0 1px 1px rgba(255,255,255,0.18),
    inset 0 0 24px rgba(255,255,255,0.03);
}

/* subtle rain-on-glass shimmer: soft diagonal glare + drifting droplet highlights */
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,0.05) 0, transparent 3%),
    radial-gradient(circle at 70% 55%, rgba(255,255,255,0.04) 0, transparent 2.5%),
    radial-gradient(circle at 40% 80%, rgba(255,255,255,0.05) 0, transparent 2%),
    radial-gradient(circle at 85% 15%, rgba(255,255,255,0.03) 0, transparent 2%),
    linear-gradient(115deg, transparent 40%, rgba(255,255,255,0.035) 50%, transparent 60%);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 220% 220%;
  animation: glassDrift 14s ease-in-out infinite;
  mix-blend-mode: screen;
}

@keyframes glassDrift {
  0%   { background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%; }
  50%  { background-position: 0% 6%, 0% -4%, 0% 5%, 0% -3%, 100% 100%; }
  100% { background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%; }
}

/* Profile card: lighter glass so background stays visible (like music view) */
#profile-card.glass {
  background:
    linear-gradient(165deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01) 45%),
    rgba(12, 10, 8, 0.18);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow:
    0 8px 28px rgba(0,0,0,0.28),
    inset 0 1px 1px rgba(255,255,255,0.14);
}
body.light-mode #profile-card.glass {
  background:
    linear-gradient(165deg, rgba(255,255,255,0.35), rgba(255,255,255,0.12) 45%),
    rgba(255, 250, 235, 0.35);
}

.profile-box { text-align: center; position: relative; z-index: 1; }

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  box-shadow: 0 0 22px rgba(240,207,122,0.35);
  margin: 0 auto 12px;
  object-fit: cover;
}

.profile-box h1 {
  font-size: 1.4rem;
  letter-spacing: 0.15em;
  color: var(--gold-bright);
}

.profile-tagline {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 4px;
  letter-spacing: 0.05em;
}

.profile-quote {
  margin-top: 14px;
  font-size: 0.8rem;
  color: #c9bd9c;
  line-height: 1.6;
  font-style: italic;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.social-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
}
.social-row a {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  transition: border-color 0.2s, transform 0.2s;
}
.social-row a:hover { border-color: var(--gold); transform: translateY(-2px); }
.social-row a svg { width: 16px; height: 16px; fill: var(--gold-bright); }

.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-inline-end: 6px;
  position: relative;
}
.status-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: inherit;
  opacity: 0.5;
  animation: statusPulse 2s ease-out infinite;
}
.status-online { background: #43d17c; box-shadow: 0 0 6px #43d17c; }
.status-idle { background: #e2b13c; box-shadow: 0 0 6px #e2b13c; }
.status-dnd { background: #e5484d; box-shadow: 0 0 6px #e5484d; }
.status-offline { background: #5c5c5c; }
.status-offline::after { display: none; }

@keyframes statusPulse {
  0% { transform: scale(0.6); opacity: 0.55; }
  70% { transform: scale(1.8); opacity: 0; }
  100% { opacity: 0; }
}

.recent-game {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255,255,255,0.08);
  position: relative; z-index: 1;
}
.recent-game img { width: 36px; height: 36px; border-radius: 6px; }
.recent-game .title { font-size: 0.82rem; color: var(--gold-bright); }
.recent-game .meta { font-size: 0.7rem; color: var(--text-dim); }

.widget-error { color: #d98c6b; font-size: 0.8rem; position: relative; z-index: 1; }

.widget.compact { padding: 12px 16px; }
.widget.compact h2 { margin-bottom: 6px; font-size: 0.7rem; }
.widget.compact .row { padding: 3px 0; font-size: 0.78rem; }
.widget.compact .recent-game { margin-top: 4px; padding-top: 4px; }

/* Telegram: channel row + DM/support row, cat photo thumbnail */
.tg-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed rgba(255,255,255,0.08); position: relative; z-index: 1; }
.tg-row:last-child { border-bottom: none; }
.tg-icon { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.06); flex-shrink: 0; }
.tg-icon svg { width: 16px; height: 16px; fill: var(--gold-bright); }
.tg-icon-channel { background: #34c759; }
.tg-icon-channel svg { fill: #fff; }
.tg-icon-dm { background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af, #515bd4); }
.tg-icon-dm svg { fill: #fff; }
.tg-cat { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; flex-shrink: 0; border: 1px solid var(--border); }
.tg-cat-wrap { position: relative; flex-shrink: 0; }
.tg-cat-wrap .tg-icon { position: absolute; bottom: -4px; right: -4px; width: 16px; height: 16px; border: 2px solid rgba(10,9,6,0.85); }
.tg-cat-wrap .tg-icon svg { width: 8px; height: 8px; }
.tg-title { font-size: 0.82rem; color: var(--gold-bright); }
.tg-meta { font-size: 0.7rem; color: var(--text-dim); }

.friend-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.08);
  position: relative; z-index: 1;
}
.friend-row:last-child { border-bottom: none; }
.friend-row .avatar-wrap { position: relative; flex-shrink: 0; }
.friend-row img {
  width: 32px; height: 32px;
  border-radius: 6px;
  display: block;
}
.friend-row .steam-badge {
  position: absolute;
  bottom: -3px; inset-inline-end: -3px;
  width: 14px; height: 14px;
  background: #171a21;
  border-radius: 50%;
  border: 1.5px solid var(--bg-deep);
  display: flex; align-items: center; justify-content: center;
}
.friend-row .steam-badge svg { width: 9px; height: 9px; fill: #66c0f4; }
.friend-row .friend-info { min-width: 0; flex: 1; }
.friend-row .friend-name {
  font-size: 0.8rem;
  color: var(--gold-bright);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: flex; align-items: center;
}
.friend-row .friend-game {
  font-size: 0.68rem;
  color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ===== Birthday / calendar widget ===== */
.calendar-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  position: relative; z-index: 1;
}
.calendar-tabs button {
  flex: 1;
  padding: 5px 0;
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: color 0.2s, border-color 0.2s;
}
.calendar-tabs button.active { color: var(--gold-bright); border-color: var(--gold); }

.calendar-body {
  display: flex;
  justify-content: space-around;
  text-align: center;
  position: relative; z-index: 1;
}
.calendar-stat .num {
  font-size: 1.5rem;
  color: var(--gold-bright);
  font-weight: 700;
}
.calendar-stat .label {
  font-size: 0.66rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  margin-top: 2px;
}
.calendar-date {
  text-align: center;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255,255,255,0.08);
  font-size: 0.72rem;
  color: var(--text-dim);
  position: relative; z-index: 1;
}
