/* Reusable site theme + sticky title bar — include on every page */

:root {
  --bg: #e8eaef;
  --bg-accent: #d4d8e2;
  --glass: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(255, 255, 255, 0.85);
  --glass-shadow: 0 8px 32px rgba(100, 110, 130, 0.12), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  --text: #2c3142;
  --text-soft: #4a5168;
  --muted: #7a8299;
  --accent: #5a6a8a;
  --accent-2: #8a96ad;
  --success: #2a9d6e;
  --warning: #c47a12;
  --danger: #c44536;
  --radius: 18px;
  --blur: blur(16px);
  --site-bar-height: 88px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 60% at 15% 10%, #f5f6f8 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 90%, #dde1e9 0%, transparent 50%),
    linear-gradient(160deg, #eef0f4 0%, #e2e6ee 45%, #d8dce6 100%);
  line-height: 1.5;
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  width: 45vw;
  height: 45vw;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

.bg-glow--left {
  top: -8%;
  left: -12%;
  background: rgba(255, 255, 255, 0.9);
}

.bg-glow--right {
  bottom: -8%;
  right: -12%;
  background: rgba(200, 208, 222, 0.7);
}

.page-content {
  position: relative;
  z-index: 1;
}

.page-container {
  width: 100%;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.glass-panel {
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* ── Sticky title bar ── */

.site-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: var(--glass-strong);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 24px rgba(100, 110, 130, 0.1);
}

.site-bar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  min-height: var(--site-bar-height);
}

.site-brand {
  min-width: 0;
}

.site-brand__home {
  display: inline-block;
  margin: 0 0 0.15rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.12s;
}

.site-brand__home:hover {
  color: var(--success);
}

.site-brand__title-link {
  text-decoration: none;
  color: inherit;
}

.site-brand__title {
  margin: 0;
  font-family: "Bebas Neue", "Impact", sans-serif;
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #1e2230 10%, #5c6478 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-brand__subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.site-brand__credit {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  opacity: 0.85;
  letter-spacing: 0.01em;
}

.site-user {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.site-user__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(90, 106, 138, 0.2);
  flex-shrink: 0;
}

.site-user__name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-soft);
}

.site-user__avatar-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(90, 106, 138, 0.2);
}

.site-user__loading {
  font-size: 0.88rem;
  color: var(--muted);
}

.site-user__login {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  background: #5865f2;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
}

.site-user__login:hover {
  background: #4752c4;
}

.site-user__login:active {
  transform: scale(0.98);
}

.site-user__login-icon {
  flex-shrink: 0;
}

.site-user__logout {
  padding: 0.3rem 0.55rem;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: 1px solid rgba(90, 106, 138, 0.25);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
}

.site-user__logout:hover {
  color: var(--text);
  border-color: rgba(90, 106, 138, 0.45);
}

.site-user__error {
  max-width: 240px;
  text-align: right;
  line-height: 1.35;
  color: var(--danger);
}

@media (max-width: 640px) {
  .site-bar__inner {
    padding: 0.65rem 1.25rem;
  }

  .site-brand__subtitle {
    font-size: 0.76rem;
  }

  .site-brand__credit {
    font-size: 0.68rem;
  }

  .site-user__name {
    display: none;
  }

  .site-user__login {
    padding: 0.4rem 0.65rem;
    font-size: 0.75rem;
  }

  .site-user__logout {
    display: none;
  }
}
