/* ==========================================================================
   cMovie Privacy Policy Website Stylesheet
   Modern, Clean, Responsive, Mobile-First, Accessible & Static-Deployment Ready
   ========================================================================== */

/* --- CSS Variables / Design System --- */
:root {
  /* Color Palette - Dark Theme (Default) */
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-card: #1f2937;
  --bg-card-hover: #374151;
  --bg-input: #111827;
  --border-color: #374151;
  --border-focus: #6366f1;
  
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --accent-primary: #6366f1;
  --accent-secondary: #06b6d4;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  --accent-hover: #4f46e5;
  --accent-light: rgba(99, 102, 241, 0.15);
  
  --success: #10b981;
  --warning: #f59e0b;
  --info: #3b82f6;
  
  /* Layout & Geometry */
  --header-height: 70px;
  --max-width: 1200px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.25);
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s ease;
  
  /* Fonts */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Light Theme Overrides */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #f1f5f9;
  --border-color: #e2e8f0;
  --border-focus: #4f46e5;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --accent-primary: #4f46e5;
  --accent-secondary: #0891b2;
  --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #0891b2 100%);
  --accent-hover: #4338ca;
  --accent-light: rgba(79, 70, 229, 0.08);
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.15);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  -webkit-font-smoothing: antialiased;
}

/* Typography Standards */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

h1 { font-size: 2.25rem; letter-spacing: -0.02em; }
h2 { font-size: 1.5rem; letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  text-decoration: underline;
}

ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  color: var(--text-secondary);
}

li {
  margin-bottom: 0.5rem;
}

code, kbd, pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

code {
  background: var(--bg-card-hover);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  color: var(--text-primary);
}

/* --- Container & Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Header & Navigation --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background-color: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

[data-theme="light"] .site-header {
  background-color: rgba(255, 255, 255, 0.85);
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
}

.brand-logo:hover {
  text-decoration: none;
}

.brand-logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(99, 102, 241, 0.3));
  transition: transform var(--transition-fast);
}

.brand-logo:hover .brand-logo-img {
  transform: scale(1.05);
}

.hero-logo-img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  margin-bottom: 1rem;
  filter: drop-shadow(0 4px 16px rgba(99, 102, 241, 0.4));
  animation: logoPulse 3s ease-in-out infinite alternate;
}

@keyframes logoPulse {
  0% { transform: scale(1); filter: drop-shadow(0 4px 16px rgba(99, 102, 241, 0.4)); }
  100% { transform: scale(1.04); filter: drop-shadow(0 6px 20px rgba(6, 182, 212, 0.5)); }
}

.logo-badge {
  width: 38px;
  height: 38px;
  background: var(--accent-gradient);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 900;
  font-size: 1.2rem;
  box-shadow: var(--shadow-glow);
}

.logo-text span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-primary);
  background-color: var(--accent-light);
  text-decoration: none;
}

.nav-link.active {
  color: var(--accent-primary);
  font-weight: 600;
  background-color: var(--accent-light);
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 1.1rem;
}

.theme-toggle-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-1px);
}

/* Mobile Menu Toggle */
.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
}

/* Mobile Drawer Overlay */
.mobile-drawer {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-secondary);
  z-index: 99;
  padding: 2rem 1.5rem;
  flex-direction: column;
  gap: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  transform: translateY(-100%);
  opacity: 0;
  transition: transform var(--transition-normal), opacity var(--transition-normal);
}

.mobile-drawer.open {
  transform: translateY(0);
  opacity: 1;
}

.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0;
}

.mobile-nav-links .nav-link {
  font-size: 1.1rem;
  padding: 0.75rem 1rem;
  display: block;
}

/* --- Hero Section --- */
.hero-section {
  padding: 3.5rem 0 2.5rem;
  background: radial-gradient(circle at top center, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.15rem;
  max-width: 720px;
  margin: 0 auto 1.75rem;
  color: var(--text-secondary);
}

.hero-meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.meta-item strong {
  color: var(--text-primary);
}

.meta-divider {
  color: var(--border-color);
}

/* --- Main Layout Grid --- */
.content-wrapper {
  padding: 3rem 0 5rem;
  flex: 1;
}

.layout-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  align-items: start;
}

