@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Playfair+Display:ital,wght@0,400;0,700;1,400;1,700&display=swap');

/* ===== CSS Variables ===== */
:root {
  --primary: #2563EB;
  --primary-light: #3B82F6;
  --primary-dark: #1D4ED8;
  --primary-bg: #EFF6FF;
  --primary-bg-2: #DBEAFE;
  --accent-yellow: #FEF9C3;
  --accent-yellow-dark: #FDE68A;
  --accent-green: #D1FAE5;
  --accent-pink: #FCE7F3;
  --text-dark: #1E293B;
  --text-body: #475569;
  --text-muted: #94A3B8;
  --bg-white: #FFFFFF;
  --bg-light: #F8FAFC;
  --bg-gray: #F1F5F9;
  --border: #E2E8F0;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-body);
  background: var(--bg-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}

input,
textarea,
select {
  font-family: inherit;
  border: none;
  outline: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header / Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  height: 64px;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
}

.navbar-brand .logo-icon {
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  padding: 2px;
}

.navbar-brand .logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-links a {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-body);
  position: relative;
}

.navbar-links a:hover {
  color: var(--primary);
  background: var(--primary-bg);
}

.navbar-links a.active {
  color: var(--primary);
  background: var(--primary-bg);
  font-weight: 600;
}

.navbar-links a.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: var(--primary);
  border-radius: 3px;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-gray);
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid transparent;
  transition: var(--transition);
}

.search-box:focus-within {
  border-color: var(--primary-light);
  background: white;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-box svg {
  color: var(--text-muted);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.search-box input {
  background: transparent;
  font-size: 0.85rem;
  color: var(--text-dark);
  width: 160px;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-gray);
  color: var(--text-body);
  position: relative;
}

.icon-btn:hover {
  background: var(--primary-bg);
  color: var(--primary);
}

.icon-btn .badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: #EF4444;
  border-radius: 50%;
  border: 2px solid white;
}

.avatar-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-login {
  padding: 8px 20px;
  background: var(--primary);
  color: white;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
}

.btn-login:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Mobile menu */
.mobile-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-dark);
}

.mobile-toggle svg {
  width: 24px;
  height: 24px;
}

/* ===== Hero Section ===== */
.hero {
  padding-top: 64px;
  min-height: 90vh;
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, var(--primary-bg) 0%, var(--bg-light) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.05) 0%, transparent 70%);
}

.hero .container {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: white;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  border: 1px solid var(--primary-bg-2);
}

.hero-badge svg {
  width: 14px;
  height: 14px;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero h1 span {
  color: var(--primary);
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-body);
  max-width: 600px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: white;
  color: var(--text-dark);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  border-color: var(--primary-light);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.hero-scroll-indicator {
  margin-top: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  animation: bounce 2s infinite;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(8px);
  }
}

/* ===== Section Commons ===== */
.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--primary-bg);
  color: var(--primary);
  border-radius: 50%;
  margin-bottom: 16px;
  font-size: 1.2rem;
}

.section-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.section-header p {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== Class Message Section ===== */
.message-section {
  background: white;
}

.message-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

.message-content::before {
  content: '"';
  font-family: 'Playfair Display', serif;
  font-size: 6rem;
  color: var(--primary-bg-2);
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  line-height: 1;
}

.message-content blockquote {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-style: italic;
  color: var(--text-body);
  line-height: 1.8;
  position: relative;
  z-index: 1;
}

/* ===== Timeline Section ===== */
.timeline-section {
  background: var(--bg-gray);
}

.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary-bg-2), var(--primary), var(--primary-bg-2));
  border-radius: 3px;
}

.timeline-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.timeline-empty svg {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  color: var(--primary-bg-2);
}

.timeline-empty p {
  font-size: 0.95rem;
}

/* ===== Moments / Gallery Grid ===== */
.moments-section {
  background: white;
}

.moments-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.moment-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 3/4;
  background: var(--bg-gray);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}

