/* ==========================================================================
   FriendsBook — Core Design System & Global Styles
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Color Palette - Cyber Glass Deep Dark */
  --bg-primary: #07090e;
  --bg-secondary: #0e121a;
  --bg-tertiary: #161b26;
  --bg-card: rgba(22, 27, 38, 0.75);
  --bg-card-hover: rgba(30, 38, 54, 0.85);
  --bg-glass: rgba(14, 18, 26, 0.7);
  --bg-glass-heavy: rgba(7, 9, 14, 0.88);

  /* Borders & Glows */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(255, 255, 255, 0.18);
  --border-focus: rgba(99, 102, 241, 0.5);

  /* Accents */
  --accent-primary: #6366f1;       /* Indigo */
  --accent-primary-hover: #4f46e5;
  --accent-secondary: #06b6d4;     /* Cyan */
  --accent-pink: #ec4899;          /* Pink/Instagram */
  --accent-fb: #1877f2;            /* Facebook Blue */
  --accent-wa: #25d366;            /* WhatsApp Green */
  --accent-amber: #f59e0b;         /* Amber/Key */
  --accent-purple: #a855f7;        /* Purple */

  /* Text Colors */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-accent: #818cf8;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Shadows & Glassmorphism */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.25);
  --shadow-glow-cyan: 0 0 25px rgba(6, 182, 212, 0.25);
  --backdrop-blur: blur(16px);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden; /* Prevent horizontal scrollbars on mobile */
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 30%, rgba(6, 182, 212, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(236, 72, 153, 0.05) 0%, transparent 50%);
  background-attachment: fixed;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}

/* Common Layout Container */
.app-container {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem 1.5rem;
}

/* Navigation & App Header */
.app-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass-heavy);
  backdrop-filter: var(--backdrop-blur);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #1877f2, #ec4899);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  box-shadow: 0 4px 12px rgba(24, 119, 242, 0.35);
  flex-shrink: 0;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(to right, #ffffff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tag {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 500;
  margin-left: 0.2rem;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* KBD & Shortcut Badges */
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.18rem 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  line-height: 1;
}

/* Header Buttons */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.btn-icon:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: var(--border-highlight);
  transform: translateY(-1px);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-primary), #4338ca);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-glow);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-primary-hover), #3730a3);
  transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.4);
}

/* Section Headers */
.section-header {
  margin: 2rem 0 1rem 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.section-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.section-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Responsive Breakpoints for Mobile */
@media (max-width: 640px) {
  .app-container {
    padding: 0 0.85rem 4rem 0.85rem;
  }
  .app-navbar {
    padding: 0.65rem 0.85rem;
  }
  .brand-title {
    font-size: 1rem;
  }
  .brand-tag {
    display: none;
  }
  .btn-primary {
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
  }
  .section-title {
    font-size: 1.15rem;
  }
  .section-subtitle {
    font-size: 0.78rem;
  }
}