/* Page with no TOC sidebar */
.layout-single {
  max-width: 860px;
  margin: 0 auto;
}

/* --- Table of Contents Sidebar --- */
.toc-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 1.5rem);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-md);
  max-height: calc(100vh - var(--header-height) - 3rem);
  overflow-y: auto;
}

.toc-title {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toc-nav {
  display: flex;
  flex-direction: column;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.toc-link {
  display: block;
  padding: 0.45rem 0.75rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  border-left: 2px solid transparent;
  transition: all var(--transition-fast);
  line-height: 1.4;
}

.toc-link:hover {
  color: var(--text-primary);
  background-color: var(--bg-card-hover);
  text-decoration: none;
}

.toc-link.active {
  color: var(--accent-primary);
  font-weight: 600;
  background-color: var(--accent-light);
  border-left-color: var(--accent-primary);
}

.toc-sub-list {
  list-style: none;
  padding-left: 0.85rem;
  margin-top: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.toc-sub-link {
  display: block;
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.toc-sub-link:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.toc-sub-link.active {
  color: var(--accent-primary);
  font-weight: 600;
}

/* Custom Scrollbar for TOC */
.toc-sidebar::-webkit-scrollbar {
  width: 4px;
}
.toc-sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.toc-sidebar::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

/* --- Policy Content Section Cards --- */
.policy-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.policy-intro-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.policy-intro-card p {
  font-size: 1.05rem;
  line-height: 1.8;
}

.policy-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-sm);
  scroll-margin-top: calc(var(--header-height) + 1.5rem);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.policy-section:hover {
  border-color: rgba(99, 102, 241, 0.3);
}

.policy-section.highlighted {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-color);
}

.section-number {
  background: var(--accent-light);
  color: var(--accent-primary);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.section-title {
  margin-bottom: 0;
  font-size: 1.4rem;
}

.sub-section {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--border-color);
}

.sub-section-title {
  font-size: 1.15rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

/* Highlight boxes for critical info */
.callout-box {
  background: var(--accent-light);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin: 1.25rem 0;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.callout-icon {
  font-size: 1.3rem;
  color: var(--accent-primary);
  line-height: 1;
  margin-top: 0.2rem;
}

.callout-content {
  flex: 1;
}

.callout-content p {
  margin-bottom: 0;
  color: var(--text-primary);
  font-size: 0.95rem;
}

/* Email Highlight Badge */
.email-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--accent-primary);
  font-weight: 600;
  margin: 0.5rem 0;
}

/* --- About & Account Deletion Page Cards --- */
.page-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
}

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

.info-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.info-card-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-light);
  color: var(--accent-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.info-card-title {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

/* Action Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  opacity: 0.95;
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
  text-decoration: none;
  color: #ffffff;
}

.btn-secondary {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  text-decoration: none;
}

/* Copy Email Helper */
.copy-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

/* --- Scroll to Top Button --- */
.scroll-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 46px;
  height: 46px;
  background: var(--accent-gradient);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-normal);
  z-index: 90;
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

/* --- Footer --- */
.site-footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-brand p {
  font-size: 0.925rem;
  max-width: 360px;
}

.footer-col-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.2rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

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

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

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

/* --- Responsive Media Queries --- */
@media (max-width: 1024px) {
  .layout-grid {
    grid-template-columns: 1fr;
  }
  
  .toc-sidebar {
    position: static;
    max-height: none;
    margin-bottom: 2rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-desktop .nav-links {
    display: none;
  }
  
  .mobile-menu-btn, .mobile-drawer {
    display: flex;
  }
  
  .hero-title {
    font-size: 2rem;
  }

  .hero-description {
    font-size: 1rem;
  }
  
  .policy-section, .page-card {
    padding: 1.5rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* Print Stylesheet */
@media print {
  .site-header, .toc-sidebar, .scroll-top-btn, .theme-toggle-btn, .mobile-menu-btn, .site-footer {
    display: none !important;
  }
  
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  
  .layout-grid {
    display: block !important;
  }
  
  .policy-section, .policy-intro-card {
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 1.5rem !important;
  }
}