.moment-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.moment-card .placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  gap: 8px;
}

.moment-card .placeholder svg {
  width: 40px;
  height: 40px;
  color: var(--border);
}

.moments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.moments-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--text-dark);
}

.moments-header a {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
}

.moments-header a:hover {
  text-decoration: underline;
}

/* ===== Bulletin Board ===== */
.bulletin-page {
  padding-top: 64px;
  min-height: 100vh;
  background: var(--bg-light);
}

.bulletin-banner {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 32px 0;
}

.bulletin-banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bulletin-banner-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.bulletin-banner-icon {
  width: 56px;
  height: 56px;
  background: var(--primary-bg);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.5rem;
}

.bulletin-banner-left h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: var(--text-dark);
  font-weight: 700;
}

.bulletin-banner-left p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.btn-new-post {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-new-post:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.bulletin-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 20px;
}

.bulletin-tabs button {
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-body);
  background: transparent;
  border-radius: 100px;
}

.bulletin-tabs button:hover {
  background: var(--bg-gray);
}

.bulletin-tabs button.active {
  background: var(--primary);
  color: white;
  font-weight: 600;
}

/* Sticky Notes Grid */
.notes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 40px 0;
}

.sticky-note {
  position: relative;
  min-height: 220px;
  border-radius: 4px;
  padding: 28px 20px 20px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.sticky-note:hover {
  transform: translateY(-4px) rotate(-0.5deg);
  box-shadow: var(--shadow-xl);
}

.sticky-note::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: #EF4444;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  z-index: 1;
}

.sticky-note.color-white {
  background: white;
  border: 1px solid var(--border);
}

.sticky-note.color-yellow {
  background: var(--accent-yellow);
}

.sticky-note.color-green {
  background: var(--accent-green);
}

.sticky-note.color-pink {
  background: var(--accent-pink);
}

.sticky-note.color-blue {
  background: var(--primary-bg);
}

.sticky-note .note-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  gap: 8px;
  opacity: 0.5;
}

.sticky-note .note-empty svg {
  width: 32px;
  height: 32px;
}

.sticky-note .note-pin {
  position: absolute;
  top: 12px;
  right: 12px;
  color: var(--primary);
  font-size: 1rem;
}

/* Comments System */
.note-actions {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 6px;
    transition: var(--transition);
}

.action-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary);
}

.comments-section {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(255, 255, 255, 0.3);
    border-bottom-left-radius: inherit;
    border-bottom-right-radius: inherit;
    padding: 15px;
}

.comments-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.comment-item {
    display: flex;
    gap: 10px;
}

.comment-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.comment-body {
    flex: 1;
}

.comment-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.comment-author {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-dark);
}

.comment-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.comment-text {
    font-size: 0.85rem;
    color: var(--text-body);
    line-height: 1.4;
}

.comment-form {
    display: flex;
    gap: 10px;
}

.comment-form input {
    flex: 1;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.85rem;
}

.comment-form button {
    background: var(--primary);
    color: white;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
}

.comment-error, .no-comments, .comment-loading {
    text-align: center;
    font-size: 0.75rem;
    padding: 20px;
    color: var(--text-muted);
}

.bulletin-empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.bulletin-empty-state svg {
  width: 80px;
  height: 80px;
  margin-bottom: 16px;
  color: var(--primary-bg-2);
}

.bulletin-empty-state h3 {
  font-size: 1.2rem;
  color: var(--text-dark);
  margin-bottom: 8px;
}

/* Sticky Note Content */
.sticky-note .note-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 12px;
}

.note-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.note-content p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-body);
  flex: 1;
}

.note-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(0, 0, 0, 0.1);
}

.author-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.author-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dark);
}

.note-date {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Gallery Empty State */
.gallery-empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.gallery-empty-state h3 {
  font-size: 1.2rem;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.gallery-empty-state p {
  font-size: 0.9rem;
}

/* CTA Card */
.cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--primary-bg);
  border-radius: var(--radius-xl);
  padding: 40px;
  border: 1px solid var(--primary-bg-2);
  margin: 40px 0;
}

