/* @import url("https://fonts.googleapis.com/css2?family=Fascinate+Inline&display=swap"); */
@import url("https://fonts.googleapis.com/css2?family=Fascinate+Inline&family=Parisienne&display=swap");

/* ==========================================
   1. GLOBAL VARIABLES & SEASONAL THEMES
   ========================================== */
:root {
  --theme-accent: #3b82f6;
  --theme-accent-hover: #2563eb;
  --theme-header-bg: linear-gradient(
    90deg,
    rgba(255, 255, 255, 1) 12%,
    rgba(59, 130, 246, 1) 100%
  );
  --theme-header-border: #dbeafe;
  --theme-header-shadow:
    0 4px 20px -4px rgba(59, 130, 246, 0.18), 0 2px 6px -2px rgba(0, 0, 0, 0.04);
  --theme-footer-bg: #f8fafc;
  --theme-footer-border: #e2e8f0;
  --theme-footer-text: #64748b;

  --accent-color: var(--theme-accent);
  --accent-hover: var(--theme-accent-hover);
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --text-main: #334155;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --tree-bg: #f8fafc;
  --tree-grid: #cbd5e1;
  --hero-bg: #f8fafc;
  --footer-bg: #0f172a;
  --footer-text: #94a3b8;
}
@font-face {
  font-family: "SriSri";
  src: url("sri-font.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
/* Spring Blossom (Rose / Emerald) */
[data-theme="spring"] {
  --theme-accent: #ec4899;
  --theme-accent-hover: #db2777;
  --theme-header-bg: linear-gradient(
    90deg,
    rgba(255, 255, 255, 1) 12%,
    rgba(236, 72, 153, 1) 100%
  );
  --theme-header-border: #fbcfe8;
  --theme-header-shadow:
    0 4px 22px -3px rgba(236, 72, 153, 0.22), 0 2px 6px -2px rgba(0, 0, 0, 0.04);
  --theme-footer-bg: #fdf2f8;
  --theme-footer-border: #fbcfe8;
  --theme-footer-text: #9d174d;
}

/* Summer Sun (Amber / Warm Gold) */
[data-theme="summer"] {
  --theme-accent: #f59e0b;
  --theme-accent-hover: #d97706;
  --theme-header-bg: linear-gradient(
    90deg,
    rgba(255, 255, 255, 1) 12%,
    rgba(245, 158, 11, 1) 100%
  );
  --theme-header-border: #fde68a;
  --theme-header-shadow:
    0 4px 22px -3px rgba(245, 158, 11, 0.25), 0 2px 6px -2px rgba(0, 0, 0, 0.04);
  --theme-footer-bg: #fffbeb;
  --theme-footer-border: #fde68a;
  --theme-footer-text: #92400e;
}

/* Autumn Harvest (Warm Orange / Terracotta) */
[data-theme="autumn"] {
  --theme-accent: #ea580c;
  --theme-accent-hover: #c2410c;
  --theme-header-bg: linear-gradient(
    90deg,
    rgba(255, 255, 255, 1) 12%,
    rgba(234, 88, 12, 1) 100%
  );
  --theme-header-border: #fed7aa;
  --theme-header-shadow:
    0 4px 22px -3px rgba(234, 88, 12, 0.22), 0 2px 6px -2px rgba(0, 0, 0, 0.04);
  --theme-footer-bg: #fff7ed;
  --theme-footer-border: #fed7aa;
  --theme-footer-text: #9a3412;
}

/* Winter Frost (Ice Blue / Indigo) */
[data-theme="winter"] {
  --theme-accent: #0ea5e9;
  --theme-accent-hover: #0284c7;
  --theme-header-bg: linear-gradient(
    90deg,
    rgba(255, 255, 255, 1) 12%,
    rgba(14, 165, 233, 1) 100%
  );
  --theme-header-border: #bae6fd;
  --theme-header-shadow:
    0 4px 22px -3px rgba(14, 165, 233, 0.22), 0 2px 6px -2px rgba(0, 0, 0, 0.04);
  --theme-footer-bg: #f0f9ff;
  --theme-footer-border: #bae6fd;
  --theme-footer-text: #0369a1;
}

/* Royal Forest (Emerald / Jade) */
[data-theme="forest"] {
  --theme-accent: #10b981;
  --theme-accent-hover: #059669;
  --theme-header-bg: linear-gradient(
    90deg,
    rgba(255, 255, 255, 1) 12%,
    rgba(16, 185, 129, 1) 100%
  );
  --theme-header-border: #a7f3d0;
  --theme-header-shadow:
    0 4px 22px -3px rgba(16, 185, 129, 0.22), 0 2px 6px -2px rgba(0, 0, 0, 0.04);
  --theme-footer-bg: #ecfdf5;
  --theme-footer-border: #a7f3d0;
  --theme-footer-text: #065f46;
}

/* Midnight Royalty (Purple / Violet) */
[data-theme="midnight"] {
  --theme-accent: #8b5cf6;
  --theme-accent-hover: #7c3aed;
  --theme-header-bg: linear-gradient(
    90deg,
    rgba(255, 255, 255, 1) 12%,
    rgba(139, 92, 246, 1) 100%
  );
  --theme-header-border: #ddd6fe;
  --theme-header-shadow:
    0 4px 22px -3px rgba(139, 92, 246, 0.25), 0 2px 6px -2px rgba(0, 0, 0, 0.04);
  --theme-footer-bg: #f5f3ff;
  --theme-footer-border: #ddd6fe;
  --theme-footer-text: #5b21b6;
}

/* ==========================================
   2. BASE STYLES
   ========================================== */
* {
  box-sizing: border-box;
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-main);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  height: 100vh;
}

body.landing-page {
  overflow-y: auto;
  display: block;
  height: auto;
  background-color: var(--bg-surface);
  margin: 0;
}

body.seasonal-theme-fade {
  animation: seasonalThemeFade 0.7s ease-out both;
}

@keyframes seasonalThemeFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.seasonal-theme-fade {
    animation: none;
  }
}
.fascinate-font {
  font-family: "Fascinate Inline", system-ui;
  font-weight: 400;
  font-style: normal;
}
.text-dark {
  color: var(--text-dark) !important;
}
.text-accent {
  color: var(--theme-accent) !important;
}

