@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bga: 55%;
  --color-widget-background: hsla(var(--color-widget-background-hsl-values), var(--bga));
  --color-info: hsl(43, 50%, 70%);
  --color-warning: hsl(43, 50%, 70%);
  --glow-primary: rgba(99, 149, 255, 0.08);
  --glow-accent: rgba(139, 92, 246, 0.06);
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, #0a0a14 0%, #0d1117 40%, #0a0f1a 70%, #0c0a18 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ambient light orbs */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(56, 100, 220, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse 50% 50% at 50% 0%, rgba(56, 189, 248, 0.03) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

.page-content {
  position: relative;
  z-index: 1;
}

/* ── Glassmorphism Widgets ── */
.widget-content:not(.widget-content-frameless),
.widget-content-frame {
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  background: linear-gradient(135deg, rgba(15, 18, 30, 0.7) 0%, rgba(10, 14, 24, 0.65) 100%) !important;
  border: 1px solid var(--border-subtle);
  border-radius: 16px !important;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 4px 24px -4px rgba(0, 0, 0, 0.4),
    0 0 40px -20px var(--glow-primary);
  transition: all 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.widget-content:not(.widget-content-frameless):hover,
.widget-content-frame:hover {
  border-color: var(--border-hover);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 8px 32px -4px rgba(0, 0, 0, 0.5),
    0 0 60px -20px rgba(99, 149, 255, 0.12);
  transform: translateY(-2px);
}

/* ── Typography ── */
.widget-header {
  letter-spacing: 0.02em;
  font-weight: 700 !important;
}

.widget-header-title {
  text-transform: uppercase;
  font-size: 0.7rem !important;
  letter-spacing: 0.12em;
  opacity: 0.5;
}

.clock-time {
  font-weight: 200 !important;
  letter-spacing: -0.02em;
}

/* ── Custom Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ── Links & Interactions ── */
a {
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  opacity: 0.85;
}

.monitor-site-icon {
  border-radius: 10px !important;
}

.calendar {
  border-radius: 12px;
}

::selection {
  background: rgba(99, 149, 255, 0.3);
  color: #fff;
}

/* ── Widget Height Matching ── */
.widget-type-plausible-prowlarr-custom .widget-content,
.widget-type-uptime-custom .widget-content {
  height: calc(100% - var(--widget-gap));
}

.widget-type-dns-stats {
  height: 100%;
}

.widget-type-dns-stats .widget-content {
  height: calc(100% - var(--widget-gap));
}

.widget-type-dns-stats .widget-content .dns-stats {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}

.widget-type-prowlarr-custom .widget-content {
  height: calc(100% - var(--widget-gap));
}

/* ── Staggered Fade-In Animation ── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-column>.widget {
  animation: fadeInUp 0.4s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.page-column>.widget:nth-child(1) {
  animation-delay: 0s;
}

.page-column>.widget:nth-child(2) {
  animation-delay: 0.06s;
}

.page-column>.widget:nth-child(3) {
  animation-delay: 0.06s;
}

.page-column>.widget:nth-child(4) {
  animation-delay: 0.12s;
}

.page-column>.widget:nth-child(5) {
  animation-delay: 0.18s;
}

.page-column>.widget:nth-child(6) {
  animation-delay: 0.24s;
}