.cta-content h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.cta-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* Members Empty State */
.members-empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.members-empty-state h3 {
  font-size: 1.2rem;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.members-empty-state p {
  font-size: 0.9rem;
}

/* Glassmorphism utility classes */
.glass-panel {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-xl);
}

/* Banner Icon Background */
.banner-icon-bg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: var(--primary-bg);
  color: var(--primary);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.btn-load-more {
  display: block;
  margin: 0 auto 40px;
  padding: 12px 32px;
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
}

.btn-load-more:hover {
  background: var(--primary);
  color: white;
}

/* ===== Members Page ===== */
.members-page {
  padding-top: 64px;
  min-height: 100vh;
  background: var(--bg-light);
}

.members-banner {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 32px 0;
}

.members-banner-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.members-banner h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: var(--text-dark);
  font-weight: 700;
}

.members-banner .subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.achievement-badges {
  display: flex;
  gap: 12px;
}

.achievement-badge {
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  text-align: center;
}

.achievement-badge.learning {
  background: var(--primary-bg);
  border: 1px solid var(--primary-bg-2);
}

.achievement-badge.activity {
  background: #FEF2F2;
  border: 1px solid #FECACA;
}

.achievement-badge .label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.achievement-badge.learning .label {
  color: var(--primary);
}

.achievement-badge.activity .label {
  color: #DC2626;
}

.achievement-badge .value {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-dark);
}

.members-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
}

.members-tabs button {
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}

.members-tabs button:hover {
  color: var(--text-dark);
}

.members-tabs button.active {
  color: var(--text-dark);
  font-weight: 600;
  border-bottom-color: var(--text-dark);
}

/* Members Grid */
.members-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 40px 0;
}

.member-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.member-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.member-card-image {
  position: relative;
  height: 200px;
  background: linear-gradient(135deg, var(--primary-bg) 0%, var(--primary-bg-2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.member-card-image .placeholder-avatar {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-light);
}

.member-card-image .placeholder-avatar svg {
  width: 40px;
  height: 40px;
}

.member-card-role {
  position: absolute;
  bottom: 12px;
  left: 12px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: white;
}

.member-card-role.lop-truong {
  background: var(--primary);
}

.member-card-role.lop-pho {
  background: #7C3AED;
}

.member-card-role.thanh-vien {
  background: #059669;
}

.member-card-role.to-truong {
  background: #D97706;
}

.member-card-name {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
}

.member-card-name h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.member-card-body {
  padding: 16px;
}

.member-card-body .nickname-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.member-card-body .nickname-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.member-card-body .nickname {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
  font-style: italic;
}

.member-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.member-tags .tag {
  padding: 4px 10px;
  background: var(--bg-gray);
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-body);
  text-transform: uppercase;
}

.member-quote {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  color: var(--text-body);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 16px;
  position: relative;
  padding-left: 16px;
  border-left: 3px solid var(--primary-bg-2);
}

.btn-view-profile {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px;
  background: var(--primary-bg);
  color: var(--primary);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
}

.btn-view-profile:hover {
  background: var(--primary);
  color: white;
}

.members-empty {
  text-align: center;
  padding: 80px 20px;
  grid-column: 1 / -1;
}

.members-empty svg {
  width: 80px;
  height: 80px;
  color: var(--primary-bg-2);
  margin-bottom: 16px;
}

.members-empty h3 {
  font-size: 1.1rem;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.members-empty p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 0 60px;
}

.pagination button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  color: var(--text-body);
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.pagination button.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ===== Gallery Page ===== */
.gallery-page {
  padding-top: 64px;
  min-height: 100vh;
  background: var(--bg-light);
}

.gallery-banner {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 32px 0;
}

.gallery-banner .overline {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.gallery-banner h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: var(--text-dark);
  font-weight: 700;
}

.gallery-banner h1 span {
  color: var(--primary);
}

.gallery-banner .description {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 8px;
  max-width: 500px;
}

.gallery-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
}