/* ==========================================
   3. UNIFIED BUTTONS
   ========================================== */
.btn {
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn.primary,
.accent-btn {
  background: var(--theme-accent) !important;
  border-color: var(--theme-accent) !important;
  color: #ffffff !important;
}
.btn.primary:hover,
.accent-btn:hover {
  background: var(--theme-accent-hover) !important;
  border-color: var(--theme-accent-hover) !important;
  transform: translateY(-1px);
}

.btn.secondary {
  background: #e2e8f0;
  color: #475569;
}
.btn.secondary:hover {
  background: #cbd5e1;
}

.btn.outline {
  background: transparent;
  border: 1px solid #cbd5e1;
  color: var(--text-dark);
}
.btn.outline:hover {
  background: #f1f5f9;
}

.btn-success {
  background: #10b981;
  color: white;
}
.btn-success:hover {
  background: #059669;
}

.btn-danger {
  background: #ef4444;
  color: white;
  width: 100%;
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
}
.btn-danger:hover {
  background: #dc2626;
}

.full-width-btn {
  width: 100%;
  box-sizing: border-box;
}
.full-width-btn-lg {
  width: 100%;
  font-size: 16px;
  padding: 12px;
  box-sizing: border-box;
}
.flex-btn {
  flex: 1;
  padding: 12px;
}

/* ==========================================
   4. UNIFIED NAVIGATION BAR
   ========================================== */
.top-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  background-color: var(--bg-surface);
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 100;
  height: 65px;
  box-shadow: var(--theme-header-shadow);
  transition: box-shadow 0.3s ease;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  padding: 0 24px;
  gap: 5px;
}

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

.brand-section h1 {
  font-size: 1.5rem;
  color: var(--text-dark);
  margin: 0;

  /* Fancy Font*/
  font-family: "Fascinate Inline", system-ui;
  font-weight: 400;
  font-style: normal;
}
.brand-section span {
  font-family: "Parisienne", cursive;
  font-weight: 400;
  font-style: bold;
  font-size: 2rem;
  color: var(--theme-accent);
}

.nav-links {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}
.footer-link:hover {
  color: var(--text-dark);
}

.nav-actions {
  display: flex;
  gap: 12px;
}

/* ==========================================
   5. APP LAYOUT & TREE CANVAS
   ========================================== */

#tree-container {
  width: 100vw;
  flex: 1;
  position: relative;
  overflow: hidden;
  cursor: grab;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.6)),
    url("/img/bg4.jpg");
  /* background-image: radial-gradient(var(--tree-grid) 1px, transparent 1px); 
  background-size:
    32px 32px,
    100% 100%;
  background-position:
    -19px -19px,
    0 0;*/
}
#tree-container:active {
  cursor: grabbing;
}

/* ==========================================
   6. LANDING PAGE SECTIONS
   ========================================== */
.alternate-bg {
  /* background-color: rgb(235, 235, 235); */
  background-color: var(--theme-footer-bg);
  width: 100%;
  padding: 10px;
  border-radius: 10px;
}

.section-title {
  text-align: center;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.section-subtitle {
  text-align: center;
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 4rem;
}

.info-section,
.features-section,
.pricing-section,
.faq-section {
  padding: 6rem 2rem;
  margin: 0 auto;
}

/* Hero Section */
.hero-section {
  padding: 6rem 2rem 4rem;
  text-align: center;
  background-color: var(--hero-bg);
  position: relative;
  overflow: hidden;
  transition: background-color 0.5s ease;
}
.hero-content {
  margin: 0 auto;
}
.hero-title {
  font-size: 4.5rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -1.5px;
}
.hero-subtitle {
  font-size: 1.25rem;
  color: #4b5563;
  line-height: 1.6;
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.hero-main-btn {
  padding: 18px 36px;
  font-size: 1.15rem;
  border-radius: 8px;
  box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.1);
}

/* Steps Grid */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.step-card {
  text-align: center;
  padding: 2rem;
}
.step-number {
  width: 50px;
  height: 50px;
  background: var(--theme-accent);
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.feature-card {
  background: white;
  padding: 2.5rem 2rem;
  border-radius: 16px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
  border: 1px solid #f1f5f9;
  transition: transform 0.3s ease;
}
.feature-card:hover {
  transform: translateY(-5px);
}
.feature-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}
.icon-blue {
  background: #eff6ff;
  color: #3b82f6;
}
.icon-purple {
  background: #faf5ff;
  color: #9333ea;
}
.icon-emerald {
  background: #ecfdf5;
  color: #10b981;
}
.icon-orange {
  background: #fff7ed;
  color: #f97316;
}

.feature-card h3 {
  font-size: 1.25rem;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
}
.feature-card p {
  color: var(--text-muted);
  line-height: 1.6;
}

/* Pricing Grid */
.pricing-section {
  padding: 6rem 2rem;
  max-width: 100%;
  margin: 0 auto;
}
.pricing-grid {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 1.5rem;
  flex-wrap: wrap;
  max-width: 1600px;
  margin: 0 auto;
  margin-block: 30px;
}
.price-card {
  background: white;
  padding: 2rem 1.5rem;
  border-radius: 16px;
  border: 1px solid #95a4b9;
  width: 260px;
  text-align: center;
  position: relative;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}
.price-card.popular {
  border: 2px solid var(--theme-accent);
  box-shadow: 0 15px 25px -5px rgba(0, 0, 0, 0.1);
  transform: scale(1.03);
  z-index: 1;
}
.popular-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--theme-accent);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: bold;
  letter-spacing: 1px;
}
.price-card h3 {
  font-size: 1.25rem;
  margin: 0 0 0.5rem 0;
  color: var(--text-dark);
}
.price {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--text-dark);
  margin: 0.5rem 0 1.5rem 0;
}
.price span {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: normal;
}
.price-features {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
  text-align: left;
  color: var(--text-main);
  flex-grow: 1;
}
.price-features li {
  padding: 0.75rem 0;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  font-size: 0.9rem;
}
.price-features li::before {
  content: "✓";
  color: #10b981;
  font-weight: bold;
  margin-right: 10px;
}

