/* ================================================
   MESSIAHSPHERE COMMUNITY - CSS STYLESHEET
   Colors from logo: Navy #0d1b3e, Royal Blue #1a4bbd,
   Silver/White #c8d4f0, Deep Blue #061028
================================================ */

/* CSS VARIABLES */
:root {
  --primary: #0d1b3e;
  --primary-dark: #061028;
  --primary-light: #1a3a7c;
  --royal: #1a4bbd;
  --royal-light: #2d63e0;
  --royal-dark: #1238a0;
  --silver: #c8d4f0;
  --silver-light: #e0e8ff;
  --silver-dark: #8fa3d8;
  --white: #ffffff;
  --light: #f0f2f8;
  --light2: #e4e8f5;
  --text: #1c1e21;
  --text-muted: #5a6380;
  --border: #d0d8ec;
  --danger: #e74c3c;
  --success: #2ecc71;
  --warning: #f39c12;
  --info: #3498db;
  --shadow: 0 2px 12px rgba(13,27,62,0.10);
  --shadow-lg: 0 8px 30px rgba(13,27,62,0.18);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-full: 50px;
  --gold: var(--royal);
  --gold-light: var(--royal-light);
  --gold-dark: var(--royal-dark);
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif; color: var(--text); background: var(--light); line-height: 1.5; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* SCROLLBAR */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--light); }
::-webkit-scrollbar-thumb { background: var(--royal); border-radius: 3px; }

/* ===== UTILITIES ===== */
.hidden { display: none !important; }
.text-muted { color: var(--text-muted); font-size: 0.875rem; }
.online-dot { color: var(--success); font-size: 0.6rem; }
.badge { background: var(--danger); color: white; border-radius: 50px; font-size: 10px; padding: 1px 5px; min-width: 16px; text-align: center; font-weight: bold; }

