* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-y: scroll;
}

body {
  font-family: 'Inter', sans-serif;
  background: #0a0c14;
  color: #f0f0f4;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(55% 45% at 18% 18%, rgba(139, 92, 246, 0.16) 0%, transparent 62%),
    radial-gradient(45% 40% at 82% 12%, rgba(99, 102, 241, 0.12) 0%, transparent 55%),
    radial-gradient(50% 42% at 78% 82%, rgba(56, 189, 248, 0.10) 0%, transparent 60%),
    radial-gradient(45% 40% at 12% 88%, rgba(217, 70, 239, 0.09) 0%, transparent 55%);
  animation: bgAurora 30s ease-in-out infinite alternate;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.03) 45%, transparent 60%),
    linear-gradient(295deg, transparent 40%, rgba(139, 92, 246, 0.04) 55%, transparent 70%);
  mix-blend-mode: screen;
}

@keyframes bgAurora {
  from { opacity: 0.65; filter: hue-rotate(0deg); }
  to { opacity: 1; filter: hue-rotate(24deg); }
}

@media (prefers-reduced-motion: reduce) {
  body::before {
    animation: none;
  }
}

@media (max-width: 768px) {
  body::before {
    animation: none;
    opacity: 0.7;
  }
}

::selection {
  background: rgba(139, 92, 246, 0.35);
  color: #fff;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0a0c14; }
::-webkit-scrollbar-thumb { background: rgba(139, 92, 246, 0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(139, 92, 246, 0.5); }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.text-gold {
  background: linear-gradient(135deg, #a78bfa, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section {
  padding: 100px 0;
  position: relative;
}

.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.15), transparent);
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
  position: relative;
}

.section-header::after {
  content: '✦';
  display: block;
  font-size: 12px;
  color: rgba(139, 92, 246, 0.3);
  margin-top: 20px;
  letter-spacing: 8px;
}

.section-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #8b5cf6;
  background: rgba(139, 92, 246, 0.08);
  padding: 6px 18px;
  border-radius: 100px;
  border: 1px solid rgba(139, 92, 246, 0.15);
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.section-tag i {
  font-size: 14px;
}

.section-title {
  font-size: 42px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.section-desc {
  font-size: 18px;
  color: #b0b0c0;
  max-width: 600px;
  margin: 0 auto;
  font-weight: 400;
  line-height: 1.8;
}

.section-divider {
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #8b5cf6, transparent);
  margin: 16px auto 0;
  position: relative;
}

.section-divider::before,
.section-divider::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8b5cf6;
  top: -2px;
}