.gallery-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
}

.gallery-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-body);
  background: transparent;
  border-radius: 100px;
}

.gallery-tabs button:hover {
  background: var(--bg-gray);
}

.gallery-tabs button.active {
  background: var(--primary);
  color: white;
  font-weight: 600;
}

.gallery-tabs button svg {
  width: 14px;
  height: 14px;
}

.sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.sort-btn:hover {
  color: var(--text-dark);
}

/* Album Grid */
.album-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 40px 0;
}

.album-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/5;
  background: linear-gradient(135deg, var(--primary-bg) 0%, var(--primary-bg-2) 100%);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}

.album-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.album-card .album-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: white;
}

.album-card .album-tag.gio-hoc {
  background: var(--primary);
}

.album-card .album-tag.vui-choi {
  background: #059669;
}

.album-card .album-tag.le-tot-nghiep {
  background: #DC2626;
}

.album-card .album-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 16px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.5));
  color: white;
}

.album-card .album-info h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.album-card .album-info p {
  font-size: 0.75rem;
  opacity: 0.8;
}

.album-card .placeholder-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-light);
  opacity: 0.3;
}

.album-card .placeholder-img svg {
  width: 48px;
  height: 48px;
}

/* Gallery Upload CTA */
.gallery-cta {
  background: var(--primary-bg);
  border-radius: var(--radius-xl);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 60px;
  border: 1px solid var(--primary-bg-2);
}

.gallery-cta-left h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.gallery-cta-left p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.btn-upload {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
}

.btn-upload:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

.gallery-cta-right {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.gallery-cta-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--primary-bg-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 700;
}

/* ===== Footer ===== */
.footer {
  background: white;
  border-top: 1px solid var(--border);
  padding: 40px 0 24px;
}

.footer-content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 32px;
}

.footer-brand {
  max-width: 300px;
}

.footer-brand .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.footer-brand .logo .logo-icon {
  width: 32px;
  height: 32px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.9rem;
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-links-group h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.footer-links-group a {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 4px 0;
}

.footer-links-group a:hover {
  color: var(--primary);
}

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  background: var(--bg-gray);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.footer-social a:hover {
  background: var(--primary-bg);
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-bottom-links {
  display: flex;
  gap: 24px;
}

.footer-bottom-links a:hover {
  color: var(--primary);
}

.footer-quote {
  text-align: center;
  padding: 20px 0 0;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== Modal ===== */
/* All modal styles unified below in AUTH MODALS section */

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  padding: 24px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark);
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.2rem;
}

.modal-close:hover {
  background: #FEE2E2;
  color: #DC2626;
}

.modal-body {
  padding: 24px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.form-group textarea,
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-gray);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-dark);
  resize: vertical;
  transition: var(--transition);
}

.form-group textarea:focus,
.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="email"]:focus {
  border-color: var(--primary-light);
  background: white;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
  min-height: 100px;
}

.color-options {
  display: flex;
  gap: 8px;
}

.color-option {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}

.color-option:hover,
.color-option.selected {
  border-color: var(--primary);
  transform: scale(1.1);
}

.color-option.opt-white {
  background: #f8f9fa;
  border: 3px solid var(--border);
}

.color-option.opt-yellow {
  background: var(--accent-yellow);
}

.color-option.opt-green {
  background: var(--accent-green);
}

.color-option.opt-pink {
  background: var(--accent-pink);
}

.color-option.opt-blue {
  background: var(--primary-bg);
}

