/* ==========================================================================
   XNight Social Network — Pure Monochrome Design System (Black & White)
   ========================================================================== */

:root {
  --bg-main: #07070c;
  --bg-surface: #0c0c14;
  --bg-card: #11111b;
  --bg-card-hover: #171724;
  --bg-overlay: rgba(0, 0, 0, 0.85);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.16);
  --border-strong: rgba(255, 255, 255, 0.35);

  --text-primary: #f3f2fa;
  --text-secondary: #a3a1b8;
  --text-muted: #8e8ba6;

  --btn-primary-bg: #8b7bff;
  --btn-primary-text: #0b0918;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-modal: 0 20px 60px rgba(0, 0, 0, 0.8);

  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

[data-theme="light"] {
  --bg-main: #fafafa;
  --bg-surface: #f4f4f5;
  --bg-card: #ffffff;
  --bg-card-hover: #f4f4f5;
  --bg-overlay: rgba(255, 255, 255, 0.85);

  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-medium: rgba(0, 0, 0, 0.14);
  --border-strong: rgba(0, 0, 0, 0.3);

  --text-primary: #09090b;
  --text-secondary: #52525b;
  --text-muted: #71717a;

  --btn-primary-bg: #09090b;
  --btn-primary-text: #ffffff;

  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.05);
  --shadow-modal: 0 20px 60px rgba(0, 0, 0, 0.15);
}

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

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

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--border-strong);
}

/* Container */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(6, 6, 8, 0.85);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.4s ease, border-color 0.4s ease;
}

[data-theme="light"] .navbar {
  background: rgba(250, 250, 250, 0.85);
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border-medium);
  transition: var(--transition-smooth);
}

.brand-logo:hover .brand-icon {
  transform: scale(1.05);
  border-color: var(--border-strong);
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
  padding: 4px 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--text-primary);
  transition: width 0.3s ease;
  border-radius: 2px;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Theme Switcher Pill */
.theme-switch-pill {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 68px;
  height: 34px;
  padding: 3px;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-smooth);
  user-select: none;
}

.theme-switch-pill:hover {
  border-color: var(--border-strong);
}

.theme-icon-option {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.theme-icon-option.active {
  color: var(--text-primary);
}

.theme-slider-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--text-primary);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .theme-slider-thumb {
  transform: translateX(34px);
  background: #000000;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 24px;
  border-radius: var(--radius-full);
  font-family: var(--font-main);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: 1px solid transparent;
  outline: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  box-shadow: var(--shadow-card);
}

.btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-medium);
  color: var(--text-primary);
}

.btn-outline:hover {
  background: var(--bg-surface);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
  padding-top: 170px;
  padding-bottom: 110px;
  text-align: center;
}

.hero-container {
  max-width: 820px;
  margin: 0 auto;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 28px;
}

.hero-pill-dot {
  width: 6px;
  height: 6px;
  background: var(--text-primary);
  border-radius: 50%;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin-bottom: 24px;
}

.hero-description {
  font-size: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 620px;
  margin: 0 auto 40px auto;
}

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

/* Features Grid */
.features-section {
  padding: 100px 0;
  border-top: 1px solid var(--border-subtle);
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px auto;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 36px 30px;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.feature-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  transition: var(--transition-smooth);
}

.feature-card:hover .feature-icon-box {
  border-color: var(--border-strong);
  transform: scale(1.06);
}

.feature-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.feature-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Security & 2FA Section */
.security-section {
  padding: 100px 0;
  border-top: 1px solid var(--border-subtle);
}

.security-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 56px 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  box-shadow: var(--shadow-card);
}

.security-list {
  list-style: none;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.security-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 0.98rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.security-check-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
  margin-top: 2px;
  font-weight: 700;
}

.security-box-interactive {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
}

/* Custom Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--border-medium);
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 4px;
  background-color: var(--text-primary);
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--text-primary);
}

input:checked + .slider:before {
  transform: translateX(20px);
  background-color: var(--bg-main);
}

/* FAQ Accordion Section */
.faq-section {
  padding: 100px 0;
  border-top: 1px solid var(--border-subtle);
}

.faq-container {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition-smooth);
}

.faq-item.active {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card);
}

.faq-question {
  padding: 22px 26px;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.faq-icon {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
  color: var(--text-muted);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  color: var(--text-primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 26px;
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.65;
}

.faq-item.active .faq-answer {
  max-height: 200px;
  padding: 0 26px 22px 26px;
}

/* Final Call To Action Banner */
.cta-section {
  padding: 100px 0;
  border-top: 1px solid var(--border-subtle);
}

.cta-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 80px 40px;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.cta-title {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}

.cta-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 36px auto;
  line-height: 1.6;
}

/* Footer */
.footer {
  background: var(--bg-main);
  border-top: 1px solid var(--border-subtle);
  padding: 70px 0 36px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 50px;
}

.footer-brand-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 14px;
  max-width: 300px;
  line-height: 1.6;
}

.footer-col-title {
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
  cursor: pointer;
}

.footer-link:hover {
  color: var(--text-primary);
}

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

/* Modal Popup Window for User Agreement / Terms */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 720px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-modal);
  transform: translateY(20px) scale(0.96);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open .modal-box {
  transform: translateY(0) scale(1);
}

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

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.modal-close-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: var(--transition-smooth);
}

.modal-close-btn:hover {
  background: var(--border-medium);
  transform: scale(1.05);
}

.modal-body {
  padding: 28px;
  overflow-y: auto;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.modal-body h4 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  font-size: 1.1rem;
  margin: 20px 0 8px 0;
}

.modal-body h4:first-child {
  margin-top: 0;
}

.modal-body p {
  margin-bottom: 12px;
}

.modal-footer {
  padding: 20px 28px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 3.2rem;
  }
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .security-card {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  .nav-links {
    display: none;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 14px;
    text-align: center;
  }
}

/* GPU Rendering & Smooth Scroll Optimizations */
html, body {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.modal-box,
.card,
.feature-card,
.btn {
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  will-change: transform, opacity;
}