/* FAQ Section */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.faq-item {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}
.faq-item summary {
  padding: 1.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: "+";
  font-size: 1.5rem;
  color: var(--theme-accent);
  transition: transform 0.3s ease;
}
.faq-item[open] summary::after {
  content: "−";
}
.faq-content {
  padding: 0 1.5rem 1.5rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================
   7. FOOTERS (APP & LANDING PAGE)
   ========================================== */
.app-footer {
  background-color: var(--theme-footer-bg) !important;
  border-top: 1px solid var(--theme-footer-border) !important;
  /* color: var(--theme-footer-text) !important; */
  padding: 0.6rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  z-index: 10;
  flex-shrink: 0;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease;
}
.footer-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.footer-brand {
  font-weight: 600;
  color: var(--theme-footer-text);

  h3,
  p {
    color: var(--theme-footer-text);
  }
}

/* Landing Page Custom Footer */
.custom-footer {
  background-color: var(--theme-footer-bg);
  color: var(--theme-footer-text);
  padding: 4rem 2rem 2rem;
  display: block;
}
.footer-content {
  /* max-width: 1200px; */
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
  border-bottom: 1px solid #1e293b;
  padding-bottom: 2rem;
  margin-bottom: 2rem;
}
.footer-content .footer-brand {
  color: white;
  font-size: 1.5rem;
  margin: 0 0 0.5rem 0;
}
.footer-content p {
  margin-top: 0.5rem;
}
.custom-footer .footer-links {
  display: flex;
  gap: 2rem;
}
.custom-footer .footer-links a {
  color: var(--theme-footer-text);
  text-decoration: none;
  transition: color 0.2s;
}
.custom-footer .footer-links a:hover {
  color: var(--theme-accent-hover);
}
.footer-bottom {
  text-align: center;
  font-size: 0.875rem;
}

/* ==========================================
   8. MODALS & FORMS (SOLID & OPAQUE)
   ========================================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65) !important;
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  box-sizing: border-box;
}
.modal.active {
  display: flex !important;
}

.modal-content,
.modal-card {
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--theme-accent) 10%, #ffffff),
    #ffffff 58%,
    color-mix(in srgb, var(--theme-footer-bg) 82%, #ffffff)
  ) !important;
  color: #1e293b !important;
  width: 100%;
  max-width: 620px;
  max-height: 88dvh;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  border: 1px solid color-mix(in srgb, var(--theme-accent) 24%, #ffffff);
  border-top: 4px solid var(--theme-accent);
  overflow: hidden;
  position: relative;
  margin: auto;
  transition:
    background 0.5s ease,
    border-color 0.3s ease;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid #e2e8f0;
  background: transparent !important;
  flex-shrink: 0;
}

.modal-body,
.modal-body-scrollable {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1 1 auto;
  background: transparent !important;
  color: #334155 !important;
  -webkit-overflow-scrolling: touch;
}

.modal-footer {
  padding: 16px 24px;
  background-color: var(--theme-footer-bg, #f8fafc) !important;
  border-top: 1px solid var(--theme-footer-border, #e2e8f0) !important;
  color: var(--theme-footer-text, #64748b) !important;
  border-radius: 0 0 16px 16px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-shrink: 0;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.full-width {
  grid-column: 1 / -1;
}
.input-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: left;
}
.input-group label {
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-muted);
}
.input-group input,
.input-group select,
.input-group textarea {
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
  width: 100%;
  background: #ffffff;
}
.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
  border-color: var(--theme-accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ==========================================
   9. LOGO SPRITE BASE CLASS
   ========================================== */
.brand-logo {
  display: inline-block;
  width: 62px;
  height: 52px;
  background-image: url("../img/logo2.png");
  background-size: 300% 200%;
  background-repeat: no-repeat;
  border-radius: 8px;
  flex-shrink: 0;
}
.logo-free,
.logo-nuclear {
  background-position: 0% 0%;
}
.logo-bronze {
  background-position: 50% 0%;
}
.logo-silver,
.logo-extended {
  background-position: 100% 0%;
}
.logo-gold,
.logo-clan {
  background-position: 0% 100%;
}
.logo-premium {
  background-position: 50% 100%;
}
.logo-common {
  background-position: 100% 100%;
}

/* ==========================================
   10. RESPONSIVE UTILITIES
   ========================================== */
@media (max-width: 1024px) {
  #app-header,
  .app-header {
    flex-direction: column;
    gap: 12px;
    padding: 12px 16px;
    height: auto;
    justify-content: space-between;
  }
  #app-header > div,
  .app-header > div {
    width: 100%;
    /* justify-content: center; */
    flex-wrap: wrap;
  }
  .header-container {
    display: block;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 3rem;
  }
  .nav-container {
    padding: 1rem;
  }
  .nav-menu {
    right: 0;
    width: min(300px, calc(100vw - 30px));
    max-height: calc(100vh - 80px);
    max-height: calc(100dvh - 80px);
  }
  .hide-on-mobile {
    display: none !important;
  }
  .price-card.popular {
    transform: none;
  }
  .hero-actions {
    flex-direction: column;
  }
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  .custom-footer .footer-links {
    justify-content: center;
    flex-wrap: wrap;
  }
  .app-footer {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
    padding: 0.75rem;
  }
}

/* ==========================================
   8.5. CALL TO ACTION (CTA) SECTION
   ========================================== */
.cta-section {
  padding: 6rem 2rem;
  text-align: center;
  border-top: 1px solid #e2e8f0;
}
.cta-content {
  max-width: 800px;
  margin: 0 auto;
}
.cta-btn {
  padding: 18px 40px;
  font-size: 1.2rem;
  border-radius: 8px;
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.15);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 25px -5px rgba(0, 0, 0, 0.2);
}