/* ===== BUTTONS ===== */
.btn-primary {
  background: linear-gradient(135deg, var(--royal), var(--primary));
  color: white;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary:hover { background: linear-gradient(135deg, var(--royal-light), var(--royal)); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-secondary { background: var(--light2); color: var(--text); padding: 10px 20px; border-radius: var(--radius-sm); font-weight: 600; transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px; }
.btn-secondary:hover { background: var(--border); }
.btn-full { width: 100%; justify-content: center; }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn-xs { padding: 4px 10px; font-size: 0.8rem; border-radius: 6px; display: inline-flex; align-items: center; gap: 4px; font-weight: 600; transition: all 0.2s; }
.btn-danger { background: #fde; color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: white; }
.btn-warning { background: #fff3cd; color: var(--warning); }
.btn-warning:hover { background: var(--warning); color: white; }
.btn-success { background: #d4edda; color: var(--success); }
.btn-success:hover { background: var(--success); color: white; }
.btn-icon-only { padding: 8px; border-radius: 50%; color: var(--text-muted); transition: all 0.2s; }
.btn-icon-only:hover { background: var(--light2); color: var(--royal); }
.btn-ad { display: inline-block; background: var(--royal); color: white; padding: 8px 16px; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.85rem; transition: all 0.2s; }
.btn-ad:hover { background: var(--royal-light); }
.btn-close { font-size: 1.5rem; color: var(--text-muted); padding: 4px 8px; border-radius: 50%; transition: all 0.2s; }
.btn-close:hover { background: var(--light2); }
.btn-send { background: var(--royal); color: white; padding: 8px 14px; border-radius: var(--radius-sm); transition: all 0.2s; }
.btn-send:hover { background: var(--royal-dark); }

/* ===== ALERTS ===== */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; font-weight: 500; }
.alert-error { background: #fde8e8; color: var(--danger); border-left: 4px solid var(--danger); }
.alert-success { background: #e8f5e9; color: #1e7e34; border-left: 4px solid var(--success); }

/* ===== STATUS BADGES ===== */
.status-badge { padding: 3px 10px; border-radius: 50px; font-size: 0.75rem; font-weight: 600; }
.status-badge.active { background: #d4edda; color: #155724; }
.status-badge.blocked { background: #f8d7da; color: #721c24; }
.online-status { color: var(--success); font-size: 0.8rem; font-weight: 500; }
.offline-status { color: var(--text-muted); font-size: 0.8rem; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.9rem; color: var(--primary); }
.form-group label i { margin-right: 5px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  transition: border-color 0.2s;
  background: white;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none;
  border-color: var(--royal);
}
.form-group small { font-size: 0.78rem; color: var(--text-muted); display: block; margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.input-password { position: relative; display: flex; }
.input-password input { flex: 1; padding-right: 45px; }
.input-password button { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.form-group.remember label { display: flex; align-items: center; gap: 8px; font-weight: normal; color: var(--text-muted); cursor: pointer; }
.form-group.terms label { display: flex; align-items: flex-start; gap: 8px; font-weight: normal; color: var(--text-muted); cursor: pointer; font-size: 0.875rem; }
.auth-form .form-group input[type=checkbox] { width: auto; }

/* ===== HEADER ===== */
.main-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
  padding: 0;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; max-width: 1400px; margin: 0 auto; padding: 0 24px; height: 64px; }
.logo-area { display: flex; align-items: center; gap: 12px; }
.logo-img { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--silver); object-fit: cover; }
.logo-text h1 { color: var(--silver-light); font-size: 1.4rem; font-weight: 700; letter-spacing: 0.5px; }
.logo-text h1 span { color: var(--royal-light); }
.logo-text span { color: rgba(200,212,240,0.65); font-size: 0.75rem; display: block; }
.main-nav { display: flex; gap: 8px; }
.main-nav a { color: rgba(200,212,240,0.85); padding: 8px 16px; border-radius: var(--radius-sm); transition: all 0.2s; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.main-nav a:hover { color: var(--silver-light); background: rgba(255,255,255,0.12); }

/* ===== HERO ANIMÉ ===== */
.hero-section {
  position: relative;
  padding: 60px 24px;
  text-align: center;
  overflow: hidden;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-animated-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    var(--primary-dark),
    var(--primary),
    var(--primary-light),
    var(--royal),
    var(--royal-light),
    var(--primary),
    var(--primary-dark)
  );
  background-size: 400% 400%;
  animation: heroGradient 8s ease infinite;
  z-index: 0;
}
@keyframes heroGradient {
  0%   { background-position: 0% 50%; }
  25%  { background-position: 100% 50%; }
  50%  { background-position: 100% 0%; }
  75%  { background-position: 0% 100%; }
  100% { background-position: 0% 50%; }
}
/* Orbes lumineux circulants */
.hero-animated-bg::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(100,150,255,0.25) 0%, transparent 70%);
  border-radius: 50%;
  top: -150px; left: -100px;
  animation: orbeFloat 6s ease-in-out infinite alternate;
}
.hero-animated-bg::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(200,220,255,0.18) 0%, transparent 70%);
  border-radius: 50%;
  bottom: -100px; right: -80px;
  animation: orbeFloat 7s ease-in-out infinite alternate-reverse;
}
@keyframes orbeFloat {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(60px, 30px) scale(1.2); }
}
.hero-content { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; }
.hero-logo-wrap { margin-bottom: 20px; }
.hero-logo-img {
  width: 90px; height: 90px; border-radius: 50%;
  border: 3px solid rgba(200,212,240,0.6);
  object-fit: cover;
  margin: 0 auto;
  box-shadow: 0 0 30px rgba(100,150,255,0.4), 0 4px 20px rgba(0,0,0,0.3);
  animation: logoPulse 3s ease-in-out infinite;
}
@keyframes logoPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(100,150,255,0.3), 0 4px 20px rgba(0,0,0,0.3); }
  50% { box-shadow: 0 0 45px rgba(100,150,255,0.6), 0 4px 25px rgba(0,0,0,0.4); }
}
.hero-content h2 { color: var(--silver-light); font-size: 2.1rem; font-weight: 700; margin-bottom: 14px; text-shadow: 0 2px 10px rgba(0,0,0,0.4); }
.hero-content p { color: rgba(200,212,240,0.85); font-size: 1.05rem; max-width: 650px; margin: 0 auto 28px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-hero-primary {
  background: linear-gradient(135deg, var(--royal), var(--royal-dark));
  color: white;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1rem;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all 0.25s;
  box-shadow: 0 4px 15px rgba(26,75,189,0.4);
}
.btn-hero-primary:hover { background: linear-gradient(135deg, var(--royal-light), var(--royal)); transform: translateY(-2px); box-shadow: 0 8px 25px rgba(26,75,189,0.5); }
.btn-hero-secondary {
  background: rgba(255,255,255,0.12);
  color: var(--silver-light);
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid rgba(200,212,240,0.3);
  transition: all 0.25s;
  backdrop-filter: blur(6px);
}
.btn-hero-secondary:hover { background: rgba(255,255,255,0.22); border-color: rgba(200,212,240,0.5); transform: translateY(-2px); }

/* ===== LANDING PAGE ===== */
.landing-body { background: var(--light); }
.landing-container { display: grid; grid-template-columns: 1fr 380px; gap: 30px; max-width: 1400px; margin: 0 auto; padding: 30px 24px; }
.section-title { color: var(--primary); font-size: 1.25rem; font-weight: 700; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; border-bottom: 3px solid var(--royal); padding-bottom: 10px; }
.section-title i { color: var(--royal); }

/* ===== ADS CAROUSEL ===== */
.ads-section { margin-bottom: 30px; }
.ads-carousel-wrapper { position: relative; overflow: hidden; }
.ads-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.ad-slide {
  min-width: calc(33.333% - 11px);
  margin-right: 16px;
  flex-shrink: 0;
}
/* Quand <= 3 ads, on étale sur toute la largeur */
.ads-track .ad-slide:only-child,
.ads-track .ad-slide:first-child:nth-last-child(1),
.ads-track .ad-slide:first-child:nth-last-child(2),
.ads-track .ad-slide:first-child:nth-last-child(2) ~ .ad-slide,
.ads-track .ad-slide:first-child:nth-last-child(3),
.ads-track .ad-slide:first-child:nth-last-child(3) ~ .ad-slide {
  min-width: calc(33.333% - 11px);
}
.ad-card { background: white; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; height: 100%; }
.ad-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.ad-active { border-top: 3px solid var(--royal); }
.ad-image-wrap { position: relative; height: 145px; overflow: hidden; }
.ad-image-wrap img { width: 100%; height: 100%; object-fit: cover; }
.ad-no-image {
  height: 90px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex; align-items: center; justify-content: center;
}
.ad-no-image i { font-size: 2.5rem; color: rgba(200,212,240,0.35); }
.ad-badge { position: absolute; top: 8px; right: 8px; background: linear-gradient(135deg, var(--royal), var(--royal-dark)); color: white; padding: 3px 10px; border-radius: 50px; font-size: 0.7rem; font-weight: 700; display: flex; align-items: center; gap: 4px; }
.ad-body { padding: 14px; }
.ad-body h3 { color: var(--primary); font-size: 0.95rem; font-weight: 700; margin-bottom: 6px; }
.ad-desc-short { color: var(--text-muted); font-size: 0.82rem; margin-bottom: 12px; line-height: 1.5; min-height: 36px; }
.btn-ad-details {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, var(--royal), var(--primary));
  color: white;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s;
}
.btn-ad-details:hover { background: linear-gradient(135deg, var(--royal-light), var(--royal)); transform: translateY(-1px); }
.ad-empty { border: 2px dashed var(--border); }
.ad-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 50px 20px; color: var(--text-muted); gap: 10px; }
.ad-placeholder i { font-size: 2.5rem; opacity: 0.25; }
.ads-nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }
.ads-nav-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: white;
  color: var(--primary);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  transition: all 0.2s;
  box-shadow: var(--shadow);
}
.ads-nav-btn:hover { background: var(--royal); color: white; border-color: var(--royal); }
.ads-dots { display: flex; gap: 8px; align-items: center; }
.ads-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); cursor: pointer; transition: all 0.2s; }
.ads-dot.active { background: var(--royal); transform: scale(1.3); }
.ads-empty-state { text-align: center; padding: 50px; color: var(--text-muted); }
.ads-empty-state i { font-size: 3rem; opacity: 0.2; display: block; margin-bottom: 10px; }

