/* ============================================================
   McZulian Homelab — "Aurora Glass" theme
   Hand-written for gethomepage/homepage 1.13.x
   Targets confirmed DOM hooks: #page_wrapper, #inner_wrapper,
   #information-widgets, .information-widget-resource,
   .service-card, .service-title, .service-description, .group-name
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --acc1: #22d3ee;   /* cyan   */
  --acc2: #818cf8;   /* indigo */
  --acc3: #2dd4bf;   /* teal   */
  --ink:  #e6edf6;
  --muted:#94a3b8;
  --glass-bg:        rgba(148, 163, 184, 0.055);
  --glass-bg-hover:  rgba(148, 163, 184, 0.10);
  --glass-brd:       rgba(148, 163, 184, 0.14);
  --glass-brd-hover: rgba(34, 211, 238, 0.55);
}

/* ---------- base / typography ---------- */
html, body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif !important;
  background: #070b16 !important;
  color: var(--ink);
  scroll-behavior: smooth;
}

/* let the aurora show through homepage's own wrappers */
#page_wrapper,
#inner_wrapper { background: transparent !important; }

/* ---------- animated aurora background ---------- */
body::before {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(38% 42% at 16% 20%, rgba(34,211,238,0.22), transparent 60%),
    radial-gradient(36% 40% at 84% 16%, rgba(129,140,248,0.22), transparent 60%),
    radial-gradient(48% 50% at 50% 98%, rgba(45,212,191,0.16), transparent 60%),
    radial-gradient(30% 34% at 72% 64%, rgba(99,102,241,0.15), transparent 60%);
  filter: blur(42px) saturate(140%);
  animation: auroraDrift 30s ease-in-out infinite alternate;
}
@keyframes auroraDrift {
  0%   { transform: translate3d(0,0,0)        scale(1);    }
  50%  { transform: translate3d(2%, -2.5%, 0) scale(1.08); }
  100% { transform: translate3d(-2.5%, 2%, 0) scale(1.05); }
}

/* faint top-fading grid for depth */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(148,163,184,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,163,184,0.04) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(125% 120% at 50% 0%, #000 28%, transparent 78%);
          mask-image: radial-gradient(125% 120% at 50% 0%, #000 28%, transparent 78%);
}

/* keep all real content above the background layers */
.container.relative { position: relative; z-index: 10; }

/* ---------- header / information widgets ---------- */
#information-widgets { margin-top: .35rem; margin-bottom: .7rem; gap: .4rem; }

/* greeting -> gradient wordmark */
.information-widget-greeting {
  font-weight: 700 !important;
  letter-spacing: .2px;
  background: linear-gradient(92deg, var(--acc1), var(--acc2) 60%, var(--acc3));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 18px rgba(34,211,238,0.25));
}

/* glass panel wraps each widget group (label + its metrics together),
   NOT each metric — this is what keeps the group label inside the box
   and stops "Docker Host" / "Root FS" from spilling out at 1080p. */
.information-widget-resources,
.information-widget-datetime,
.information-widget-openmeteo {
  background: var(--glass-bg);
  border: 1px solid var(--glass-brd);
  border-radius: 14px;
  padding: .28rem .65rem !important;
  margin: 0 .25rem .35rem 0;
  backdrop-filter: blur(10px) saturate(130%);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
  transition: border-color .25s ease, background .25s ease;
}
.information-widget-resources:hover,
.information-widget-datetime:hover,
.information-widget-openmeteo:hover {
  border-color: var(--glass-brd-hover);
  background: var(--glass-bg-hover);
}
/* individual metrics carry no box of their own — just breathing room */
.information-widget-resource {
  background: transparent !important;
  border: none !important;
  padding-top: .1rem !important;
  padding-bottom: .1rem !important;
}