.divider {
  margin: 24px 0;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
  margin: 0 15px;
}

.google-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: var(--text-main);
  width: 100%;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}
.google-btn:hover {
  background: #f8fafc;
}

.error-text {
  color: #ef4444 !important;
  font-size: 14px;
  margin-top: 16px;
  min-height: 20px;
  font-weight: 500;
}

/* ==========================================
   12. APP HEADER & DROPDOWN MENU
   ========================================== */
.app-header {
  background: var(--theme-header-bg) !important;
  border-bottom: 1px solid var(--theme-header-border) !important;
  padding: 0.75rem 1.25rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--theme-header-shadow) !important;
  transition:
    box-shadow 0.3s ease,
    background 0.3s ease,
    border-color 0.3s ease;
}

.app-header .header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.center-section {
  flex: 1;
  text-align: center;
  color: var(--text-dark);
}

.nav-section {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  position: relative;
}

/* Hamburger Menu Button */
.hamburger-btn {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.hamburger-btn .bar {
  width: 100%;
  height: 3px;
  background-color: var(--text-dark);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.hamburger-btn.active .bar:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
}
.hamburger-btn.active .bar:nth-child(2) {
  opacity: 0;
}
.hamburger-btn.active .bar:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}

/* The Slide-out Dropdown */
.nav-menu {
  position: absolute;
  top: 85%;
  right: 15px;
  background: #ffffff !important;
  border: 1px solid var(--theme-accent);
  border-radius: 12px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
  padding: 12px 14px;
  width: 300px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease-in-out;
  box-sizing: border-box;
  max-height: calc(100vh - 80px);
  max-height: calc(100dvh - 80px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.nav-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-menu .nav-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  margin: 0;
  list-style: none;
  align-items: stretch;
}

.nav-item {
  margin: 0;
}

.nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dark);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.nav-btn:hover {
  background: var(--bg-main);
  color: var(--theme-accent-hover);
}
.nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.nav-btn:disabled:hover {
  background: transparent;
  color: var(--text-dark);
}
.admin-btn {
  color: chocolate;
  font-weight: bold;
}
.logout-btn {
  color: #dc2626;
}
.logout-btn:hover {
  background: #fef2f2;
  color: #b91c1c;
}

/* Dropdown Internals */
.user-info-bar {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-inline: 5px;
  padding-block: 6px;
  margin-bottom: 25px;
  top: 0px;
  left: 0px;
  width: 98%;
  border-bottom: 1px solid #f1f5f9;
  background: var(--theme-footer-bg);
}

.user-email-text {
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plan-badge {
  text-transform: uppercase;
  border: 1px solid var(--text-muted);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: bold;
  color: var(--text-muted);
  background: var(--bg-surface);
}

.tree-switcher-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 30px;
}

.tree-switcher-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.tree-select {
  padding: 6px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  font-size: 0.85rem;
  width: 100%;
}

.menu-divider {
  border: 0;
  height: 1px;
  background-image: linear-gradient(
    to right,
    rgba(0, 0, 0, 0),
    rgba(0, 0, 0, 0.4),
    rgba(0, 0, 0, 0)
  );
  margin: 0.2rem 0;
}

/* ==========================================
   13. MODAL VARIATIONS & SPECIFICS
   ========================================== */
.modal-content-sm {
  max-width: 450px;
  padding: 15px 18px;
  border-radius: 16px;
}
.modal-content-upgrade {
  max-width: 400px;
  text-align: center;
  padding: 40px 24px;
  border-top: 6px solid var(--theme-accent);
}
.modal-content-settings {
  max-width: 490px;
  width: 95%;
  /* max-width: 600px !important; */
  max-height: calc(100dvh - 24px) !important;
  padding: 0 !important;
  border-radius: 16px;
  background: #ffffff !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}
.modal-content-support {
  max-width: 450px;
  text-align: center;
  padding: 2rem;
}

.profile-email-box {
  background: var(--bg-main);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 24px;
}

.plan-info-box {
  background: var(--bg-main);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px 20px;
  text-align: center;
  margin-bottom: 24px;
}

.premium-perks-list {
  text-align: left;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-left: 20px;
  margin-bottom: 20px;
}

.upgrade-icon {
  font-size: 56px;
  margin-bottom: 16px;
}

.color-picker-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}
.bg-color-picker {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 60px;
  height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  padding: 2px;
  background: #ffffff;
}

.bg-color-picker::-webkit-color-swatch-wrapper {
  padding: 0;
}
.bg-color-picker::-webkit-color-swatch {
  border: none;
  border-radius: 6px;
}

.bg-color-hex {
  font-family: monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
}

.danger-zone {
  background: #fff5f5;
  border: 1px solid #fed7d7;
  padding: 16px 18px;
  border-radius: 12px;
  margin-top: 4px;
}
.danger-title {
  margin: 0 0 6px 0;
  color: #991b1b;
  font-size: 0.95rem;
  font-weight: 800;
}
.danger-desc {
  margin: 0 0 14px 0;
  color: #b91c1c;
  font-size: 0.84rem;
  line-height: 1.45;
}

.support-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}
.support-box {
  background: var(--bg-main);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

/* ==========================================
   14. GLOBAL LOADER
   ========================================== */
.global-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(5px);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease;
}
.global-loader.hidden {
  opacity: 0;
  pointer-events: none;
}
.export-loader {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.32);
  backdrop-filter: blur(4px);
  z-index: 10000;
}
.export-loader.active {
  display: flex;
}
.export-loader-card {
  width: min(100%, 360px);
  padding: 28px 24px;
  text-align: center;
  background: var(--bg-surface);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}