/* ===== MODAL ANNONCE ===== */
.ad-modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(6,16,40,0.75);
  z-index: 9000;
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.ad-modal-overlay.active { display: flex; }
.ad-modal {
  background: white;
  border-radius: var(--radius);
  max-width: 620px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  position: relative;
  animation: modalSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalSlideIn {
  from { transform: scale(0.85) translateY(30px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
.ad-modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--light); color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; z-index: 1;
  transition: all 0.2s;
}
.ad-modal-close:hover { background: var(--danger); color: white; }
.ad-modal-inner { display: flex; flex-direction: column; }
.ad-modal-img { height: 240px; overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; }
.ad-modal-img img { width: 100%; height: 100%; object-fit: cover; }
.ad-modal-body { padding: 24px; }
.ad-modal-body h2 { color: var(--primary); font-size: 1.4rem; font-weight: 700; margin: 10px 0 14px; }
.ad-modal-body p { color: var(--text-muted); line-height: 1.7; font-size: 0.95rem; }
.btn-ad-external {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--royal), var(--primary));
  color: white; padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-weight: 700; font-size: 0.9rem;
  margin-top: 18px;
  transition: all 0.2s;
}
.btn-ad-external:hover { background: linear-gradient(135deg, var(--royal-light), var(--royal)); transform: translateY(-1px); }

/* INFO SECTION */
.info-section { margin-bottom: 30px; }
.info-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.info-card { background: white; padding: 20px; border-radius: var(--radius); text-align: center; box-shadow: var(--shadow); border-bottom: 3px solid var(--royal); }
.info-card i { font-size: 2rem; color: var(--royal); margin-bottom: 10px; }
.info-card h3 { color: var(--primary); font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.info-card p { color: var(--text-muted); font-size: 0.875rem; }

/* STATS */
.stats-section { display: flex; gap: 0; background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--royal)); border-radius: var(--radius); overflow: hidden; margin-bottom: 30px; }
.stat-item { flex: 1; text-align: center; padding: 24px 16px; display: flex; flex-direction: column; align-items: center; gap: 4px; border-right: 1px solid rgba(255,255,255,0.1); }
.stat-item:last-child { border-right: none; }
.stat-item i { font-size: 1.5rem; color: var(--silver); margin-bottom: 6px; }
.stat-number { font-size: 1.8rem; font-weight: 700; color: white; }
.stat-label { font-size: 0.8rem; color: rgba(200,212,240,0.75); }

/* AUTH BOX */
.landing-right { position: sticky; top: 90px; height: fit-content; }
.auth-box { background: white; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 30px; border-top: 4px solid var(--royal); }
.auth-logo { text-align: center; margin-bottom: 16px; }
.auth-logo img { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; margin: 0 auto; border: 3px solid var(--royal); }
.auth-box h2 { text-align: center; color: var(--primary); font-size: 1.5rem; font-weight: 700; margin-bottom: 4px; }
.auth-subtitle { text-align: center; color: var(--text-muted); font-size: 0.875rem; margin-bottom: 20px; }
.auth-links { display: flex; justify-content: center; gap: 12px; margin-top: 16px; font-size: 0.875rem; }
.auth-links a { color: var(--royal); font-weight: 600; display: flex; align-items: center; gap: 5px; }
.auth-links a:hover { color: var(--royal-light); }
.auth-divider { text-align: center; margin: 16px 0; position: relative; }
.auth-divider::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--border); }
.auth-divider span { background: white; padding: 0 12px; position: relative; color: var(--text-muted); font-size: 0.85rem; }

/* ===== FOOTER ===== */
.main-footer { background: var(--primary-dark); color: rgba(200,212,240,0.75); padding: 40px 24px 0; margin-top: 40px; }
.footer-inner { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; max-width: 1400px; margin: 0 auto; padding-bottom: 30px; }
.footer-col a { display: block; color: rgba(200,212,240,0.65); padding: 3px 0; transition: color 0.2s; font-size: 0.9rem; }
.footer-col a:hover { color: var(--silver-light); }
.footer-col h4 { color: var(--silver); font-weight: 700; margin-bottom: 14px; }
.footer-col p { font-size: 0.875rem; margin-bottom: 8px; }
.footer-logo { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; margin-bottom: 10px; border: 2px solid var(--silver-dark); }
.footer-bottom { text-align: center; padding: 14px; border-top: 1px solid rgba(255,255,255,0.08); font-size: 0.8rem; }

