/* ============================================================
   FULLBRICK Portal — Splash + Hub
   ============================================================ */
:root {
  --fb-red: #d01012;
  --fb-gold: #ffcf00;
  --fb-ink: #1c2430;
  --fb-muted: #6b7686;
  --fb-bg: #f4f6f9;
  --fb-card: #fff;
  --fb-line: #e3e8ef;
  --fb-shadow: 0 2px 12px rgba(20,30,45,.08);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--fb-bg); color: var(--fb-ink); font-size: 15px; line-height: 1.6; }

/* ============================================================
   S P L A S H   S C R E E N
   ============================================================ */
.splash {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #fff;
  transition: opacity .6s ease, visibility .6s ease;
}
.splash.done { opacity: 0; visibility: hidden; pointer-events: none; }

/* Seal stamp */
.seal-wrap {
  position: relative; width: 160px; height: 160px;
}
.seal-img {
  width: 100%; height: 100%; object-fit: contain;
  opacity: 0; transform: scale(1.5) rotate(-12deg);
  filter: blur(4px);
}
.seal-img.stamp {
  animation: sealStamp .45s cubic-bezier(.22,.68,.36,1.2) forwards;
}
@keyframes sealStamp {
  0%   { opacity: 0; transform: scale(1.5) rotate(-12deg); filter: blur(4px); }
  50%  { opacity: 1; transform: scale(.92) rotate(1deg); filter: blur(0); }
  70%  { transform: scale(1.04) rotate(-0.5deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); filter: blur(0); }
}

/* Ink splash effect overlay */
.seal-ink {
  position: absolute; inset: -20px; pointer-events: none;
  opacity: 0;
}
.seal-ink.show {
  animation: inkSplat .3s ease-out forwards;
}
@keyframes inkSplat {
  0%   { opacity: .6; transform: scale(.6); }
  100% { opacity: 0; transform: scale(1.6); }
}

/* Calligraphy text */
.splash-text {
  margin-top: 28px; text-align: center;
}
.splash-title {
  font-size: 42px; font-weight: 900; letter-spacing: 6px;
  color: var(--fb-ink);
  opacity: 0; transform: translateY(12px);
  transition: opacity .8s ease, transform .8s ease;
}
.splash-title.show {
  opacity: 1; transform: translateY(0);
}
.splash-sub {
  font-size: 13px; letter-spacing: 3px; color: var(--fb-muted);
  text-transform: uppercase; margin-top: 8px;
  opacity: 0; transition: opacity .8s ease .3s;
}
.splash-sub.show { opacity: 1; }

/* Skip button */
.splash-skip {
  position: absolute; bottom: 40px;
  background: none; border: none; color: var(--fb-muted);
  font-size: 13px; cursor: pointer; opacity: 0;
  transition: opacity .4s ease;
  padding: 8px 20px;
}
.splash-skip.show { opacity: .6; }
.splash-skip:hover { opacity: 1; }

/* ============================================================
   P O R T A L   H U B
   ============================================================ */
.portal {
  min-height: 100vh; display: flex; flex-direction: column;
  opacity: 0; transition: opacity .5s ease;
}
.portal.visible { opacity: 1; }

/* Header */
.portal-header {
  background: var(--fb-card); border-bottom: 1px solid var(--fb-line);
  box-shadow: var(--fb-shadow); position: sticky; top: 0; z-index: 20;
}
.portal-header .inner {
  max-width: 960px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; gap: 14px;
}
.portal-logo { height: 38px; width: auto; border-radius: 3px; }
.portal-brand { font-weight: 800; font-size: 17px; letter-spacing: .5px; }
.portal-brand b { color: var(--fb-red); }
.portal-spacer { flex: 1; }
.portal-user { color: var(--fb-muted); font-size: 13px; }
.portal-logout {
  background: none; border: 1px solid var(--fb-line); border-radius: 8px;
  padding: 5px 14px; font-size: 12.5px; color: var(--fb-muted); cursor: pointer;
  transition: border-color .15s, color .15s;
}
.portal-logout:hover { border-color: var(--fb-red); color: var(--fb-red); }