.export-loader-card .spinner {
  margin-bottom: 18px;
}
.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #e2e8f0;
  border-top-color: var(--theme-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1.5rem auto;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================
   15. ADMIN DASHBOARD STYLES
   ========================================== */
.admin-container {
  width: 90vw;
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-surface);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.stat-title {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.stat-value {
  color: var(--text-dark);
  font-size: 2rem;
  font-weight: 800;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.chart-container {
  background: var(--bg-surface);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.users-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-surface);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.users-table th,
.users-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.users-table th {
  background: var(--bg-main);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
}

.users-table tr:hover {
  background: var(--bg-main);
}

.action-select {
  padding: 0.4rem;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  font-size: 0.85rem;
  color: var(--text-dark);
  background: var(--bg-surface);
}

.admin-badge {
  background: linear-gradient(135deg, #ff416c, #ff4b2b);
  color: #ffffff;
  font-size: 11px;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  box-shadow: 0 2px 5px rgba(255, 65, 108, 0.4);
}

.mb-10 {
  margin-bottom: 10px;
}
.mb-20 {
  margin-bottom: 20px;
}
.max-w-400 {
  max-width: 400px;
  padding: 24px;
  border-radius: 16px;
}

/* ==========================================
   16. HEADER PLAN THEMES & GRADIENTS
   ========================================== */
.app-header {
  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

/* Theme variables now drive the background naturally across all plans */
.app-header.header-plan-nuclear,
.app-header.header-plan-extended,
.app-header.header-plan-clan,
.app-header.header-plan-free,
.app-header.header-plan-bronze,
.app-header.header-plan-silver,
.app-header.header-plan-gold,
.app-header.header-plan-premium {
  background: var(--theme-header-bg) !important;
  border-bottom: 1px solid var(--theme-header-border) !important;
}

/* ==========================================
   17. ONBOARDING & UPGRADE SCREEN
   ========================================== */
.onboarding-screen {
  display: none;
  height: 100vh;
  width: 100vw;
  background: var(--bg-main);
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 60px 20px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  box-sizing: border-box;
  overflow-y: auto;
}

.close-onboarding-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #dc2626;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.2s;
}

.close-onboarding-btn:hover {
  background: #fee2e2;
}

.onboarding-title {
  color: var(--text-dark);
  margin-bottom: 10px;
  font-size: 2.2rem;
  font-weight: 800;
}

.onboarding-subtitle {
  color: var(--text-muted);
  margin-bottom: 40px;
  font-size: 1.1rem;
}

.onboarding-plans-container {
  display: flex;
  gap: 24px;
  max-width: 1200px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

/* ==========================================
   18. MOCK PAYMENT MODAL
   ========================================== */
.z-high {
  z-index: 10000;
}
.modal-content-centered {
  text-align: center;
}

.mock-title {
  color: var(--text-dark);
  margin-top: 0;
  font-size: 24px;
  margin-bottom: 8px;
}

.mock-desc {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 16px;
}

.mock-strong {
  color: var(--text-dark);
  font-weight: 800;
}

.mock-price-box {
  background: #f1f5f9;
  padding: 20px;
  border-radius: 8px;
  margin: 24px 0;
  border: 1px dashed #cbd5e1;
}

.mock-price-label {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.mock-price-value {
  margin: 5px 0 0 0;
  font-size: 32px;
  font-weight: 800;
  color: var(--theme-accent);
}

.mock-disclaimer {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 24px;
}

.mock-actions {
  display: flex;
  gap: 12px;
}

/* ==========================================
   19. SHARE TREE MODAL
   ========================================== */
#share-modal .modal-content {
  padding: 20px;
  max-width: 500px;
}

.share-modal-title {
  margin-top: 0;
  margin-bottom: 8px;
  color: var(--text-dark);
  font-size: 1.5rem;
}

.share-modal-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.share-input-wrapper {
  display: flex;
  align-items: center;
  background: var(--bg-main);
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 12px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.share-input-wrapper:focus-within {
  border-color: var(--theme-accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.share-url-prefix {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
}

.share-slug-input {
  border: none !important;
  background: transparent !important;
  padding: 12px 4px !important;
  outline: none !important;
  box-shadow: none !important;
  flex: 1;
  font-weight: bold;
  color: var(--text-dark);
  font-size: 1rem;
}

.slug-status {
  margin-top: 8px;
  font-weight: 500;
  min-height: 16px;
  display: block;
  font-size: 13px;
}

.slug-warning {
  display: none;
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  margin-top: 8px;
  font-weight: 500;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.mt-24 {
  margin-top: 24px;
}

/* ==========================================
   20. SETTINGS MODAL
   ========================================== */
.modal-content-settings .modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  background: #ffffff;
}

.settings-close-x {
  background: transparent;
  border: none;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.settings-close-x:hover {
  background: #f1f5f9;
  color: var(--text-dark);
}

.settings-title {
  margin: 0;
  color: var(--text-dark);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.modal-content-settings .modal-body-scrollable {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #ffffff;
}

.settings-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 6px;
}

.modal-content-settings .modal-footer {
  flex-shrink: 0 !important;
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 14px 20px !important;
  padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)) !important;
  border-top: 1px solid var(--theme-footer-border, #e2e8f0) !important;
  background-color: var(--theme-footer-bg, #f8fafc) !important;
  border-radius: 0 0 16px 16px !important;
  margin-top: auto !important;
}

/* ==========================================
   21. USER GREETING (HEADER)
   ========================================== */
.user-greeting {
  color: var(--text-dark);
  font-weight: 600;
  font-size: 1.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 350px;
  text-transform: capitalize;
}

/* ==========================================
   22. APP UTILITIES & LEFTOVERS
   ========================================== */
.brand-icon {
  font-size: 1.5rem;
}

.nav-btn .icon {
  font-size: 1.1rem;
}

.mb-24 {
  margin-bottom: 24px;
}

.modal-upgrade-btn {
  width: 100%;
  font-size: 16px;
  padding: 14px;
  margin-bottom: 12px;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  box-sizing: border-box;
}

.error-link-msg {
  text-align: center;
  margin-top: 100px;
  color: var(--text-muted);
  font-size: 1.2rem;
  font-weight: 500;
}

/* Section Cards with Alternating Backgrounds */
.form-section-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  transition: border-color 0.2s ease;
  margin-bottom: 10px;
}

.form-section-card.alt-bg {
  background: #f8fafc;
  border-color: #e2e8f0;
}
.form-section-card.bg-odd {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 1) 12%,
    rgba(255, 246, 212, 1) 100%
  );
  border-color: #e2e8f0;
}
.form-section-card.bg-even {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 1) 12%,
    rgba(212, 250, 250, 1) 100%
  );
  border-color: #e2e8f0;
}
.form-section-card.alt-bg-spl {
  background: radial-gradient(
    circle,
    rgba(212, 250, 250, 1) 0%,
    rgba(252, 236, 189, 0.93) 94%
  );
  border-color: #e2e8f0;
}

.form-section-header {
  display: flex;
  /* align-items: center; */
  gap: 10px;
  /* margin-bottom: 14px; */
}
.form-section-header span:not([class]) {
  /* font-family: "SriSri", cursive; */
  font-size: medium;
  font-style: bold;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--theme-accent) !important;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
}

/* Grid & Inputs */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.span-2 {
  grid-column: span 2;
}

.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
}

.form-label .required {
  color: #ef4444;
}

.form-input {
  width: 100%;
  padding: 9px 12px;
  font-size: 0.9rem;
  color: #1e293b;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  outline: none;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.form-input:focus {
  border-color: var(--theme-accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Photo Upload Block */
.photo-upload-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.photo-preview-box {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid #e2e8f0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  flex-shrink: 0;
}

.photo-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-avatar-placeholder {
  font-size: 24px;
}

.photo-inputs-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.form-file-input {
  font-size: 0.85rem;
  color: #64748b;
}

.form-hint {
  font-size: 0.8rem;
  margin-top: 4px;
}

@media (max-width: 640px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
  .form-group.span-2 {
    grid-column: span 1;
  }
}

/* ==========================================
   MODAL OVERLAY & POPUP CENTERING
   ========================================== */
.modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  background: rgba(15, 23, 42, 0.65) !important;
  backdrop-filter: blur(4px) !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 99999 !important;
  padding: 16px !important;
  box-sizing: border-box !important;
}

.modal-overlay.active {
  display: flex !important;
}

/* Modal Card Window */
.modal-card.modal-lg,
.modal-card {
  background: #ffffff !important;
  width: 100% !important;
  max-width: 620px !important;
  max-height: 88dvh !important;
  border-radius: 16px !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  position: relative !important;
  margin: auto !important;
  animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Status Toggle Switch */
.status-toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #10b981;
  transition: color 0.2s;
}

.status-label.deceased {
  color: #64748b;
}

/* Switch Container */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

input:checked + .slider {
  background-color: #64748b;
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* Segmented Control (Alive / Deceased) */
.status-control-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-title-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
}

.segmented-control {
  display: inline-flex;
  background: #e2e8f0;
  border-radius: 8px;
  padding: 3px;
  position: relative;
  user-select: none;
}

.segmented-control input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.segmented-control .segment-btn {
  padding: 5px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #64748b;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.segmented-control input#status-alive:checked + .segment-btn {
  background: #dcfce7;
  color: #15803d;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(21, 128, 61, 0.18);
}

.segmented-control input#status-deceased:checked + .segment-btn {
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(185, 28, 28, 0.18);
}

/* ==========================================
   LANDING PAGE HERO & FEATURE ENHANCEMENTS
   ========================================== */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.hero-feature-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2.5rem;
  margin-left: auto;
  margin-right: auto;
}

.tag-pill {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.icon-cyan {
  background: #ecfeff;
  color: #0891b2;
}
.icon-rose {
  background: #fff1f2;
  color: #e11d48;
}
.icon-amber {
  background: #fef3c7;
  color: #d97706;
}
.icon-indigo {
  background: #e0e7ff;
  color: #4f46e5;
}

/* ==========================================
   AUTHENTICATION PAGE - CANVAS LINEAGE THEME
   ========================================== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8fafc;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8)),
    url("/img/bg2.jpg");
  /* background-image:
    radial-gradient(#cbd5e1 1.2px, transparent 1.2px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cpath d='M60 20 V50 M60 50 L30 80 M60 50 L90 80 M30 80 V105 M90 80 V105' stroke='%23e2e8f0' stroke-width='1.5' fill='none'/%3E%3Ccircle cx='60' cy='20' r='5' fill='%2394a3b8'/%3E%3Ccircle cx='30' cy='80' r='4' fill='%23cbd5e1'/%3E%3Ccircle cx='90' cy='80' r='4' fill='%23cbd5e1'/%3E%3Ccircle cx='30' cy='105' r='3' fill='%23e2e8f0'/%3E%3Ccircle cx='90' cy='105' r='3' fill='%23e2e8f0'/%3E%3C/svg%3E");
  background-size:
    24px 24px,
    120px 120px;
  background-position:
    0 0,
    center; */
}

.auth-page .auth-box {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow:
    0 25px 50px -12px rgba(15, 23, 42, 0.15),
    0 0 0 1px rgba(226, 232, 240, 0.6);
  position: relative;
  z-index: 10;
}

.auth-brand-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

.auth-box {
  background-color: #ffffff;
  padding: 36px 28px;
  border-radius: 16px;
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.08),
    0 8px 10px -6px rgba(0, 0, 0, 0.04);
  width: 400px;
  text-align: center;
  border: 1px solid #e2e8f0;
}