/* ===== AUTH PAGES ===== */
.auth-body { background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%); min-height: 100vh; }
.auth-page-container { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; }
.auth-header-bar { width: 100%; max-width: 600px; display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.auth-header-bar a { display: flex; align-items: center; gap: 10px; color: var(--silver); font-size: 1.2rem; font-weight: 700; }
.logo-img-sm { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.register-box { background: white; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 32px; width: 100%; max-width: 600px; }
.register-box h2 { color: var(--primary); font-size: 1.5rem; font-weight: 700; margin-bottom: 6px; display: flex; align-items: center; gap: 10px; }

/* ===== TOP NAV (App) ===== */
.top-nav {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  position: sticky; top: 0; z-index: 200;
  box-shadow: 0 2px 10px rgba(0,0,0,0.35);
}
.nav-left, .nav-right { display: flex; align-items: center; gap: 10px; flex: 1; }
.nav-right { justify-content: flex-end; }
.nav-center { display: flex; align-items: center; gap: 4px; }
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo img { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--silver); object-fit: cover; }
.nav-logo span { color: var(--silver-light); font-weight: 700; font-size: 1.1rem; }
.nav-btn { position: relative; color: rgba(200,212,240,0.85); padding: 8px 16px; border-radius: var(--radius-sm); transition: all 0.2s; display: flex; align-items: center; gap: 6px; font-size: 1.1rem; }
.nav-btn:hover, .nav-btn.active { color: var(--silver-light); background: rgba(255,255,255,0.12); }
.nav-btn .badge { position: absolute; top: 4px; right: 8px; }
.icon-btn { padding: 8px 12px; }
.nav-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid var(--silver); cursor: pointer; transition: all 0.2s; }
.nav-avatar:hover { border-color: var(--silver-light); transform: scale(1.05); }
.nav-profile-menu { position: relative; }
.profile-dropdown { position: absolute; right: 0; top: 110%; background: white; border-radius: var(--radius); box-shadow: var(--shadow-lg); min-width: 180px; overflow: hidden; z-index: 300; border: 1px solid var(--border); }
.profile-dropdown a { display: flex; align-items: center; gap: 10px; padding: 12px 16px; color: var(--text); font-size: 0.9rem; transition: background 0.15s; }
.profile-dropdown a:hover { background: var(--light); }
.profile-dropdown hr { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

/* SEARCH */
.search-bar { position: relative; }
.search-bar i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: rgba(200,212,240,0.6); }
.search-bar input { background: rgba(255,255,255,0.12); border: none; border-radius: var(--radius-full); padding: 8px 16px 8px 36px; color: white; font-size: 0.9rem; width: 260px; transition: all 0.2s; }
.search-bar input::placeholder { color: rgba(200,212,240,0.55); }
.search-bar input:focus { background: rgba(255,255,255,0.2); outline: none; }
.search-dropdown { position: absolute; top: 110%; left: 0; right: 0; background: white; border-radius: var(--radius); box-shadow: var(--shadow-lg); max-height: 320px; overflow-y: auto; display: none; z-index: 300; border: 1px solid var(--border); }
.search-dropdown.show { display: block; }
.search-result { display: flex; align-items: center; gap: 12px; padding: 10px 16px; transition: background 0.15s; border-bottom: 1px solid var(--light); }
.search-result:hover { background: var(--light); }
.search-result img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.search-result strong { display: block; color: var(--text); font-size: 0.9rem; }
.search-result span { display: block; color: var(--text-muted); font-size: 0.8rem; }

/* ===== APP CONTAINER ===== */
.app-body { background: var(--light); }
.app-container { display: grid; grid-template-columns: 260px 1fr 280px; gap: 20px; max-width: 1400px; margin: 0 auto; padding: 20px 16px; }

/* ===== SIDEBAR ===== */
.sidebar-left, .sidebar-right {
  position: sticky; top: 76px; height: fit-content;
}
.sidebar-user { padding: 16px; }
.sidebar-profile-link { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--radius-sm); transition: background 0.2s; }
.sidebar-profile-link:hover { background: var(--light2); }
.sidebar-profile-link img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--royal); }
.sidebar-profile-link span { font-weight: 700; color: var(--primary); }
.sidebar-nav { padding: 0 8px; }
.sidebar-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--text); font-weight: 500; transition: all 0.2s; margin-bottom: 2px; }
.sidebar-nav a:hover { background: var(--light2); color: var(--primary); }
.sidebar-nav a i { width: 20px; text-align: center; color: var(--royal); }
.sidebar-section { background: white; border-radius: var(--radius); padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow); }
.sidebar-section h4 { font-size: 0.9rem; font-weight: 700; color: var(--primary); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }

/* Friend request cards in sidebar */
.friend-request-card { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.friend-request-card img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.friend-request-card strong { font-size: 0.875rem; display: block; }
.fr-actions { display: flex; gap: 6px; margin-top: 4px; }

/* Online friends */
.online-friends { display: flex; flex-direction: column; gap: 6px; }
.online-friend { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--radius-sm); transition: background 0.2s; }
.online-friend:hover { background: var(--light); }
.online-friend span { font-size: 0.875rem; color: var(--text); font-weight: 500; }
.avatar-wrap { position: relative; }
.online-indicator { position: absolute; bottom: 0; right: 0; width: 10px; height: 10px; background: var(--success); border-radius: 50%; border: 2px solid white; }
.online-friend img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }

/* ===== SIDEBAR ADS SCROLL (feed.php) ===== */
.sidebar-ads-section {}
.sidebar-ads-scroll-wrap {
  position: relative;
  height: 320px;
  overflow: hidden;
}
.sidebar-ads-scroll-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: scrollAdsVertical 18s linear infinite;
}
.sidebar-ads-scroll-inner:hover {
  animation-play-state: paused;
}
@keyframes scrollAdsVertical {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}
.sidebar-ad-item {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  border-left: 3px solid var(--royal);
  transition: box-shadow 0.2s;
}
.sidebar-ad-item:hover { box-shadow: var(--shadow); }
.sad-img-wrap { height: 90px; overflow: hidden; }
.sad-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.sad-body { padding: 10px; }
.sad-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--royal), var(--primary));
  color: white;
  padding: 2px 8px; border-radius: 50px;
  font-size: 0.68rem; font-weight: 700;
  margin-bottom: 6px;
}
.sad-body h5 { font-size: 0.85rem; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.sad-body p { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 8px; line-height: 1.4; }
.btn-sad-details {
  display: inline-flex; align-items: center; gap: 5px;
  background: linear-gradient(135deg, var(--royal), var(--primary));
  color: white; padding: 5px 12px;
  border-radius: 6px; font-size: 0.75rem; font-weight: 600;
  transition: all 0.2s;
}
.btn-sad-details:hover { background: linear-gradient(135deg, var(--royal-light), var(--royal)); }

/* Legacy sidebar-ad (kept for compatibility) */
.sidebar-ad { border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 12px; background: var(--light); border: 1px solid var(--border); }
.sidebar-ad img { width: 100%; height: 120px; object-fit: cover; }
.sidebar-ad h5 { padding: 10px 10px 4px; font-size: 0.875rem; color: var(--primary); }
.sidebar-ad p { padding: 0 10px 8px; font-size: 0.8rem; color: var(--text-muted); }
.ad-link { display: block; padding: 8px 10px; background: var(--royal); color: white; font-size: 0.8rem; font-weight: 600; text-align: center; }

/* ===== STORIES ===== */
.stories-bar { display: flex; gap: 10px; overflow-x: auto; margin-bottom: 20px; padding-bottom: 8px; }
.story-card { flex: 0 0 100px; height: 160px; border-radius: var(--radius); overflow: hidden; position: relative; cursor: pointer; background-size: cover; background-position: center; background-color: var(--primary); display: flex; flex-direction: column; justify-content: flex-end; box-shadow: var(--shadow); transition: transform 0.2s; }
.story-card:hover { transform: scale(1.03); }
.story-card span { color: white; font-size: 0.75rem; font-weight: 600; padding: 8px 6px 6px; text-shadow: 0 1px 3px rgba(0,0,0,0.8); background: linear-gradient(transparent, rgba(0,0,0,0.6)); }
.story-avatar { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--royal); position: absolute; top: 8px; left: 8px; object-fit: cover; }
.add-story { background: linear-gradient(135deg, var(--primary), var(--royal)); }
.story-add-icon { background: var(--royal); color: white; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 8px; font-size: 1.2rem; font-weight: 700; }