/* search box -> glass */
.information-widget-search input,
#information-widgets input {
  background: var(--glass-bg) !important;
  border: 1px solid var(--glass-brd) !important;
  border-radius: 14px !important;
  backdrop-filter: blur(10px);
  transition: border-color .25s ease, box-shadow .25s ease;
}
.information-widget-search input:focus,
#information-widgets input:focus {
  border-color: var(--glass-brd-hover) !important;
  box-shadow: 0 0 0 3px rgba(34,211,238,0.18) !important;
  outline: none !important;
}

/* ---------- group headers ---------- */
.services-group > div > h2,
.services-group .group-name,
h2.group-name {
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  font-size: .82rem !important;
  color: var(--ink) !important;
  display: inline-flex;
  align-items: center;
  padding-bottom: .35rem;
  position: relative;
}
.services-group .group-name::before,
h2.group-name::before {
  content: "";
  width: 9px; height: 9px; margin-right: .55rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--acc1), var(--acc2));
  box-shadow: 0 0 10px rgba(34,211,238,0.8);
}
.services-group .group-name::after,
h2.group-name::after {
  content: "";
  position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: linear-gradient(90deg, var(--acc1), transparent 75%);
  opacity: .55;
}

/* ---------- service cards = glass tiles ---------- */
.service-card,
li.service > .service-card,
.service .service-card {
  background: var(--glass-bg) !important;
  border: 1px solid var(--glass-brd) !important;
  border-radius: 16px !important;
  backdrop-filter: blur(13px) saturate(135%);
  -webkit-backdrop-filter: blur(13px) saturate(135%);
  box-shadow: 0 6px 22px rgba(2, 6, 18, 0.35), inset 0 1px 0 rgba(255,255,255,0.05);
  transition: transform .22s cubic-bezier(.2,.7,.3,1),
              border-color .22s ease, box-shadow .22s ease, background .22s ease;
  position: relative;
  overflow: hidden;
}
/* sheen sweep on hover */
.service-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.07) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .6s ease;
  pointer-events: none;
}
.service-card:hover {
  transform: translateY(-4px);
  background: var(--glass-bg-hover) !important;
  border-color: var(--glass-brd-hover) !important;
  box-shadow: 0 14px 34px rgba(2,6,18,0.5), 0 0 0 1px rgba(34,211,238,0.25),
              0 0 28px rgba(34,211,238,0.18);
}
.service-card:hover::after { transform: translateX(120%); }

.service-title, .service-name {
  font-weight: 600 !important;
  letter-spacing: .2px;
  color: var(--ink) !important;
}
.service-description {
  color: var(--muted) !important;
  font-size: .76rem !important;
}

/* widget metric values inside cards -> mono + accent emphasis */
.service-card .service-block,
.service-card [data-testid="resource-value"],
.service-card .font-bold {
  font-family: 'JetBrains Mono', ui-monospace, monospace !important;
}

/* status / ping dots glow */
.service-card .text-green-500,
.service-card .text-emerald-500 { filter: drop-shadow(0 0 6px rgba(34,197,94,0.7)); }
.service-card .text-red-500     { filter: drop-shadow(0 0 6px rgba(239,68,68,0.7)); }
.service-card .text-yellow-500,
.service-card .text-amber-500   { filter: drop-shadow(0 0 6px rgba(245,158,11,0.7)); }

/* iframe widgets (disk/ram bars) blend into the glass */
.service-card iframe { border-radius: 10px; background: transparent; }

/* ---------- bookmarks ---------- */
.bookmark-text, .bookmark > a {
  border-radius: 14px !important;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.bookmark > a:hover { transform: translateY(-2px); }
.bookmark-text .bookmark-abbr {
  background: linear-gradient(135deg, var(--acc2), var(--acc1)) !important;
  color: #06121a !important;
  font-weight: 700 !important;
}

/* ---------- custom scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--acc2), var(--acc1));
  border-radius: 10px;
  border: 2px solid #070b16;
}
::-webkit-scrollbar-thumb:hover { background: var(--acc1); }

/* footer/version tidy */
.text-xs.text-theme-500 { opacity: .5; }

/* respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
  .service-card, .service-card::after { transition: none; }
}