.auth-box h2 {
  margin: 12px 0 6px;
  color: var(--text-dark);
  font-size: 1.5rem;
  font-weight: 800;
}

.auth-box p {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.9rem;
}

.auth-box .input-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px 0 12px;
}
.auth-box .input-group input[type="text"] {
  background: #fff;
}
.auth-aux-links {
  text-align: right;
  margin-bottom: 18px;
}

.auth-aux-links a {
  font-size: 0.85rem;
  color: var(--theme-accent);
  text-decoration: none;
  font-weight: 500;
}
.auth-aux-links a:hover {
  text-decoration: underline;
}

.auth-main-btn {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 8px;
}

.auth-toggle-wrapper {
  margin-top: 18px;
  font-size: 0.88rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.auth-toggle-link {
  background: none;
  border: none;
  color: var(--theme-accent);
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  font-size: 0.88rem;
}
.auth-toggle-link:hover {
  text-decoration: underline;
}

.auth-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.auth-cancel-btn {
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================
   INTERACTIVE MENU HOVER ICONS
   ========================================== */
.hover-svg {
  flex-shrink: 0;
  color: var(--theme-accent);
  stroke-width: 2.2px;
  transition:
    color 0.2s ease,
    transform 0.2s ease,
    filter 0.2s ease;
}

.nav-btn:hover .hover-svg {
  color: var(--theme-accent-hover);
  transform: translateX(2px) scale(1.08);
  filter: drop-shadow(
    0 2px 3px color-mix(in srgb, var(--theme-accent) 35%, transparent)
  );
}

.nav-btn.logout-btn .hover-svg {
  color: #dc2626;
}

.nav-btn.logout-btn:hover .hover-svg {
  color: #dc2626;
}

.hover-item:hover .icon-export .anim-arrow {
  animation: exportDrop 0.5s cubic-bezier(0.16, 1, 0.3, 1) infinite alternate;
}
@keyframes exportDrop {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(3px);
  }
}

.hover-item:hover .icon-import .anim-arrow {
  animation: importLift 0.5s cubic-bezier(0.16, 1, 0.3, 1) infinite alternate;
}
@keyframes importLift {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-3px);
  }
}