/* ===== CREATE POST ===== */
.create-card { background: white; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 20px; }
.create-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.create-header img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--royal); }
.create-header textarea { flex: 1; border: none; background: var(--light); border-radius: var(--radius-full); padding: 10px 16px; resize: none; font-size: 0.95rem; }
.create-header textarea:focus { outline: none; background: var(--light2); }
.create-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); padding-top: 12px; }
.create-options { display: flex; gap: 8px; }
.create-opt { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: var(--radius-sm); color: var(--text-muted); font-weight: 600; font-size: 0.875rem; cursor: pointer; transition: background 0.2s; }
.create-opt:hover { background: var(--light); }
.post-controls { display: flex; align-items: center; gap: 10px; }
.privacy-select { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 10px; font-size: 0.85rem; color: var(--text); background: var(--light); }
.media-preview { position: relative; margin-bottom: 12px; }

/* ===== POST CARD ===== */
.post-card { background: white; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; overflow: hidden; }
.post-header { display: flex; align-items: flex-start; gap: 10px; padding: 16px 16px 12px; }
.post-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--royal); }
.post-avatar-sm { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.post-meta { flex: 1; }
.post-author { font-weight: 700; color: var(--primary); font-size: 0.95rem; display: block; }
.post-author:hover { text-decoration: underline; }
.shared-label { font-size: 0.875rem; color: var(--text-muted); }
.post-info { display: flex; align-items: center; gap: 8px; }
.post-time { color: var(--text-muted); font-size: 0.8rem; }
.post-privacy { color: var(--text-muted); font-size: 0.8rem; }
.post-options { position: relative; }
.post-dropdown { display: none; }
.post-dropdown.show { display: block; }
.dropdown-menu { position: absolute; right: 0; top: 110%; background: white; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); min-width: 150px; z-index: 100; border: 1px solid var(--border); }
.dropdown-menu a { display: flex; align-items: center; gap: 8px; padding: 10px 16px; font-size: 0.875rem; transition: background 0.15s; }
.dropdown-menu a:hover { background: var(--light); }
.dropdown-menu a.danger { color: var(--danger); }
.post-content { padding: 0 16px 12px; }
.post-text { white-space: pre-wrap; line-height: 1.6; font-size: 0.95rem; }
.post-media { margin-top: 10px; border-radius: var(--radius-sm); overflow: hidden; max-height: 500px; }
.post-image { width: 100%; max-height: 500px; object-fit: cover; cursor: zoom-in; transition: transform 0.2s; }
.post-image:hover { transform: scale(1.01); }
.post-video { width: 100%; }
.shared-post { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; margin-top: 10px; }
.shared-post-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.shared-img { width: 100%; border-radius: 8px; margin-top: 8px; }
.post-stats { display: flex; justify-content: space-between; padding: 8px 16px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); color: var(--text-muted); font-size: 0.85rem; }
.post-actions { display: flex; padding: 4px 8px; gap: 4px; }
.action-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px; border-radius: var(--radius-sm); color: var(--text-muted); font-weight: 600; font-size: 0.875rem; transition: all 0.15s; }
.action-btn:hover { background: var(--light); color: var(--royal); }
.action-btn.liked { color: var(--royal); }
.action-btn.liked i { color: var(--royal-light); }

/* COMMENTS */
.comments-section { border-top: 1px solid var(--border); padding: 12px 16px; }
.comments-list { margin-bottom: 12px; }
.comment-item { display: flex; gap: 8px; margin-bottom: 10px; }
.comment-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 1px solid var(--royal); }
.comment-body { background: var(--light); border-radius: 12px; padding: 8px 12px; max-width: calc(100% - 44px); }
.comment-author { font-weight: 700; color: var(--primary); font-size: 0.85rem; display: block; margin-bottom: 2px; }
.comment-body p { font-size: 0.875rem; line-height: 1.4; }
.comment-time { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; display: block; }
.comment-form { display: flex; align-items: center; gap: 8px; }
.comment-input-wrap { flex: 1; position: relative; }
.comment-input { width: 100%; background: var(--light); border: none; border-radius: var(--radius-full); padding: 8px 40px 8px 14px; font-size: 0.875rem; }
.comment-input:focus { outline: none; background: var(--light2); }

/* ===== LIGHTBOX ===== */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.95); display: flex; align-items: center; justify-content: center; z-index: 9999; cursor: zoom-out; }
.lightbox img { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: 4px; }

