body.site-page {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: white;
  margin: 0;
  background-image: url("/bg.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.site-page-auth {
  text-align: center;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.site-page-shop {
  padding: 0 20px 60px;
}

body.site-page h1 {
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

body.site-page-home {
  text-align: center;
  min-height: 100vh;
  padding-bottom: 100px;
  box-sizing: border-box;
}

body.site-page-centered {
  text-align: center;
  padding: 40px 20px;
}

body.site-page-dictionary {
  min-height: 100vh;
}

.site-page .auth-bar {
  position: fixed;
  top: 16px;
  right: 20px;
  display: flex;
  gap: 12px;
  z-index: 100;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: calc(100vw - 32px);
}

.site-page .auth-bar a,
.site-page .auth-bar span {
  display: inline-block;
  padding: 8px 18px;
  background: rgba(255,255,255,0.15);
  color: white;
  text-decoration: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  min-width: auto;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1);
  transition: all 0.25s ease;
}

.site-page .auth-bar a:hover {
  background: rgba(255,255,255,0.28);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.site-page .glass-card {
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.22), 0 4px 12px rgba(0,0,0,0.12);
  border: 1px solid rgba(255,255,255,0.08);
}

.site-page .glass-panel {
  background: rgba(255,255,255,0.1);
  border-radius: 20px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.06);
}

.site-page .page-links {
  margin-top: 24px;
}

.site-page .page-links a {
  display: inline-block;
  padding: 10px 24px;
  background: rgba(255,255,255,0.15);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  margin: 4px;
  transition: background 0.3s;
}

.site-page .page-links a:hover {
  background: rgba(255,255,255,0.25);
}

.site-page .back-link {
  color: white;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 16px;
  opacity: 0.9;
}

.site-page .back-link:hover {
  color: #bfdbfe;
}

.site-page .auth-card {
  padding: 40px;
  width: 360px;
  max-width: 90vw;
}

.site-page .auth-input {
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  color: white;
  font-size: 16px;
  box-sizing: border-box;
  outline: none;
}

.site-page .auth-input::placeholder {
  color: rgba(255,255,255,0.5);
}

.site-page .auth-input:focus {
  border-color: rgba(255,255,255,0.6);
}

.site-page .auth-error {
  color: #ff6b6b;
  margin-bottom: 16px;
  min-height: 20px;
  font-size: 14px;
}

.site-page .form-links {
  margin-top: 20px;
  font-size: 14px;
}

.site-page .form-links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
}

.site-page .form-links a:hover {
  color: white;
}

.site-page .form-hint {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  margin-top: -10px;
  margin-bottom: 16px;
  text-align: left;
}

.site-page .glass-section {
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(18px);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
}

@media (max-width: 680px) {
  body.site-page-dictionary {
    background-attachment: scroll;
  }
  /* iOS Safari does not support background-attachment: fixed — fall back gracefully */
  body.site-page {
    background-attachment: scroll;
    background-size: cover;
  }
}

/* ===== Global entrance animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shimmerGlow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* --- Banner iframe (shared across all sub-pages) --- */
.banner-frame {
  width: 100%;
  border: none;
  height: 52px;
  display: block;
  margin-top: 40px;
  margin-bottom: 30px;
}