.modal-footer {
  padding: 0 24px 24px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.btn-cancel {
  padding: 10px 20px;
  background: var(--bg-gray);
  color: var(--text-body);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
}

.btn-cancel:hover {
  background: var(--border);
}

.btn-submit {
  padding: 10px 24px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
}

.btn-submit:hover {
  background: var(--primary-dark);
}

/* ===== Animations ===== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .notes-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .members-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .moments-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .album-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .navbar-links {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }

  .navbar-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    box-shadow: var(--shadow-lg);
    animation: slideDown 0.3s ease;
    z-index: 999;
  }

  @keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .navbar-links.active a {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
  }

  .btn-login {
    padding: 10px 24px;
    font-size: 0.9rem;
  }

  .modal {
    width: 95%;
    max-width: 400px;
    max-height: 85vh;
  }

  .modal-body {
    padding: 20px;
  }

  .user-profile-nav {
    padding: 2px 6px;
  }

  .user-avatar-mini {
    width: 28px;
    height: 28px;
    font-size: 0.7rem;
  }

  .bulletin-banner h1 {
    font-size: 1.3rem;
  }

  .members-banner h1 {
    font-size: 1.3rem;
  }

  .members-tabs {
    gap: 4px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .members-tabs::-webkit-scrollbar {
    display: none;
  }

  .members-tabs button {
    padding: 8px 14px;
    font-size: 0.8rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .bulletin-tabs {
    gap: 4px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .bulletin-tabs::-webkit-scrollbar {
    display: none;
  }

  .bulletin-tabs button {
    padding: 6px 14px;
    font-size: 0.8rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .sticky-note {
    min-height: 180px;
    padding: 20px 16px 16px;
  }

  .note-content p {
    font-size: 0.85rem;
  }

  .hero-scroll-indicator {
    display: none;
  }

  .container {
    padding: 0 16px;
  }

  .section {
    padding: 60px 0;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero p {
    font-size: 0.95rem;
  }

  .notes-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .members-grid {
    grid-template-columns: 1fr;
  }

  .moments-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .album-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .bulletin-banner-content {
    flex-direction: column;
    gap: 16px;
  }

  .members-banner-top {
    flex-direction: column;
    gap: 16px;
  }

  .gallery-cta {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .gallery-filter-bar {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .footer-content {
    flex-direction: column;
    gap: 24px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .search-box {
    display: none;
  }

  /* Blog Mobile */
  .blog-grid {
      grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .notes-grid {
    grid-template-columns: 1fr;
  }

  .album-grid {
    grid-template-columns: 1fr;
  }

  .moments-grid {
    grid-template-columns: 1fr;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .section {
    padding: 60px 0;
  }

  .bulletin-tabs {
    overflow-x: auto;
  }

  .gallery-tabs {
    overflow-x: auto;
  }

  .members-tabs {
    overflow-x: auto;
  }

  .achievement-badges {
    flex-direction: column;
  }
}

/* ==========================================
   AUTH MODALS & USER PROFILE (DYNAMIC)
   ========================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: white;
  width: 90%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  transform: translateY(20px);
  transition: all 0.3s ease;
  animation: modalIn 0.3s ease;
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body {
  padding: 24px;
}

.form-group {
  margin-bottom: 16px;
}

.login-error {
  display: none;
  background: #FEE2E2;
  color: #DC2626;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  border: 1px solid #FECACA;
  text-align: center;
}

.login-error.show {
  display: block;
  animation: slideDown 0.3s ease;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  background: var(--bg-gray);
  color: var(--text-dark);
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary-light);
  background: white;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  outline: none;
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px !important;
}

.status-group {
    background: var(--accent-yellow);
    color: #854d0e;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    margin-left: 5px;
}

/* User Profile Nav */
.user-profile-nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px;
  border-radius: 100px;
  background: var(--bg-gray);
  cursor: pointer;
}

.user-avatar-mini {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  background-size: cover;
  background-position: center;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s;
  z-index: 100;
}

.user-profile-nav:hover .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-info-header {
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.user-info-header strong {
  display: block;
  font-size: 0.85rem;
}

.user-info-header span {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

.user-dropdown button {
  width: 100%;
  text-align: left;
  padding: 8px;
  background: none;
  border: none;
  font-size: 0.8rem;
  color: #e11d48;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border-radius: 6px;
}

.user-dropdown button:hover {
  background: #fff1f2;
}

/* Home Grid Improvement */
.moment-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 15px;
  color: white;
}

.moment-author {
  font-size: 0.75rem;
  margin-top: 4px;
  opacity: 0.8;
}

/* Footer Quote */
.footer-quote {
  text-align: center;
  margin-top: 40px;
  font-style: italic;
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.7;
}

/* ===== Loader Splash Screen ===== */
.loader-overlay {
  position: fixed;
  inset: 0;
  background: #0f172a;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s;
}

.loader-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
}

.loader-logo {
  width: 100px;
  height: 100px;
  margin-bottom: 24px;
  animation: pulse-logo 2s infinite ease-in-out;
}

.loader-logo img {
    filter: drop-shadow(0 0 15px rgba(34, 197, 94, 0.4));
}

@keyframes pulse-logo {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; filter: drop-shadow(0 0 25px rgba(34, 197, 94, 0.6)); }
}