.hover-item:hover .icon-pedigree .anim-node {
  animation: nodePulse 0.6s ease-in-out infinite alternate;
}
@keyframes nodePulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.2);
    opacity: 1;
  }
}

.hover-item:hover .icon-share .anim-link-top {
  animation: linkNudgeTop 0.4s ease forwards;
}
.hover-item:hover .icon-share .anim-link-bot {
  animation: linkNudgeBot 0.4s ease forwards;
}
@keyframes linkNudgeTop {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(1.5px, -1.5px);
  }
}
@keyframes linkNudgeBot {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(-1.5px, 1.5px);
  }
}

.hover-item:hover .icon-settings {
  transform: translateX(2px) rotate(45deg) scale(1.08);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.hover-item:hover .icon-upgrade .anim-sparkle {
  animation: sparkleTwinkle 0.6s ease-in-out infinite alternate;
}
@keyframes sparkleTwinkle {
  0% {
    transform: scale(0.9) rotate(0deg);
  }
  100% {
    transform: scale(1.15) rotate(12deg);
  }
}

.hover-item:hover .icon-admin .anim-check {
  animation: checkPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes checkPop {
  0% {
    transform: scale(0.8);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.hover-item:hover .icon-logout .anim-door-arrow {
  animation: logoutSlide 0.5s cubic-bezier(0.16, 1, 0.3, 1) infinite alternate;
}
@keyframes logoutSlide {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(3px);
  }
}

/* ==========================================
   INTERACTIVE SEARCH BAR & SVG ANIMATION
   ========================================== */
.search-box-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-right: 12px;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: #94a3b8;
  pointer-events: none;
  transition:
    color 0.2s ease,
    transform 0.2s ease;
  z-index: 2;
}

.tree-search-input {
  padding: 7px 14px 7px 36px;
  border-radius: 20px;
  border: 1px solid #cbd5e1;
  font-size: 0.85rem;
  outline: none;
  width: 220px;
  background: #f8fafc;
  color: var(--text-dark);
  transition:
    width 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.tree-search-input:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.tree-search-input:focus {
  width: 260px;
  background: #ffffff;
  border-color: var(--theme-accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.search-box-wrapper:hover .search-icon,
.search-box-wrapper:focus-within .search-icon {
  color: var(--theme-accent);
}

.search-box-wrapper:hover .search-lens,
.search-box-wrapper:focus-within .search-lens {
  animation: lensPulse 0.5s ease-in-out infinite alternate;
}

.search-box-wrapper:hover .search-handle,
.search-box-wrapper:focus-within .search-handle {
  animation: handleNudge 0.5s ease-in-out infinite alternate;
}

@keyframes lensPulse {
  0% {
    transform: scale(1);
    transform-origin: 11px 11px;
  }
  100% {
    transform: scale(1.15);
    transform-origin: 11px 11px;
  }
}

@keyframes handleNudge {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(1.5px, 1.5px);
  }
}

.search-results-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  margin-top: 4px;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  display: none;
  z-index: 1000;
}

/* ==========================================
   EVENT BADGE PULSE ANIMATION
   ========================================== */
.event-badge-pulse {
  animation: badgePulse 1.6s ease-in-out infinite alternate;
  transform-origin: center;
}

@keyframes badgePulse {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.18);
  }
}

/* ==========================================
   PERSON DETAILS MODAL & AVATAR ENLARGE
   ========================================== */
.det-avatar-container {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  margin: 0 auto 14px;
  border: 4px solid #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  background: #f1f5f9;
}

.det-avatar-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.det-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: bold;
  color: #64748b;
}

.avatar-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.det-avatar-container:hover .avatar-hover-overlay {
  opacity: 1;
}

.det-stats-grid {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 24px;
  text-align: center;
}