/* ===== MODAL ===== */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal-content { background: white; border-radius: var(--radius); width: 100%; max-width: 550px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-header h3 { color: var(--primary); font-weight: 700; }
.modal-content .auth-form { padding: 20px; }

/* ===== MESSAGES PAGE ===== */
.messages-container { display: grid; grid-template-columns: 340px 1fr; height: calc(100vh - 60px); }
.conversations-panel { border-right: 1px solid var(--border); background: white; display: flex; flex-direction: column; }
.conversations-header { padding: 16px; border-bottom: 1px solid var(--border); }
.conversations-header h3 { color: var(--primary); font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.conv-search { width: 100%; background: var(--light); border: none; border-radius: var(--radius-full); padding: 8px 14px; font-size: 0.875rem; }
.conv-search:focus { outline: none; background: var(--light2); }
.conversations-list { flex: 1; overflow-y: auto; }
.conversation-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; transition: background 0.15s; cursor: pointer; border-bottom: 1px solid var(--light); }
.conversation-item:hover, .conversation-item.active { background: var(--light); }
.conversation-item.active { background: var(--silver-light); border-left: 3px solid var(--royal); }
.conversation-item.unread .conv-name { font-weight: 700; color: var(--primary); }
.conv-avatar-wrap { position: relative; flex-shrink: 0; }
.conv-avatar-wrap img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--royal); }
.online-dot { position: absolute; bottom: 2px; right: 2px; width: 12px; height: 12px; background: var(--success); border-radius: 50%; border: 2px solid white; }
.conv-info { flex: 1; min-width: 0; }
.conv-name { font-size: 0.9rem; color: var(--text); margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-last { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.conv-time { font-size: 0.75rem; color: var(--text-muted); }
.unread-badge { background: var(--royal); color: white; border-radius: 50px; font-size: 0.7rem; padding: 1px 6px; font-weight: 700; }
.chat-panel { display: flex; flex-direction: column; background: var(--light); }
.chat-panel-header { background: white; padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.chat-user-info { display: flex; align-items: center; gap: 12px; }
.chat-user-info img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--royal); }
.chat-user-info strong { display: block; font-size: 0.95rem; color: var(--primary); }
.chat-actions { display: flex; gap: 8px; }
.chat-messages-panel { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.date-separator { text-align: center; margin: 10px 0; }
.date-separator span { background: var(--border); color: var(--text-muted); padding: 3px 12px; border-radius: 50px; font-size: 0.75rem; }
.chat-message { display: flex; align-items: flex-end; gap: 8px; }
.chat-message.mine { flex-direction: row-reverse; }
.msg-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.msg-bubble { max-width: 65%; background: white; padding: 10px 14px; border-radius: 16px 16px 16px 4px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.mine .msg-bubble { background: linear-gradient(135deg, var(--royal), var(--primary)); color: white; border-radius: 16px 16px 4px 16px; }
.msg-bubble p { font-size: 0.9rem; line-height: 1.5; }
.msg-time { font-size: 0.7rem; color: var(--text-muted); margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.mine .msg-time { color: rgba(255,255,255,0.7); justify-content: flex-end; }
.seen { color: var(--silver); }
.msg-image { max-width: 200px; border-radius: 8px; }
.chat-input-bar { background: white; padding: 12px 16px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.attach-btn { color: var(--text-muted); font-size: 1.1rem; cursor: pointer; padding: 6px; border-radius: 50%; transition: all 0.2s; }
.attach-btn:hover { background: var(--light); color: var(--royal); }
.chat-input-wrap { flex: 1; }
.chat-input-wrap input { width: 100%; background: var(--light); border: none; border-radius: var(--radius-full); padding: 10px 16px; font-size: 0.9rem; }
.chat-input-wrap input:focus { outline: none; background: var(--light2); }
.send-btn { background: var(--royal); color: white; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.send-btn:hover { background: var(--silver); color: var(--primary); }
.emoji-btn { color: var(--text-muted); font-size: 1.2rem; }
.chat-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; color: var(--text-muted); }
.chat-empty i { font-size: 4rem; opacity: 0.15; color: var(--royal); }
.chat-empty h3 { color: var(--primary); font-size: 1.3rem; }
.attach-preview { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.chat-widget { position: fixed; bottom: 20px; right: 20px; width: 320px; background: white; border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 500; border: 1px solid var(--border); }
.chat-header { background: linear-gradient(135deg, var(--primary), var(--royal)); color: white; padding: 12px 16px; border-radius: var(--radius) var(--radius) 0 0; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.chat-messages { height: 280px; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.chat-msg { max-width: 80%; padding: 8px 12px; border-radius: 12px; font-size: 0.85rem; line-height: 1.4; }
.chat-msg.mine { background: linear-gradient(135deg, var(--royal), var(--primary)); color: white; align-self: flex-end; border-radius: 12px 12px 4px 12px; }
.chat-msg.theirs { background: var(--light); align-self: flex-start; border-radius: 12px 12px 12px 4px; }
.chat-msg span { font-size: 0.7rem; opacity: 0.7; display: block; margin-top: 3px; }
.chat-input-form { display: flex; border-top: 1px solid var(--border); }
.chat-input-form input { flex: 1; border: none; padding: 10px 14px; font-size: 0.875rem; background: transparent; }
.chat-input-form input:focus { outline: none; }
.chat-input-form button { background: var(--royal); color: white; padding: 10px 14px; }

/* ===== PROFILE PAGE ===== */
.profile-cover-area { background: white; box-shadow: var(--shadow); margin-bottom: 20px; }
.cover-image-wrap { height: 320px; position: relative; overflow: hidden; background: linear-gradient(135deg, var(--primary-dark), var(--royal)); }
.cover-image { width: 100%; height: 100%; object-fit: cover; }
.change-cover-btn { position: absolute; bottom: 16px; right: 16px; background: rgba(255,255,255,0.9); color: var(--primary); padding: 8px 16px; border-radius: var(--radius-sm); font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 6px; transition: all 0.2s; }
.change-cover-btn:hover { background: white; }
.profile-info-bar { max-width: 1400px; margin: 0 auto; padding: 0 24px 16px; display: flex; align-items: flex-end; gap: 20px; position: relative; }
.profile-avatar-wrap { position: relative; margin-top: -60px; flex-shrink: 0; }
.profile-big-avatar { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; border: 4px solid white; box-shadow: var(--shadow); }
.change-avatar-btn { position: absolute; bottom: 8px; right: 8px; background: var(--light2); color: var(--text); width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; border: 2px solid white; transition: all 0.2s; }
.change-avatar-btn:hover { background: var(--border); }
.profile-details { flex: 1; padding-bottom: 8px; }
.profile-details h1 { font-size: 1.8rem; font-weight: 700; color: var(--primary); display: flex; align-items: center; gap: 10px; }
.admin-badge { background: var(--royal); color: white; padding: 2px 8px; border-radius: 50px; font-size: 0.75rem; font-weight: 700; }
.profile-username { color: var(--text-muted); font-size: 0.9rem; }
.profile-stats { display: flex; gap: 16px; margin-top: 6px; flex-wrap: wrap; font-size: 0.875rem; color: var(--text-muted); }
.profile-stats strong { color: var(--primary); }
.profile-bio { margin-top: 8px; color: var(--text); font-size: 0.95rem; max-width: 600px; }
.profile-actions { display: flex; gap: 10px; align-items: flex-end; padding-bottom: 8px; flex-wrap: wrap; }
.profile-tabs { display: flex; border-top: 1px solid var(--border); max-width: 1400px; margin: 0 auto; padding: 0 24px; }
.tab-btn { padding: 14px 20px; font-weight: 700; font-size: 0.9rem; color: var(--text-muted); border-bottom: 3px solid transparent; transition: all 0.2s; }
.tab-btn:hover { color: var(--royal); background: var(--light); }
.tab-btn.active { color: var(--royal); border-bottom-color: var(--royal); }
.profile-content-area { max-width: 1400px; margin: 0 auto; padding: 20px 24px; }
.profile-feed { display: grid; grid-template-columns: 1fr 320px; gap: 20px; }
.sidebar-card { background: white; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.sidebar-card h3 { font-weight: 700; color: var(--primary); margin-bottom: 12px; font-size: 1rem; }
.sidebar-card p { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 0.875rem; margin-bottom: 8px; }
.sidebar-card p i { color: var(--royal); width: 16px; }
.friends-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.friend-card { text-align: center; padding: 12px; background: white; border-radius: var(--radius-sm); box-shadow: var(--shadow); transition: transform 0.2s; }
.friend-card:hover { transform: translateY(-2px); }
.friend-card img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin: 0 auto 8px; border: 2px solid var(--royal); }
.friend-card span { font-size: 0.8rem; font-weight: 600; color: var(--primary); }
.photos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 4px; }
.photo-item { height: 160px; overflow: hidden; border-radius: 4px; cursor: zoom-in; }
.photo-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.2s; }
.photo-item:hover img { transform: scale(1.05); }
.about-card { background: white; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); max-width: 700px; }
.about-card h3 { color: var(--primary); font-weight: 700; margin-bottom: 16px; }
.about-table { width: 100%; border-collapse: collapse; }
.about-table td { padding: 10px 12px; border-bottom: 1px solid var(--light2); font-size: 0.9rem; }
.about-table td:first-child { color: var(--text-muted); width: 40%; display: flex; align-items: center; gap: 8px; }

/* ===== FRIENDS PAGE ===== */
.page-container { max-width: 1400px; margin: 0 auto; padding: 20px 24px; }
.friends-page-layout { display: grid; grid-template-columns: 260px 1fr; gap: 20px; }
.friends-sidebar { background: white; border-radius: var(--radius); padding: 16px; height: fit-content; box-shadow: var(--shadow); position: sticky; top: 80px; }
.friends-sidebar h3 { color: var(--primary); font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.friends-sidebar nav a { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--text); font-weight: 500; transition: all 0.2s; margin-bottom: 4px; }
.friends-sidebar nav a:hover, .friends-sidebar nav a.active { background: var(--light); color: var(--royal); }
.friends-sidebar nav a span { font-size: 0.75rem; background: var(--royal); color: white; border-radius: 50px; padding: 1px 7px; }
.friends-main h2 { color: var(--primary); font-weight: 700; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.friends-grid-big { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.friend-big-card { background: white; border-radius: var(--radius); padding: 20px; text-align: center; box-shadow: var(--shadow); transition: transform 0.2s; }
.friend-big-card:hover { transform: translateY(-3px); }
.friend-big-card img, .fbc-avatar-wrap img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin: 0 auto 10px; border: 3px solid var(--royal); }
.fbc-avatar-wrap { position: relative; display: inline-block; }
.online-badge-dot { position: absolute; bottom: 4px; right: 4px; width: 14px; height: 14px; background: var(--success); border-radius: 50%; border: 2px solid white; }
.friend-big-card h4 { font-weight: 700; color: var(--primary); font-size: 0.9rem; margin-bottom: 4px; }
.fbc-city { font-size: 0.8rem; color: var(--text-muted); display: block; margin-bottom: 12px; }
.fbc-actions { display: flex; flex-direction: column; gap: 6px; }

/* ===== NOTIFICATIONS ===== */
.notifications-box { background: white; border-radius: var(--radius); box-shadow: var(--shadow); max-width: 700px; margin: 0 auto; }
.notifications-box h2 { padding: 20px 24px; border-bottom: 1px solid var(--border); color: var(--primary); font-weight: 700; display: flex; align-items: center; gap: 10px; }
.notification-item { display: flex; align-items: center; gap: 14px; padding: 14px 24px; border-bottom: 1px solid var(--light); transition: background 0.15s; }
.notification-item:hover { background: var(--light); }
.unread-notif { background: var(--silver-light); }
.notif-icon { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.notif-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid var(--royal); }
.notif-content { flex: 1; }
.notif-content strong a { color: var(--primary); font-weight: 700; }
.notif-content span { color: var(--text); font-size: 0.9rem; margin-left: 4px; }
.notif-time { font-size: 0.75rem; color: var(--text-muted); display: block; margin-top: 3px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state i { font-size: 3rem; opacity: 0.25; margin-bottom: 16px; color: var(--royal); display: block; }

/* ===== ADMIN ===== */
.admin-body { background: #f0f2f8; }
.admin-layout { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.admin-sidebar { background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 60%, var(--royal) 100%); padding: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-brand { display: flex; align-items: center; gap: 12px; padding: 20px 16px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.admin-brand img { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--silver); object-fit: cover; }
.admin-brand h3 { color: var(--silver-light); font-size: 1rem; font-weight: 700; }
.admin-brand span { color: rgba(200,212,240,0.6); font-size: 0.75rem; display: block; }
.admin-nav { padding: 16px 8px; }
.admin-nav a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; color: rgba(200,212,240,0.8); border-radius: var(--radius-sm); font-size: 0.9rem; transition: all 0.2s; margin-bottom: 2px; }
.admin-nav a:hover, .admin-nav a.active { background: rgba(255,255,255,0.15); color: var(--silver-light); }
.admin-nav a i { width: 18px; text-align: center; }
.admin-nav hr { border: none; border-top: 1px solid rgba(255,255,255,0.1); margin: 10px 0; }
.admin-badge { background: var(--silver); color: var(--primary); border-radius: 50px; font-size: 0.7rem; padding: 1px 7px; font-weight: 700; }
.admin-main { padding: 24px; overflow-y: auto; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; background: white; padding: 16px 20px; border-radius: var(--radius); box-shadow: var(--shadow); }
.admin-topbar h1 { color: var(--primary); font-size: 1.3rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.admin-user-info { display: flex; align-items: center; gap: 10px; }
.admin-user-info img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid var(--royal); }
.admin-user-info span { font-size: 0.875rem; color: var(--text); font-weight: 600; }
.admin-role-badge { background: var(--royal); color: white; padding: 2px 8px; border-radius: 50px; font-size: 0.72rem; font-weight: 700; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: white; border-radius: var(--radius); padding: 20px 24px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 16px; border-left: 4px solid; }
.stat-card.blue { border-color: var(--info); }
.stat-card.green { border-color: var(--success); }
.stat-card.orange { border-color: var(--warning); }
.stat-card.purple { border-color: #9b59b6; }
.stat-card.red { border-color: var(--danger); }
.stat-card.gold { border-color: var(--royal); }
.stat-card i { font-size: 2rem; opacity: 0.8; }
.stat-card.blue i { color: var(--info); }
.stat-card.green i { color: var(--success); }
.stat-card.orange i { color: var(--warning); }
.stat-card.purple i { color: #9b59b6; }
.stat-card.red i { color: var(--danger); }
.stat-card.gold i { color: var(--royal); }
.stat-num { display: block; font-size: 1.8rem; font-weight: 700; color: var(--primary); line-height: 1; }
.stat-card > div span:last-child { font-size: 0.8rem; color: var(--text-muted); }
.admin-card { background: white; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; }
.admin-card h3 { color: var(--primary); font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.card-header-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.card-header-actions h3 { margin-bottom: 0; }
.admin-search { background: var(--light); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 14px; font-size: 0.875rem; width: 220px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.admin-table th { background: var(--light); padding: 10px 12px; text-align: left; color: var(--text-muted); font-weight: 600; border-bottom: 2px solid var(--border); }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--light2); vertical-align: middle; }
.admin-table tr:hover td { background: var(--light); }
.table-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid var(--royal); }
.action-col { white-space: nowrap; }
.admin-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.admin-form .form-group label { color: var(--primary); font-weight: 600; }
.priority-slider { width: 100%; cursor: pointer; accent-color: var(--royal); }
.priority-display { font-size: 1.5rem; font-weight: 700; color: var(--royal); display: inline-block; margin-left: 10px; }
.priority-guide { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }
.ad-admin-card { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 12px; }
.ad-thumb { width: 70px; height: 70px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.ad-admin-body { flex: 1; min-width: 0; }
.ad-admin-body h4 { color: var(--primary); font-weight: 700; font-size: 0.9rem; margin-bottom: 4px; }
.ad-admin-body p { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 8px; }
.ad-admin-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.priority-badge { padding: 2px 8px; border-radius: 50px; font-size: 0.72rem; font-weight: 600; }
.priority-badge.prio-low { background: #fff3cd; color: var(--warning); }
.priority-badge.prio-med { background: #d4edda; color: var(--success); }
.priority-badge.prio-high { background: var(--silver-light); color: var(--royal); }
.ad-admin-actions { display: flex; gap: 6px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .app-container { grid-template-columns: 220px 1fr 240px; }
  .admin-layout { grid-template-columns: 220px 1fr; }
}
@media (max-width: 992px) {
  .app-container { grid-template-columns: 1fr; }
  .sidebar-left, .sidebar-right { display: none; }
  .landing-container { grid-template-columns: 1fr; }
  .landing-right { position: static; }
  .ads-track .ad-slide { min-width: calc(50% - 8px); }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .cover-image-wrap { height: 220px; }
  .profile-big-avatar { width: 100px; height: 100px; }
  .profile-avatar-wrap { margin-top: -40px; }
  .profile-feed { grid-template-columns: 1fr; }
  .messages-container { grid-template-columns: 280px 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-two-col { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .header-inner { padding: 0 16px; }
  .main-nav { display: none; }
  .profile-info-bar { flex-direction: column; align-items: flex-start; }
  .profile-tabs { overflow-x: auto; }
  .friends-page-layout { grid-template-columns: 1fr; }
  .friends-sidebar { display: none; }
  .messages-container { grid-template-columns: 1fr; }
  .conversations-panel { display: none; }
  .info-cards { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .ads-track .ad-slide { min-width: calc(100% - 0px); margin-right: 0; }
  .hero-content h2 { font-size: 1.5rem; }
  .hero-section { padding: 40px 16px; min-height: 260px; }
}