.loader-progress {
  width: 200px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  overflow: hidden;
  position: relative;
}

.loader-progress::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 50%;
  background: linear-gradient(90deg, transparent, #22c55e, transparent);
  animation: loader-line 1.5s infinite ease-in-out;
}

@keyframes loader-line {
  0% { left: -100%; }
  100% { left: 100%; }
}

.loader-text {
  margin-top: 16px;
  color: white;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.6;
}

/* ===== Notification Cards ===== */
.notification-card {
  background: white;
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.notification-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.notification-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
}

.notification-card.urgent::before {
  background: #EF4444;
}

.notification-card.info::before {
  background: #3B82F6;
}

.notification-card.success::before {
  background: #10B981;
}

.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.notification-type {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--bg-gray);
  color: var(--text-muted);
}

.notification-card.urgent .notification-type { background: #FEE2E2; color: #DC2626; }
.notification-card.info .notification-type { background: #DBEAFE; color: #1E40AF; }
.notification-card.success .notification-type { background: #D1FAE5; color: #065F46; }

.notification-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.notification-content {
  font-size: 0.9rem;
  color: var(--text-body);
  line-height: 1.6;
}

.ai-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
  filter: brightness(1.1);
}

.ai-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}

.ai-btn:hover::after {
  opacity: 1;
}

.ai-btn svg {
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
}

/* ===== Survey & Tour Stylings (Premium) ===== */
.survey-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000; /* Just below driver.js which is usually 100000 */
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.survey-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.survey-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 28px;
    width: 90%;
    max-width: 500px;
    padding: 40px;
    box-shadow: 0 32px 64px -16px rgba(0, 0, 0, 0.2);
    transform: scale(0.9) translateY(20px);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.survey-modal-overlay.active .survey-card {
    transform: scale(1) translateY(0);
}

.survey-step {
    display: none;
    animation: fadeInSlide 0.5s ease forwards;
}

.survey-step.active {
    display: block;
}

@keyframes fadeInSlide {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.survey-card h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary), #6366f1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.survey-card p.subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 30px;
}

.survey-question-label {
    display: block;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.survey-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
}

.survey-opt {
    padding: 14px 20px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.survey-opt:hover {
    border-color: var(--primary);
    background: var(--primary-bg);
    transform: translateX(5px);
}

.survey-opt.selected {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.3);
}

.survey-textarea {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: white;
    font-family: inherit;
    font-size: 0.95rem;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.survey-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    outline: none;
}

.survey-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-survey-next {
    padding: 14px 32px;
    background: var(--primary);
    color: white;
    border-radius: 16px;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.btn-survey-next:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-survey-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.survey-progress {
    height: 6px;
    background: var(--bg-gray);
    border-radius: 10px;
    width: 100px;
    overflow: hidden;
}

.survey-progress-bar {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.4s ease;
}

/* Driver.js popover theme */
.driver-popover.driverjs-theme {
  background-color: #ffffff !important;
  color: #000 !important;
  border-radius: 20px !important;
  padding: 24px !important;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2) !important;
}