/* Hero / Welcome */
.portal-hero {
  text-align: center; padding: 48px 20px 32px;
  background: linear-gradient(180deg, #fff 0%, var(--fb-bg) 100%);
}
.portal-hero h1 {
  margin: 0; font-size: 28px; font-weight: 800; color: var(--fb-ink);
}
.portal-hero h1 span { color: var(--fb-red); }
.portal-hero p {
  margin: 10px 0 0; color: var(--fb-muted); font-size: 14px;
}

/* Card Grid */
.portal-grid {
  max-width: 960px; margin: 0 auto; padding: 0 20px 60px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.portal-card {
  background: var(--fb-card); border: 1.5px solid var(--fb-line);
  border-radius: 16px; padding: 28px 24px;
  text-decoration: none; color: var(--fb-ink);
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 14px; position: relative; overflow: hidden;
  transition: border-color .2s, box-shadow .2s, transform .15s;
  cursor: pointer;
}
.portal-card:hover {
  border-color: var(--fb-red);
  box-shadow: 0 6px 24px rgba(208,16,18,.1);
  transform: translateY(-3px);
}
.portal-card.locked {
  opacity: .5; pointer-events: none; cursor: default;
}
.portal-card.locked::after {
  content: '即将开放'; position: absolute; top: 14px; right: -28px;
  background: var(--fb-muted); color: #fff; font-size: 11px; font-weight: 700;
  padding: 3px 36px; transform: rotate(45deg);
}

/* Card icon */
.card-icon {
  width: 64px; height: 64px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; flex-shrink: 0;
}
.card-icon.red    { background: #fde8e8; }
.card-icon.gold   { background: #fff7d6; }
.card-icon.blue   { background: #e8f0fe; }
.card-icon.green  { background: #e7f6ee; }
.card-icon.purple { background: #f3e8ff; }

.card-title {
  font-size: 17px; font-weight: 700; margin: 0;
}
.card-desc {
  font-size: 13px; color: var(--fb-muted); margin: 0; line-height: 1.5;
}

/* Footer */
.portal-footer {
  margin-top: auto; text-align: center; padding: 24px 20px;
  color: var(--fb-muted); font-size: 12px; border-top: 1px solid var(--fb-line);
  background: var(--fb-card);
}
.portal-footer a { color: var(--fb-muted); text-decoration: none; }
.portal-footer a:hover { color: var(--fb-red); }

/* ---- Auth overlay (reuses existing verify style) ---- */
.auth-overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(244,246,249,.96); display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.auth-overlay.hide { display: none; }
.auth-panel {
  background: var(--fb-card); border: 1px solid var(--fb-line);
  border-radius: 16px; box-shadow: var(--fb-shadow);
  padding: 32px; width: 100%; max-width: 400px; text-align: center;
}
.auth-panel .logo-img { width: 200px; max-width: 70%; margin-bottom: 18px; }
.auth-panel h2 { font-size: 18px; margin: 0 0 6px; }
.auth-panel p { color: var(--fb-muted); margin: 0 0 18px; font-size: 13.5px; }
.auth-panel input, .auth-panel select {
  width: 100%; padding: 11px 12px; border: 1px solid var(--fb-line);
  border-radius: 9px; font-size: 15px; margin-bottom: 12px;
}
.auth-phone-row { display: flex; gap: 8px; margin-bottom: 12px; }
.auth-phone-row select { width: 108px; flex: none; margin-bottom: 0; }
.auth-phone-row input { flex: 1; margin-bottom: 0; }
.auth-btn {
  width: 100%; padding: 12px; border: 0; border-radius: 9px;
  background: var(--fb-red); color: #fff; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: background .15s;
}
.auth-btn:hover { background: #b50e10; }
.auth-err { color: var(--fb-red); font-size: 13px; min-height: 18px; margin-top: 6px; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .portal-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .portal-hero h1 { font-size: 22px; }
  .seal-wrap { width: 120px; height: 120px; }
  .splash-title { font-size: 32px; letter-spacing: 4px; }
}
@media (max-width: 480px) {
  .portal-grid { grid-template-columns: 1fr; gap: 12px; padding: 0 16px 40px; }
  .portal-card { flex-direction: row; text-align: left; padding: 18px 16px; gap: 14px; }
  .card-icon { width: 50px; height: 50px; border-radius: 12px; font-size: 24px; }
  .card-title { font-size: 15px; }
  .card-desc { font-size: 12px; }
  .portal-hero { padding: 32px 16px 20px; }
  .portal-header .inner { padding: 10px 16px; }
  .portal-logo { height: 30px; }
  .portal-brand { font-size: 15px; }
  .portal-user { display: none; }
}