.section-divider::before {
  left: -3px;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

.section-divider::after {
  right: -3px;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

/* ===== Navigation ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(5, 6, 10, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: all 0.3s;
}

.navbar::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.1), transparent);
}

.nav-container {
  max-width: none;
  margin: 0;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-left: 20px;
}

.logo-icon {
  font-size: 28px;
  color: #8b5cf6;
  filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.3));
  transition: all 0.5s;
}

.logo-icon.verified {
  filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.6)) drop-shadow(0 0 24px rgba(139, 92, 246, 0.3));
  animation: verifiedPulse 2s ease-in-out infinite;
}

@keyframes verifiedPulse {
  0%, 100% { filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.6)) drop-shadow(0 0 24px rgba(139, 92, 246, 0.3)); }
  50% { filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.8)) drop-shadow(0 0 40px rgba(139, 92, 246, 0.4)); }
}

.family-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #0a0c14;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  padding: 3px 10px;
  border-radius: 100px;
  margin-left: 6px;
  line-height: 1.3;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.3);
}

.nav-logo {
  cursor: pointer;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2px;
  flex-wrap: nowrap;
  justify-content: center;
}

.nav-link {
  text-decoration: none;
  color: #b0b0c0;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.25s;
  position: relative;
  white-space: nowrap;
}

.nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: #8b5cf6;
  background: rgba(139, 92, 246, 0.08);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 2px;
  background: #8b5cf6;
  border-radius: 1px;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #e8e8ec;
  border-radius: 2px;
  transition: all 0.3s;
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: 18px;
}

#userInfo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #e8e8ec;
}

.nav-avatar-wrap {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(139, 92, 246, 0.25);
  flex-shrink: 0;
  cursor: pointer;
  transition: border-color 0.25s;
}
.nav-avatar-wrap:hover {
  border-color: rgba(139, 92, 246, 0.5);
}
.nav-avatar {
  width: 100%;
  height: 100%;
  display: block;
}
.nav-avatar-img {
  object-fit: cover;
}
.nav-avatar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #c4b5fd;
}

.nav-username {
  font-weight: 500;
  color: #8b5cf6;
  cursor: pointer;
}

.btn-sm {
  background: transparent;
  color: #e8e8ec;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.25s;
  font-family: 'Inter', sans-serif;
}

.btn-sm:hover {
  border-color: #8b5cf6;
  color: #8b5cf6;
  background: rgba(139, 92, 246, 0.06);
}

.nav-login-btn {
  padding: 8px 20px !important;
  font-size: 13px !important;
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 120px 24px 80px;
  text-align: center;
  overflow: hidden;
}

#particlesCanvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 50%, rgba(139, 92, 246, 0.1) 0%, transparent 60%),
    radial-gradient(ellipse at 85% 50%, rgba(139, 92, 246, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 20%, rgba(255, 255, 255, 0.02) 0%, transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(139, 92, 246, 0.03) 0%, transparent 30%);
  pointer-events: none;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 40px, rgba(255, 255, 255, 0.008) 40px, rgba(255, 255, 255, 0.008) 41px),
    repeating-linear-gradient(90deg, transparent, transparent 40px, rgba(255, 255, 255, 0.008) 40px, rgba(255, 255, 255, 0.008) 41px);
  pointer-events: none;
  z-index: 1;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.2), transparent);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-title {
  font-size: 80px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -2px;
  line-height: 1.05;
  margin-bottom: 24px;
  text-shadow: 0 0 40px rgba(139, 92, 246, 0.1);
}

.hero-subtitle {
  font-size: 19px;
  color: #b0b0bc;
  font-weight: 400;
  line-height: 1.8;
  max-width: 640px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
}

.btn-primary {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #ffffff;
  box-shadow: 0 4px 24px rgba(139, 92, 246, 0.25);
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 40px rgba(139, 92, 246, 0.4);
}

.btn-outline {
  background: transparent;
  color: #e8e8ec;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-outline:hover {
  border-color: #8b5cf6;
  color: #8b5cf6;
  background: rgba(139, 92, 246, 0.06);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.1);
}

.hero-scroll {
  position: absolute;
  bottom: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #8a8a9a;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: float 2.5s ease-in-out infinite;
  z-index: 2;
}

.hero-scroll i {
  font-size: 14px;
  opacity: 0.5;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

/* ===== Postulates ===== */
.postulates-section {
  background: linear-gradient(180deg, #11141e 0%, #0a0c14 50%, #11141e 100%);
  position: relative;
  overflow: hidden;
}

.postulates-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(139, 92, 246, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(139, 92, 246, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

.postulates-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  position: relative;
  z-index: 1;
}

.postulate-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 32px 28px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: all 0.4s;
  position: relative;
  overflow: hidden;
}

.postulate-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 0;
  background: linear-gradient(180deg, #8b5cf6, transparent);
  transition: height 0.4s ease;
}

.postulate-card:hover::before {
  height: 100%;
}

.postulate-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(139, 92, 246, 0.04), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.postulate-card:hover::after {
  opacity: 1;
}

.postulate-card:hover {
  border-color: rgba(139, 92, 246, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.postulate-card.wide {
  grid-column: 1 / -1;
}

.postulate-num {
  font-size: 28px;
  font-weight: 900;
  color: rgba(139, 92, 246, 0.15);
  line-height: 1;
  flex-shrink: 0;
  min-width: 40px;
  font-family: 'Inter', sans-serif;
  letter-spacing: -1px;
  transition: all 0.3s;
}

.postulate-card:hover .postulate-num {
  color: rgba(139, 92, 246, 0.4);
}

.postulate-content {
  flex: 1;
}

.postulate-title {
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}

.postulate-title .postulate-icon {
  color: #a78bfa;
  margin-right: 10px;
  font-size: 16px;
  filter: drop-shadow(0 0 6px rgba(139,92,246,0.15));
  transition: all 0.3s;
}
.postulate-card:hover .postulate-icon {
  color: #c4b5fd;
  filter: drop-shadow(0 0 10px rgba(139,92,246,0.3));
  transform: scale(1.1);
}

.postulate-sticker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 18px;
  color: #fff;
  margin-right: 14px;
  flex-shrink: 0;
  position: relative;
  background: linear-gradient(135deg, #a78bfa, #7c3aed);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: rotate(-8deg);
  transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
  z-index: 1;
}

.postulate-sticker::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.35);
  opacity: 0.7;
}

.postulate-sticker i {
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
  position: relative;
  z-index: 2;
}

.postulate-card:hover .postulate-sticker {
  transform: rotate(0deg) scale(1.12);
  box-shadow: 0 8px 28px rgba(139, 92, 246, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.postulate-card:nth-child(even) .postulate-sticker {
  transform: rotate(8deg);
}

.postulate-card:nth-child(even):hover .postulate-sticker {
  transform: rotate(0deg) scale(1.12);
}

.postulate-sticker.st-1 { background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.postulate-card:hover .postulate-sticker.st-1 { box-shadow: 0 8px 28px rgba(245, 158, 11, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.postulate-sticker.st-2 { background: linear-gradient(135deg, #6366f1, #4338ca); box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.postulate-card:hover .postulate-sticker.st-2 { box-shadow: 0 8px 28px rgba(99, 102, 241, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.postulate-sticker.st-3 { background: linear-gradient(135deg, #34d399, #059669); box-shadow: 0 6px 20px rgba(52, 211, 153, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.postulate-card:hover .postulate-sticker.st-3 { box-shadow: 0 8px 28px rgba(52, 211, 153, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.postulate-sticker.st-4 { background: linear-gradient(135deg, #f7e476, #eab308); color: #3a2f00; box-shadow: 0 6px 20px rgba(234, 179, 8, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.postulate-card:hover .postulate-sticker.st-4 { box-shadow: 0 8px 28px rgba(234, 179, 8, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.postulate-sticker.st-5 { background: linear-gradient(135deg, #60a5fa, #1d4ed8); box-shadow: 0 6px 20px rgba(96, 165, 250, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.postulate-card:hover .postulate-sticker.st-5 { box-shadow: 0 8px 28px rgba(96, 165, 250, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3); }

.postulate-title {
  display: flex;
  align-items: center;
}

.postulate-desc {
  font-size: 14px;
  color: #8a8a9a;
  font-weight: 400;
  line-height: 1.7;
}

/* ===== Members (empty state) ===== */
.members-section {
  background: #11141e;
}

.empty-state-section {
  text-align: center;
  padding: 60px 20px;
  color: #8a8a9a;
}

.empty-state-section i {
  font-size: 64px;
  color: rgba(139, 92, 246, 0.15);
  margin-bottom: 20px;
  display: block;
}

.empty-state-section p {
  font-size: 18px;
  font-weight: 400;
}

/* ===== Apply ===== */
.apply-section {
  background: #0a0c14;
}

.form-wrapper {
  max-width: 800px;
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  position: relative;
}

.form-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.15), transparent);
}

.apply-iframe {
  width: 100%;
  height: 920px;
  display: block;
  border: none;
}

/* ===== Family Section ===== */
.family-section {
  background: linear-gradient(180deg, #11141e 0%, #0a0c14 100%);
}

.family-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.family-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 40px 32px;
  text-align: center;
  transition: all 0.4s;
  position: relative;
  overflow: hidden;
}

.family-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

.family-card:hover::before {
  opacity: 1;
}

.family-card:hover {
  border-color: rgba(139, 92, 246, 0.15);
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.family-card-icon {
  font-size: 48px;
  color: #8b5cf6;
  margin-bottom: 20px;
  transition: transform 0.4s;
}

.family-card:hover .family-card-icon {
  transform: scale(1.1);
}

.family-card h3 {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
}

.family-card p {
  font-size: 15px;
  color: #b0b0c0;
  font-weight: 400;
  line-height: 1.7;
  margin-bottom: 24px;
}

.family-card-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 12px 28px !important;
  font-size: 15px !important;
}

.disabled-btn {
  cursor: not-allowed !important;
  opacity: 0.6;
}

/* ===== Footer ===== */
.footer {
  background: #080a12;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding: 60px 0 0;
  position: sticky;
  bottom: 0;
  z-index: 5;
}

.footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.08), transparent);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-logo {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 1px;
}

.footer-brand p {
  font-size: 15px;
  color: #8a8a9a;
  font-weight: 400;
  margin-top: 12px;
  line-height: 1.8;
  max-width: 320px;
}

.footer-links h4,
.footer-social h4 {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #8a8a9a;
  text-decoration: none;
  font-size: 15px;
  font-weight: 400;
  transition: all 0.2s;
}

.footer-links a:hover {
  color: #8b5cf6;
  padding-left: 4px;
}

.social-icons {
  display: flex;
  gap: 12px;
}

.social-link {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8a8a9a;
  text-decoration: none;
  font-size: 18px;
  transition: all 0.3s;
}

.social-link:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.2);
  color: #8b5cf6;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.1);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding: 20px 0;
  text-align: center;
  position: relative;
}

.footer-bottom::before {
  content: '✦';
  display: block;
  font-size: 10px;
  color: rgba(139, 92, 246, 0.2);
  margin-bottom: 12px;
  letter-spacing: 12px;
}

.footer-bottom p {
  font-size: 14px;
  color: #6a6a7a;
  font-weight: 400;
}

/* ===== Page System ===== */
.page {
  display: none;
}

.page.active {
  display: block;
  flex: 1 0 auto;
  animation: pageFadeIn 0.4s ease;
}

@keyframes pageFadeIn {
  from { opacity: 0.6; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Family Overlay ===== */
.family-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: overlayFadeIn 0.3s ease;
}

.family-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.family-overlay-panel {
  position: relative;
  width: 94%;
  max-width: 680px;
  max-height: 85vh;
  background: #111620;
  border: 1px solid rgba(202, 146, 202, 0.08);
  border-radius: 24px;
  overflow: hidden;
  animation: overlaySlideUp 0.35s ease;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
}

.family-overlay-panel::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px; right: -1px; bottom: -1px;
  border-radius: 25px;
  background: linear-gradient(135deg, rgba(202,146,202,0.04), transparent, rgba(124,140,255,0.02), transparent);
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  animation: borderGlow 8s ease-in-out infinite;
}

@keyframes borderGlow {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

.family-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  border-bottom: 1px solid rgba(202, 146, 202, 0.04);
  background: rgba(202, 146, 202, 0.02);
}

.family-overlay-title {
  font-size: 22px;
  font-weight: 800;
  color: #eef0f8;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #eef0f8, #ca92ca, #b07cb0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.family-overlay-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(202, 146, 202, 0.06);
  background: rgba(202, 146, 202, 0.03);
  color: rgba(202, 146, 202, 0.4);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
}

.family-overlay-close:hover {
  background: rgba(202, 146, 202, 0.08);
  color: #ca92ca;
  border-color: rgba(202, 146, 202, 0.12);
}

.family-overlay-body {
  padding: 32px;
  overflow-y: auto;
  max-height: calc(85vh - 80px);
}

.family-overlay-body .family-cards {
  max-width: 100%;
}

.family-overlay-body .family-card {
  background: rgba(202, 146, 202, 0.02);
  border-color: rgba(202, 146, 202, 0.06);
}

.family-overlay-body .family-card::before {
  background: linear-gradient(90deg, transparent, rgba(202, 146, 202, 0.15), transparent);
}

.family-overlay-body .family-card:hover {
  border-color: rgba(202, 146, 202, 0.12);
}

.family-overlay-body .family-card-icon {
  color: #ca92ca;
}

.family-overlay-body .family-card h3 {
  color: #eef0f8;
}

.family-overlay-body .family-card p {
  color: rgba(176, 184, 221, 0.4);
}

.family-overlay-body .btn-primary {
  background: linear-gradient(135deg, #ca92ca, #b07cb0);
  color: #fff;
  box-shadow: 0 4px 24px rgba(202, 146, 202, 0.15);
}

.family-overlay-body .btn-primary:hover {
  box-shadow: 0 8px 32px rgba(202, 146, 202, 0.25);
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes overlaySlideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0d0f16;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 24px;
  display: none;
  z-index: 200;
  animation: slideIn 0.3s ease;
  font-size: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

@keyframes slideIn {
  from { transform: translateX(100px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.error { border-color: rgba(248, 81, 73, 0.4); color: #f85149; }
.toast.success { border-color: rgba(63, 185, 80, 0.4); color: #3fb950; }

/* ===== Moments (family album) ===== */
.moments-section {
  background: transparent;
}

.moments-auth-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 4px auto 26px;
  max-width: 620px;
  color: #9aa6d8;
  font-size: 14px;
  text-align: center;
}

.moments-auth-hint a {
  border-bottom: 1px dashed rgba(167, 139, 250, 0.5);
}

.moments-form-wrap {
  max-width: 860px;
  margin: 0 auto 36px;
}

.moments-form {
  display: flex;
  gap: 18px;
  background: rgba(22, 26, 44, 0.7);
  border: 1px solid rgba(167, 139, 250, 0.25);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.moments-form-side {
  flex: 0 0 200px;
}

.moments-preview {
  width: 200px;
  height: 150px;
  border-radius: 12px;
  border: 1px dashed rgba(167, 139, 250, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #7c88b8;
  background: rgba(10, 12, 24, 0.5);
  overflow: hidden;
}

.moments-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.moments-preview i {
  font-size: 22px;
  color: #5b67a0;
}

.moments-preview span {
  font-size: 12px;
}

.moments-form-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}

.moments-label {
  font-size: 12px;
  font-weight: 600;
  color: #c3caf2;
  letter-spacing: 0.4px;
}

.moments-input {
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid rgba(167, 139, 250, 0.3);
  background: rgba(30, 38, 58, 0.9);
  color: #e6e8ff;
  outline: none;
  font-family: inherit;
}

.moments-input::placeholder {
  color: #9aa6d8;
}

.moments-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.moments-file-btn {
  cursor: pointer;
}

.moments-status {
  font-size: 13px;
  color: #a78bfa;
  min-height: 16px;
}

.moments-status.ok {
  color: #6ee7a0;
}

.moments-status.err {
  color: #f87171;
}

.moments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  align-items: start;
}

.moments-grid .mem-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #0f0f1a;
  border: 1px solid rgba(255, 255, 255, 0.07);
  aspect-ratio: 4 / 3.4;
}

.mem-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mem-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 34px 12px 10px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent);
  color: #fff;
}

.mem-cap b {
  display: block;
  font-weight: 600;
  font-size: 14px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.mem-cap span {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 3px;
}

.moments-grid .mem-card {
  cursor: pointer;
}

.mem-video .mem-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 46px;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.65);
  pointer-events: none;
  z-index: 2;
}

.mem-play-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #11141e, #1a1630);
  color: #8b5cf6;
  font-size: 40px;
}

/* ===== Moments lightbox ===== */
.moments-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.moments-lightbox-bg {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 10, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.moments-lightbox-body {
  position: relative;
  max-width: 94vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.moments-lightbox-media {
  max-width: 94vw;
  display: flex;
  justify-content: center;
}

.moments-lightbox-media img {
  max-width: 94vw;
  max-height: 80vh;
  object-fit: contain;
  display: block;
  border-radius: 12px;
}

.moments-lightbox-media iframe {
  width: min(94vw, 1280px);
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: 12px;
  display: block;
}

.moments-lightbox-media video {
  max-width: 94vw;
  max-height: 80vh;
  border-radius: 12px;
}

.moments-lightbox-info {
  color: #c0c0d0;
  text-align: center;
  padding: 16px 8px 0;
  max-width: 640px;
}

.moments-lightbox-caption {
  font-size: 16px;
  color: #fff;
}

.moments-lightbox-meta {
  font-size: 13px;
  color: #8a8a9a;
  margin-top: 4px;
}

.moments-lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.moments-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* ===== Location image viewer ===== */
.location-main-img img,
.loc-card img.loc-photo {
  cursor: zoom-in;
}

.viewer-overlay {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 10, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.viewer-body {
  position: relative;
  max-width: 94vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.viewer-img {
  max-width: 94vw;
  max-height: 84vh;
  object-fit: contain;
  border-radius: 12px;
  display: block;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.viewer-caption {
  color: #c0c0d0;
  text-align: center;
  padding: 16px 8px 0;
  font-size: 15px;
}

.viewer-caption b {
  color: #fff;
  font-weight: 700;
}

.viewer-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.viewer-close:hover {
  background: rgba(255, 255, 255, 0.14);
}

.moments-loading,
.moments-empty {
  text-align: center;
  color: #8a8a9a;
  padding: 40px 0;
  font-size: 15px;
}

.moments-empty i {
  font-size: 30px;
  margin-bottom: 10px;
  display: block;
  color: #5b67a0;
}

.moments-sentinel {
  height: 1px;
}

/* ===== Skills (embedded panel) ===== */
.skills-frame-wrap {
  max-width: 1100px;
  margin: 0 auto;
}

.skills-iframe {
  width: 100%;
  height: 78vh;
  min-height: 640px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: #0f1020;
  display: block;
}

.skills-fallback {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 640px;
  margin: 20px auto 0;
  padding: 18px 20px;
  border: 1px dashed rgba(139, 92, 246, 0.25);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), rgba(99, 102, 241, 0.02));
}

.skills-fallback-icon {
  width: 44px;
  height: 44px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.2);
  color: #a78bfa;
  font-size: 17px;
}

.skills-fallback-text {
  flex: 1;
  min-width: 0;
}

.skills-fallback-text b {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #eef0f8;
}

.skills-fallback-text span {
  display: block;
  font-size: 12px;
  color: #8a8a9a;
  margin-top: 2px;
}

.skills-fallback-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s;
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.25);
}

.skills-fallback-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(139, 92, 246, 0.35);
}

.skills-fallback-btn i {
  font-size: 11px;
}

@media (max-width: 600px) {
  .skills-iframe {
    height: 72vh;
    min-height: 480px;
  }

  .skills-fallback {
    flex-wrap: wrap;
  }

  .skills-fallback-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .moments-grid {
    grid-template-columns: 1fr;
  }

  .moments-form {
    flex-direction: column;
  }

  .moments-form-side {
    flex: none;
  }

  .moments-preview {
    width: 100%;
    height: 180px;
  }
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero-title {
    font-size: 52px;
    letter-spacing: -1px;
  }

  .hero-subtitle {
    font-size: 17px;
  }

  .section-title {
    font-size: 32px;
  }

  .postulates-grid {
    grid-template-columns: 1fr;
  }

  .postulate-card.wide {
    grid-column: 1;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand p {
    max-width: 100%;
  }

  .social-icons {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(5, 6, 10, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-auth {
    gap: 8px;
  }

  .hero-title {
    font-size: 34px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .section-title {
    font-size: 26px;
  }

  .section {
    padding: 60px 0;
  }

  .form-wrapper {
    border-radius: 12px;
  }

  .apply-iframe {
    height: 800px;
  }

  .postulate-card {
    padding: 24px 20px;
  }

  .postulate-num {
    font-size: 24px;
    min-width: 32px;
  }

  .family-cards {
    grid-template-columns: 1fr;
  }
}

/* ===== Mobile performance ===== */
@media (max-width: 768px) {
  .navbar,
  .family-overlay-backdrop {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .navbar {
    background: rgba(5, 6, 10, 0.95);
  }
  .footer {
    position: static;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}