/* ===== Liquid Glass overlay for quiz site — light theme ===== */

/*
 * ROOT PROBLEM: body background is flat #F5F7FA — backdrop-filter has
 * nothing to blur. Fix: inject colorful radial gradient blobs so the
 * blur/saturate has actual color contrast to work with.
 */

/* 1. Replace flat background with a multi-color gradient (fixed so it
      doesn't scroll, giving consistent glass depth on all pages) */
body {
  background:
    radial-gradient(ellipse 55% 45% at 8%  18%, rgba(139, 192, 255, 0.28) 0%, transparent 60%),
    radial-gradient(ellipse 45% 55% at 88% 12%, rgba(196, 181, 253, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 65% 45% at 55% 88%, rgba(134, 239, 172, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 75% 55%, rgba(253, 186, 116, 0.15) 0%, transparent 50%),
    #eef2f8 !important;
  background-attachment: fixed !important;
}

/* 2. Boost existing blur blobs on login page (they have color but low opacity) */
[class*="blur-[100px]"], [class*="blur-[80px]"] {
  opacity: 0.4 !important;
}

/* 3. Glass cards: bg-white → translucent + heavy blur so colors show through */
.bg-white {
  background-color: rgba(255, 255, 255, 0.42) !important;
  backdrop-filter: blur(28px) saturate(1.9) brightness(1.03) !important;
  -webkit-backdrop-filter: blur(28px) saturate(1.9) brightness(1.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.75) !important;
  box-shadow:
    0 8px 40px -12px rgba(15, 76, 129, 0.15),
    0 2px 8px  -2px  rgba(15, 76, 129, 0.08),
    inset 0  1px 0   rgba(255, 255, 255, 0.90),
    inset 0 -1px 0   rgba(0,   0,   0,   0.04) !important;
}

/* 4. Also catch pm-card / bg-card variants */
[class*="bg-pm-card"], [class*="bg-card"] {
  background-color: rgba(255, 255, 255, 0.42) !important;
  backdrop-filter: blur(28px) saturate(1.9) !important;
  -webkit-backdrop-filter: blur(28px) saturate(1.9) !important;
}

/* 5. Specular highlight — top-edge shimmer on rounded-pm-* containers */
[class*="rounded-pm"]:not(nav):not(button):not([role="button"]):not(footer) {
  position: relative !important;
}
[class*="rounded-pm"]:not(nav):not(button):not([role="button"]):not(footer)::after {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: 8% !important;
  right: 8% !important;
  height: 1px !important;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95), transparent) !important;
  border-radius: 999px !important;
  pointer-events: none !important;
  z-index: 1 !important;
}

/* 6. Nav / header — subtle glass strip */
nav, header {
  background-color: rgba(238, 242, 248, 0.65) !important;
  backdrop-filter: blur(20px) saturate(1.5) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.5) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.55) !important;
}

/* ===== Guest access button ===== */
.guest-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.625rem 1.5rem;
  margin-top: 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  color: #475569;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.guest-btn:hover {
  background: rgba(255, 255, 255, 0.58);
  color: #0f4c81;
  border-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 16px -4px rgba(15, 76, 129, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}

/* ===== 2026-08-01: 统一圆角 + 补齐卡片玻璃化 ===== */

/* 1. Unified radius scale. shadcn components follow --radius; the pm
      rounded classes are literal values, so they are redefined directly. */
:root {
  --radius: 0.75rem; /* 10px → 12px */
}
.rounded-pm-sm { border-radius: 8px !important; }
.rounded-pm-md { border-radius: 12px !important; }
.rounded-pm-lg { border-radius: 16px !important; }
.rounded-pm-xl { border-radius: 20px !important; }
.rounded-t-pm-sm { border-radius: 8px 8px 0 0 !important; }

/* 2. Glass the most-used solid card backgrounds (navbar, home cards,
      login card, section blocks). */
.bg-pm-bg-card,
.bg-card {
  background-color: rgba(255, 255, 255, 0.42) !important;
  backdrop-filter: blur(28px) saturate(1.9) brightness(1.03) !important;
  -webkit-backdrop-filter: blur(28px) saturate(1.9) brightness(1.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.75) !important;
  box-shadow:
    0 8px 40px -12px rgba(15, 76, 129, 0.15),
    0 2px 8px -2px rgba(15, 76, 129, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.90),
    inset 0 -1px 0 rgba(0, 0, 0, 0.04) !important;
}
/* Top nav keeps its strip look: translucent, blur, bottom border only. */
nav.bg-pm-bg-card {
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.55) !important;
}
/* Section/block surfaces: lighter glass. */
[class*="bg-pm-bg-primary"] {
  background-color: rgba(238, 242, 248, 0.55) !important;
  backdrop-filter: blur(20px) saturate(1.5) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.5) !important;
}