.det-stat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.det-stat-icon-wrapper {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.det-stat-icon-wrapper.born-icon {
  background: #fef3c7;
  color: #d97706;
}
.det-stat-icon-wrapper.anniv-icon {
  background: #f5f3ff;
  color: #7c3aed;
}
.det-stat-icon-wrapper.death-icon {
  background: #f1f5f9;
  color: #64748b;
}
.det-stat-icon-wrapper.loc-icon {
  background: #ecfdf5;
  color: #059669;
}

.det-stat-label {
  font-size: 0.8rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.det-stat-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
  word-break: break-word;
}

.det-bio-card {
  background: #f8fafc;
  padding: 16px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  margin-bottom: 20px;
  text-align: left;
}

.det-bio-card h4 {
  margin: 0 0 6px 0;
  font-size: 0.82rem;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.det-bio-card p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #334155;
}
#det-bio {
  font-family: "SriSri", cursive;
  font-size: 18px;
}
/* ==========================================
   IMAGE LIGHTBOX STYLES
   ========================================== */
.lightbox-container {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  padding: 8px;
}

.lightbox-container img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s ease;
}

.lightbox-close-btn:hover {
  background: rgba(220, 38, 38, 0.85);
}

.lightbox-caption {
  margin-top: 8px;
  color: #f8fafc;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
}

/* ==========================================
   FACE CROPPER MODAL STYLES
   ========================================== */
.cropper-modal-card {
  max-width: 650px !important;
  max-height: 90vh !important;
  background: #0f172a !important;
}

.cropper-modal-body {
  padding: 16px;
  background: #0f172a;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.cropper-canvas-wrapper {
  max-width: 100%;
  max-height: 60vh;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.cropper-canvas-wrapper img {
  max-width: 100%;
  max-height: 60vh;
  display: block;
}

.cropper-view-box,
.cropper-face {
  border-radius: 50% !important;
  outline: none !important;
}

.cropper-view-box {
  box-shadow: 0 0 0 2px var(--theme-accent) !important;
}

/* ==========================================
   TOAST NOTIFICATION COMPONENT
   ========================================== */
.toast-container {
  position: fixed;
  top: 82px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-message {
  pointer-events: auto;
  min-width: 260px;
  max-width: 380px;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow:
    0 10px 25px -5px rgba(0, 0, 0, 0.2),
    0 8px 10px -6px rgba(0, 0, 0, 0.1);
  transform: translateY(-20px);
  opacity: 0;
  transition:
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.25s ease;
}

.toast-message.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-icon {
  flex: 0 0 auto;
  font-size: 16px;
  line-height: 1;
}

.toast-message.info {
  background: color-mix(in srgb, var(--theme-accent) 12%, #ffffff);
  border: 1px solid color-mix(in srgb, var(--theme-accent) 30%, #ffffff);
  border-left: 4px solid var(--theme-accent);
  color: color-mix(in srgb, var(--theme-accent-hover) 72%, #0f172a);
}
.toast-message.success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-left: 4px solid #059669;
  color: #065f46;
}
.toast-message.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 4px solid #dc2626;
  color: #991b1b;
}
.toast-message.warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid #d97706;
  color: #92400e;
}

/* ==========================================
   HELP GUIDE MODAL STYLES
   ========================================== */
.help-guide-card {
  max-width: 680px !important;
  background: #ffffff !important;
}

.help-step-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #ffffff !important;
}

.help-step-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--bg-main);
  border: 1px solid var(--theme-footer-border);
  border-radius: 12px;
  padding: 16px;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
}

.help-step-card:hover {
  border-color: var(--theme-accent);
  transform: translateY(-1px);
}

.help-step-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--bg-surface);
  border: 1px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.help-step-card h4 {
  margin: 0 0 4px 0;
  font-size: 0.98rem;
  color: var(--text-dark);
  font-weight: 700;
}

.help-step-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==========================================
   HELP & SHORTCUTS MODAL POLISH
   ========================================== */
.help-nav-btn {
  padding: 6px 12px !important;
  font-size: 0.85rem !important;
  border-radius: 20px !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.help-tab-group {
  display: flex;
  background: var(--bg-main);
  padding: 4px;
  border-radius: 8px;
  gap: 6px;
}

.help-tab {
  flex: 1;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.help-tab.active {
  background: var(--bg-surface);
  color: var(--theme-accent);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.shortcuts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #ffffff !important;
}

.shortcut-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-main);
  border: 1px solid var(--theme-footer-border);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-dark);
  font-weight: 500;
}

.kbd-badge kbd {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-bottom: 2px solid #94a3b8;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 0.8rem;
  font-family: monospace;
  font-weight: 700;
  color: #334155;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Disable accidental text-selection on SVG and Person nodes */
#tree-container,
#tree-container svg,
#tree-container text,
.node,
.tree-content-group {
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
}

/* ==========================================
   CUSTOM CONTEXT MENU
   ========================================== */
.custom-tree-context-menu {
  position: fixed !important;
  z-index: 100000 !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  box-shadow:
    0 12px 30px -4px rgba(0, 0, 0, 0.22),
    0 4px 10px -2px rgba(0, 0, 0, 0.1) !important;
  min-width: 210px !important;
  padding: 6px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  touch-action: manipulation;
  -webkit-user-select: none !important;
  user-select: none !important;
}

@keyframes fadeInContextMenu {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.context-menu-header {
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 4px;
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  font-size: 0.88rem;
  font-weight: 500;
  color: #1e293b;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition:
    background 0.15s,
    color 0.15s;
}

.context-menu-item:hover {
  background: #f1f5f9;
  color: #2563eb;
}

/* ==========================================
   PEDIGREE CONTAINER & FLOATING BRANCH PILL
   ========================================== */
#pedigree-container {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 10px !important;
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 100;
}

.branch-filter-pill {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 6px 14px;
  border-radius: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  animation: slideDownPill 0.25s ease-out;
  white-space: nowrap;
}

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

.branch-pill-content {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: #334155;
}

.branch-pill-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.branch-pill-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}