.driver-popover.driverjs-theme .driver-popover-title {
  font-family: 'Playfair Display', serif !important;
  font-size: 1.4rem !important;
  color: var(--primary) !important;
  margin-bottom: 10px !important;
}

.driver-popover.driverjs-theme .driver-popover-description {
  font-family: 'Inter', sans-serif !important;
  font-size: 1rem !important;
  line-height: 1.6 !important;
  color: var(--text-body) !important;
}

.driver-popover.driverjs-theme .driver-popover-btn {
  border-radius: 10px !important;
  padding: 8px 16px !important;
  font-weight: 600 !important;
}

.driver-popover.driverjs-theme .driver-popover-next-btn {
  background-color: var(--primary) !important;
  color: white !important;
  text-shadow: none !important;
}

/* ===== Public Profile Link Colors ===== */
.author-name a, 
.comment-author a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.author-name a:hover, 
.comment-author a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.comment-avatar {
    cursor: pointer;
    transition: transform 0.2s;
}

.comment-avatar:hover {
    transform: scale(1.05);
}

/* ===== Profile View Mode Specifics ===== */
body.profile-view-mode .btn-change-avatar,
body.profile-view-mode .profile-actions,
body.profile-view-mode .alert-info {
    display: none !important;
}

body.profile-view-mode .form-group input,
body.profile-view-mode .form-group select,
body.profile-view-mode .form-group textarea {
    background: transparent !important;
    border: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    color: #1e293b !important;
    font-size: 1.05rem !important;
    font-weight: 500 !important;
    pointer-events: none !important;
    resize: none !important;
}

body.profile-view-mode .form-group label {
    color: #94a3b8 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    font-size: 0.75rem !important;
}

body.profile-view-mode .profile-main {
    background: white !important;
}

.profile-join-date {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 10px;
    display: block;
}

/* ===== Member Search Bar ===== */
.members-search-wrapper {
    margin-top: 25px;
    width: 100%;
    max-width: 500px;
}

.members-search-container {
    position: relative;
    width: 100%;
}

.members-search-input {
    width: 100%;
    padding: 14px 20px 14px 45px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 100px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.members-search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.members-search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    width: 105%;
    margin-left: -2.5%;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    pointer-events: none;
}

/* Quick Search Shortcut on Profile */
.profile-search-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #FFD700;
    color: #1a1a2e;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    margin-left: 15px;
    vertical-align: middle;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.profile-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* View Profile Button on Member Card */
.view-profile-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -20%);
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 10px 20px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 5;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.member-card:hover .view-profile-btn {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%);
}

.view-profile-btn:hover {
    background: white;
    color: var(--primary);
    transform: translate(-50%, -50%) scale(1.05) !important;
}
/* ===== Version 2.0.0 Update Modal ===== */
#versionModal .modal {
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.3);
}

.version-feature-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding: 12px;
    border-radius: 12px;
    transition: var(--transition);
}

.version-feature-item:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: translateX(5px);
}

/* ===== Toast Notification ===== */
.toast-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 99999;
  pointer-events: none;
}

.toast {
  background: white;
  color: var(--text-dark);
  padding: 16px 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  border-left: 4px solid var(--primary);
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 10px;
  pointer-events: auto;
  animation: toast-in 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes toast-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.hiding {
  animation: toast-out 0.5s ease-in forwards;
}

@keyframes toast-out {
  to { transform: translateX(100%); opacity: 0; }
}

.toast-icon {
  font-size: 1.5rem;
}

.toast-content p {
  margin: 0;
  font-weight: 600;
  font-size: 0.95rem;
}

.toast-content a {
  font-size: 0.8rem;
  color: var(--primary);
  text-decoration: underline;
}
