@import url('fonts.css');

:root {
  /* Core Platform Colors - Professional "Security Trust" Palette */
  --primary: #2563eb;
  /* Royal Blue */
  --primary-hover: #1d4ed8;
  --secondary: #64748b;
  /* Slate */
  --accent: #0ea5e9;
  /* Sky Blue */

  /* Semantic Tool Colors - More Reserved */
  /* Semantic Tool Colors - More Reserved / Unified */
  --tool-ig: #334155;
  /* Slate 700 */
  --tool-fb: #334155;
  --tool-tk: #334155;
  --tool-x: #334155;

  /* Theme Colors - Light Mode */
  --background: #f8fafc;
  --foreground: #0f172a;
  --card-bg: #ffffff;
  --card-border: rgba(0, 0, 0, 0.05);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.2);
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --nav-bg: rgba(255, 255, 255, 0.85);

  /* Status Colors */
  --status-success: #10b981;
  --status-error: #ef4444;
  --status-warning: #f59e0b;

  /* App Dimensions & Effects */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-premium: 0 12px 20px -5px rgba(0, 0, 0, 0.08);
  --transition: all 0.2s ease-in-out;
  --glass-blur: 12px;
  --font-app: 'Inter', system-ui, sans-serif;
}

body.dark-mode {
  --background: #020617;
  --foreground: #f8fafc;
  --card-bg: #0f172a;
  --card-border: rgba(255, 255, 255, 0.1);
  --glass-bg: rgba(15, 23, 42, 0.9);
  --glass-border: rgba(255, 255, 255, 0.15);
  --text-primary: #ffffff;
  --text-secondary: #e2e8f0;
  --text-muted: #94a3b8;
  --nav-bg: rgba(2, 6, 23, 0.85);
  --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);

  /* Dark Mode Specific Overrides */
  --pk-gradient-start: #94a3b8;
  /* Slate */
  --pk-gradient-end: #cbd5e1;
  --pk-gradient-end: #94a3b8;
  /* Lighter Slate */

  /* Softer Brand Shadow for Dark Mode */
  --shadow-brand: 0 10px 25px -5px rgba(37, 99, 235, 0.15);
}

/* Default Gradient Vars (Light Mode) */
:root {
  --pk-gradient-start: var(--primary);
  --pk-gradient-end: var(--secondary);
  --shadow-brand: 0 10px 20px -5px rgba(37, 99, 235, 0.3);
}

/* Base Styles */
body {
  background-color: var(--background);
  color: var(--text-primary);
  font-family: var(--font-app);
  transition: var(--transition);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Accessibility: Focus Indicators */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 4px;
}

.upload-section-main:focus {
  outline: none;
  border-color: var(--secondary) !important;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.4);
  /* Removed transform to stop jumping */
}

.nav-link:focus,
.dark-mode-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.4);
  border-radius: var(--radius-sm);
}

/* Glassmorphism Classes - SIMPLIFIED FOR STABILITY */
.glass {
  background: rgba(255, 255, 255, 0.95);
  /* Increased opacity */
  /* backdrop-filter: blur(var(--glass-blur)); REMOVED TO PREVENT CRASH */
  /* -webkit-backdrop-filter: blur(var(--glass-blur)); REMOVED TO PREVENT CRASH */
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
}

body.dark-mode .glass {
  background: rgba(15, 23, 42, 0.95);
  /* Increased opacity for dark mode */
}

/* Typography Improvements */
h1,
h2,
h3,
h4 {
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.gradient-text {
  color: var(--text-primary);
  /* Removed gradient for cleaner look */
}

/* Navbar */
.navbar {
  background: rgba(255, 255, 255, 0.98) !important;
  /* Solid background */
  /* backdrop-filter: blur(var(--glass-blur)); REMOVED */
  /* -webkit-backdrop-filter: blur(var(--glass-blur)); REMOVED */
  border-bottom: 1px solid var(--card-border);
  padding: 0.75rem 0;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

body.dark-mode .navbar {
  background: rgba(2, 6, 23, 0.98) !important;
}

/* Dynamic Header Glows */
#mainHeader.glow-ig {
  border-bottom: 2px solid #833ab4 !important;
  box-shadow: 0 4px 20px -5px rgba(131, 58, 180, 0.4);
}

#mainHeader.glow-fb {
  border-bottom: 2px solid #1877f2 !important;
  box-shadow: 0 4px 20px -5px rgba(24, 119, 242, 0.4);
}

#mainHeader.glow-tt {
  border-bottom: 2px solid #00f2ea !important;
  box-shadow: 0 4px 20px -5px rgba(0, 242, 234, 0.4);
}

#mainHeader.glow-x {
  border-bottom: 2px solid #ffffff !important;
  box-shadow: 0 4px 20px -5px rgba(255, 255, 255, 0.2);
}

body.dark-mode #mainHeader.glow-x {
  border-bottom: 2px solid #ffffff !important;
  box-shadow: 0 4px 20px -5px rgba(255, 255, 255, 0.1);
}

.navbar-brand {
  font-weight: 800;
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}

.nav-link {
  color: var(--text-secondary) !important;
  font-weight: 500;
  margin: 0 0.5rem;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary) !important;
  /* Removed transform to stop jumping */
}

/* Hero Section */
.hero-section-original {
  padding: 4rem 2rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(to bottom, #f8fafc, #edf2f7);
  border: 1px solid var(--card-border);
  margin-top: 2rem;
}

/* Upload Area */
.upload-section-main {
  background: var(--card-bg) !important;
  border: 2px dashed var(--primary) !important;
  border-radius: var(--radius-lg) !important;
  padding: 3rem !important;
  transition: var(--transition) !important;
  color: var(--text-primary) !important;
}

.upload-title {
  color: var(--text-primary) !important;
}

.upload-section-main p,
.upload-section-main small {
  color: var(--text-secondary) !important;
}

.upload-icon {
  color: var(--primary) !important;
  font-size: 4rem !important;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem !important;
    line-height: 1.1;
  }

  h2 {
    font-size: 1.5rem !important;
  }

  .hero-section-original {
    padding: 2rem 1rem;
  }

  .upload-section-main {
    padding: 2rem 1rem !important;
  }
}

/* Stats Dashboard (New Component) */
.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.stat-card {
  padding: 1.5rem;
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.stat-card:hover {
  /* Removed transform to stop jumping */
  box-shadow: var(--shadow-lg);
}

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

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Table Design */
.results-section {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

table {
  border: none !important;
}

th {
  background-color: var(--card-bg) !important;
  color: var(--text-primary) !important;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 1.25rem 1rem !important;
  border-bottom: 2px solid var(--card-border) !important;
}

td {
  padding: 1rem !important;
  color: var(--text-secondary) !important;
  border-bottom: 1px solid var(--card-border) !important;
}

tr:hover td {
  background-color: rgba(99, 102, 241, 0.05) !important;
  /* Keep text color neutral for readability, don't force primary color on hover */
  color: var(--text-primary) !important;
}

/* Buttons */
.btn-gradient {
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
  border: none !important;
  color: white !important;
  font-weight: 600 !important;
  padding: 0.75rem 1.5rem !important;
  border-radius: var(--radius-sm) !important;
  transition: var(--transition) !important;
}

.btn-gradient:hover {
  opacity: 0.95;
  /* Removed transform */
  box-shadow: var(--shadow-brand);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--background);
}

::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Animations - DISABLED FOR STABILITY */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Global Loading Overlay */
#loading {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--glass-bg);
  /* backdrop-filter: blur(var(--glass-blur)); REMOVED */
  /* -webkit-backdrop-filter: blur(var(--glass-blur)); REMOVED */
  z-index: 9999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

#loading[style*="display: flex"] {
  display: flex !important;
}

/* Instruction & Feature Items (Premium UI) */
.instruction-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 4rem 0;
}

.instruction-item {
  position: relative;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  overflow: hidden;
}

.instruction-item:hover {
  /* Removed transform */
  border-color: var(--primary);
  box-shadow: var(--shadow-premium);
}

.step-number {
  position: absolute;
  top: -10px;
  right: -10px;
  font-size: 6rem;
  font-weight: 900;
  color: var(--primary);
  opacity: 0.05;
  line-height: 1;
}

.instruction-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.1));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.platform-suite {
  margin: 6rem 0;
  padding: 4rem 0;
  border-top: 1px solid var(--card-border);
}

.tool-card {
  padding: 2rem;
  border-radius: var(--radius-lg);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tool-card:hover {
  /* Removed transform */
  box-shadow: var(--shadow-lg);
}

.tool-card-ig,
.tool-card-fb,
.tool-card-tk,
.tool-card-x {
  border: 1px solid var(--card-border);
  /* Unified border */
}


/* --- Animated Graphics & New Design Elements --- */

/* 1. Floating Animation - DISABLED */
@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-5px);
  }

  100% {
    transform: translateY(0px);
  }
}

.animate-float {
  /* Reduced animation intensity or disabled */
  /* animation: float 6s ease-in-out infinite; */
}

/* 2. Pulse / Glow - DISABLED */
@keyframes pulse-glow {
  0% {
    opacity: 1;
  }
}

.animate-pulse-glow {
  /* Disabled animation */
  /* animation: pulse-glow 2s infinite; */
}

/* 3. Scan Line - SIMPLIFIED */
@keyframes scan {
  0% {
    top: 0%;
    opacity: 0;
  }

  15% {
    opacity: 1;
  }

  85% {
    opacity: 1;
  }

  100% {
    top: 100%;
    opacity: 0;
  }
}

.scan-line {
  position: absolute;
  width: 100%;
  height: 2px;
  top: 0;
  left: 0;
  background: linear-gradient(to right, transparent 0%, var(--primary) 50%, transparent 100%);
  box-shadow: 0 0 10px var(--primary);
  /* Reduced shadow spread for smaller area */
  opacity: 0.8;
  animation: scan 2s ease-in-out infinite;
  /* Slightly faster scan for smaller area */
  display: block;
  z-index: 5;
  /* Above the icon base */
  pointer-events: none;
}

/* Ensure content stays above the scan line */
.upload-section-main>*:not(.scan-line) {
  position: relative;
  z-index: 2;
}

.upload-section-main {
  overflow: visible;
  /* Scan line is now contained in graphic-container */
}

/* Graphic Container */
.graphic-container {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  overflow: hidden;
  /* Clip scanner to this box */
  border-radius: 50%;
  /* Optional: if you want the scan clipped to circle, or remove for square clip */
}

/* CSS-only Icons (examples for replacement) */
.css-icon-zip {
  width: 60px;
  height: 80px;
  background: linear-gradient(135deg, #e0e7ff, #fff);
  border: 2px solid var(--primary);
  border-radius: 8px;
  position: relative;
  box-shadow: var(--shadow-brand);
}

.css-icon-zip::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
  box-shadow: 0 8px 0 var(--primary), 0 16px 0 var(--primary);
}

.css-icon-zip::after {
  content: 'ZIP';
  position: absolute;
  bottom: 10px;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--primary);
}

/* Hero Badge */
.hero-badge {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-weight: 600;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(37, 99, 235, 0.2);
}

/* Feature Item Enhanced */
.feature-box {
  padding: 2rem;
  background: var(--card-bg);
  /* Fallback */
  background: linear-gradient(145deg, var(--glass-bg), rgba(255, 255, 255, 0.4));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  height: 100%;
  position: relative;
  overflow: hidden;
}

.feature-box:hover {
  /* Removed transform */
  box-shadow: var(--shadow-lg);
  border-color: var(--secondary);
}

.feature-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--secondary);
  /* Unified color */
  opacity: 0;
  transition: opacity 0.3s;
}

.feature-box:hover::before {
  opacity: 0.5;
}

/* Premium Typography Overrides */
.display-title {
  font-size: 3.5rem;
  line-height: 1.1;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (max-width: 768px) {
  .display-title {
    font-size: 2.5rem;
  }
}

/* Dark Mode scan line opacity adjustment */
body.dark-mode .scan-line {
  opacity: 0.8;
  background: linear-gradient(to right, transparent, #60a5fa, transparent);
  box-shadow: 0 0 15px #60a5fa;
}


/* --- Iteration 2: Interactive Elements --- */

/* Comparison Table */
.comparison-section {
  padding: 4rem 0;
}

.table-comparison {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.table-comparison th,
.table-comparison td {
  padding: 1.5rem;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(5px);
}

.table-comparison th {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 1px;
  /* FIXED CONTRAST: Use dark background with light text OR light bg with dark text. 
     User complained about "blue on blue". Let's go for a clean look. */
  background: var(--glass-bg);
  color: var(--text-primary);
  border-bottom: 2px solid var(--card-border);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Fixed Contrast for Highlighted Column */
.table-comparison th:nth-child(2),
.table-comparison td:nth-child(2) {
  background: rgba(37, 99, 235, 0.1) !important;
  /* var(--primary) with low opacity */
  color: var(--primary) !important;
  font-weight: 700;
}

/* Ensure checkmarks in the highlighted column are visible */
.table-comparison td:nth-child(2) i {
  color: var(--primary);
}

.table-comparison td.feature-label {
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  width: 40%;
}

.table-comparison td.check-col {
  color: var(--success);
  font-size: 1.25rem;
  background: rgba(16, 185, 129, 0.05);
}

.table-comparison td.cross-col {
  color: var(--danger);
  font-size: 1.25rem;
  background: rgba(239, 68, 68, 0.05);
}

body.dark-mode .table-comparison th {
  background: rgba(30, 41, 59, 0.8);
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

/* FAQ Accordion */
.accordion-item {
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  overflow: hidden;
}

.accordion-button {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: none !important;
  padding: 1.25rem;
}

.accordion-button:not(.collapsed) {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
}

.accordion-button::after {
  filter: invert(0.5);
}

body.dark-mode .accordion-button {
  color: #e5e5e5;
}

body.dark-mode .accordion-button:not(.collapsed) {
  color: #93c5fd;
}

.accordion-body {
  background: rgba(0, 0, 0, 0.02);
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Dark Mode Utilities */
body.dark-mode .text-dark {
  color: #f8fafc !important;
}

body.dark-mode .text-muted {
  color: #cad5e1 !important;
}

body.dark-mode .dark-mode-white {
  color: #ffffff !important;
}

body.dark-mode .dark-mode-text {
  color: var(--text-primary) !important;
}

body.dark-mode .bg-light {
  background-color: rgba(255, 255, 255, 0.05) !important;
}

/* Footer Override */
footer {
  background-color: transparent !important;
  border-top: 1px solid var(--card-border) !important;
  color: var(--bs-body-color) !important;
  /* Force main body color (usually black/dark grey) */
}

.footer-legal {
  color: #000 !important;
  /* Force black as requested */
  font-weight: 500;
}

/* Ensure readable contrast in dark mode */
.dark-mode .footer-legal {
  color: rgba(255, 255, 255, 0.9) !important;
}

/* --- Iteration 3: Visual Polish --- */

/* New Content Elements */
.info-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* TikTok Specific Platform Styles */
.glow-tt-dual {
  background: radial-gradient(circle at top left, rgba(0, 242, 234, 0.15), transparent),
    radial-gradient(circle at bottom right, rgba(255, 0, 80, 0.15), transparent) !important;
}

.glow-tt-hover:hover {
  border-color: #00f2ea !important;
  box-shadow: 0 0 20px rgba(0, 242, 234, 0.3), 0 0 40px rgba(255, 0, 80, 0.1) !important;
}

/* Glitch Effect for TikTok Buttons */
.btn-glitch {
  position: relative;
  overflow: hidden;
}

.btn-glitch:hover::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 242, 234, 0.2);
  transform: translateX(-100%);
  animation: glitch-slide 0.3s forwards;
}

@keyframes glitch-slide {
  0% {
    transform: translateX(-100%);
  }

  50% {
    transform: translateX(10%);
  }

  100% {
    transform: translateX(0);
    opacity: 0;
  }
}

.btn-glitch:active {
  transform: scale(0.98);
}

/* TikTok Step Cards */
.tt-step-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  height: 100%;
  transition: var(--transition);
}

.tt-step-card:hover {
  border-color: #ff0050;
  box-shadow: 0 8px 32px -8px rgba(255, 0, 80, 0.2);
}

/* X (Twitter) Minimalist Black Theme - Only active in Dark Mode */
body.theme-x-black.dark-mode {
  background-color: #000000 !important;
  color: #ffffff !important;
}

body.theme-x-black.dark-mode .glass {
  background: rgba(15, 15, 15, 0.8) !important;
  border: 1px solid #333333 !important;
}

body.theme-x-black.dark-mode .text-secondary {
  color: #8899a6 !important;
}

/* Force Navbar Visibility on X Theme */
body.theme-x-black #mainHeader {
  z-index: 99999 !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
}

body.theme-x-black.dark-mode #mainHeader {
  background-color: rgba(0, 0, 0, 0.9) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body.theme-x-black:not(.dark-mode) #mainHeader {
  background-color: rgba(255, 255, 255, 0.9) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
}

body.theme-x-black {
  padding-top: 80px !important;
  /* Ensure body content doesn't hide behind fixed nav */
}

body.theme-x-black.dark-mode .badge-light {
  background: #1a1a1a !important;
  border-color: #333333 !important;
  color: #ffffff !important;
}

/* X Timeline Tutorial */
.x-timeline {
  position: relative;
  padding-left: 2rem;
}

.x-timeline::before {
  content: '';
  position: absolute;
  left: 0.75rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #333333;
}

.x-timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}

.x-timeline-item::before {
  content: '';
  position: absolute;
  left: -1.25rem;
  top: 0.25rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #000000;
  border: 2px solid #ffffff;
  z-index: 2;
}

/* Global Tutorial Step Cards */
.tutorial-step-container {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  max-width: 900px;
  margin: 0 auto;
}

.step-card-premium {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.step-number-badge {
  flex-shrink: 0;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: black;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.4);
}

.step-content-box {
  flex-grow: 1;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

/* Long Document Readability (Legal/Blog) */
.readable-content {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
}

.readable-content h2,
.readable-content h3 {
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  font-weight: 700;
}

main {
  padding-top: 80px;
  /* Space for fixed navbar */
  min-height: 80vh;
}

.readable-content p {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

.readable-content ul,
.readable-content ol {
  margin-bottom: 1.5rem;
}

.readable-content li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.date {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.pro-tip-callout {
  background: rgba(234, 179, 8, 0.1);
  border-left: 4px solid #eab308;
  padding: 1rem 1.5rem;
  border-radius: 0 8px 8px 0;
  margin-top: 1.5rem;
  font-size: 0.9rem;
}

.pro-tip-callout i {
  color: #eab308;
}

@media (max-width: 768px) {
  .step-card-premium {
    flex-direction: column;
    gap: 1rem;
  }

  .step-content-box:hover {
    transform: translateY(-5px);
  }
}

.feature-grid-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

/* Dynamic Animated Background */
@keyframes gradientMesh {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

body {
  background: linear-gradient(-45deg, #f3f4f6, #eff6ff, #f0fdf4, #fff7ed);
  background-size: 400% 400%;
  animation: gradientMesh 15s ease infinite;
}

body.dark-mode {
  background: linear-gradient(-45deg, #0f172a, #1e1b4b, #064e3b, #312e81);
  background-size: 400% 400%;
  animation: gradientMesh 15s ease infinite;
}

/* Micro-interactions */

/* Buttons */
#mainHeader {
  z-index: 1060;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  /* Removed transform */
  box-shadow: 0 10px 20px -10px rgba(37, 99, 235, 0.5);
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: 0.5s;
}

.btn-primary:hover::after {
  left: 100%;
}

/* Feature Cards & Glass Elements */
.glass,
.feature-box,
.tool-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass:hover,
.feature-box:hover,
.tool-card:hover {
  /* Removed transform */
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-color: rgba(255, 255, 255, 0.3);
}

box-shadow: inset 0 -3px 0 0 var(--primary) !important;
}

/* --- Migrated from legacy main.css --- */

/* Open Links Floating Button */
#open-links-button {
  position: fixed !important;
  bottom: 20px !important;
  right: 20px !important;
  width: 50px !important;
  height: 50px !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  background-color: var(--primary) !important;
  color: white !important;
  border: none !important;
  border-radius: 50% !important;
  box-shadow: var(--shadow-brand) !important;
  cursor: pointer !important;
  z-index: 100 !important;
  font-weight: 700 !important;
  transition: var(--transition) !important;
}

#open-links-button:hover {
  transform: translateY(-3px) !important;
  box-shadow: var(--shadow-brand) !important;
}

/* Scroll to Top Button */
#scroll-to-top {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  border-radius: 50%;
  display: none;
  /* Hidden by default, toggled by JS */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

#scroll-to-top:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
}

/* Specific Upload Text adjustment */
.upload-section-main b {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 0.5rem;
}

/* Ensure footer spacing if not handled by Bootstrap utilities */
footer {
  margin-top: 4rem;
}

/* --- Utilities & Refactored Helpers (Cycle 2) --- */

/* Sizing Utilities */
.mw-600 {
  max-width: 600px;
}

.w-200 {
  width: 200px !important;
}

.w-auto {
  width: auto !important;
}

.cursor-pointer {
  cursor: pointer;
}

/* Mockup Components */
.mockup-avatar {
  width: 30px;
  height: 30px;
}

.mockup-line-lg {
  width: 100px;
  height: 10px;
}

.mockup-line-md {
  width: 90px;
  height: 8px;
}

.mockup-line-sm {
  width: 80px;
  height: 8px;
}

.mockup-line-xs {
  width: 60px;
  height: 6px;
}

/* Corrected from 6px width which seemed wrong, using 60px */
.mockup-line-xxs {
  width: 50px;
  height: 6px;
}

/* Font Sizes */
.fs-xs {
  font-size: 0.75rem !important;
}

.fs-xxs {
  font-size: 0.65rem !important;
}

/* Radius Utilities */
.rounded-lg {
  border-radius: var(--radius-lg) !important;
}

.rounded-xl {
  border-radius: var(--radius-xl) !important;
}

/* Feature Icon Circles */
.icon-circle-lg {
  width: 80px;
  height: 80px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 2rem;
}

/* Background Effects */
.blur-blob {
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: var(--primary);
  filter: blur(100px);
  opacity: 0.1;
}

/* Cookie Consent Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--card-bg);
  border-top: 1px solid var(--card-border);
  padding: 1.5rem;
  z-index: 10000;
  box-shadow: var(--shadow-premium);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.cookie-banner.show {
  transform: translateY(0);
}

.cookie-banner p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: center;
  max-width: 800px;
}

.cookie-actions {
  display: flex;
  gap: 1rem;
}

.cookie-banner .btn-sm {
  font-weight: 600;
  padding: 0.5rem 1.5rem;
  border-radius: var(--radius-sm);
}

@media (min-width: 768px) {
  .cookie-banner {
    flex-direction: row;
    justify-content: space-between;
    padding: 1rem 2rem;
  }

  .cookie-banner p {
    text-align: left;
    margin-right: 2rem;
  }
}

/* Dark Mode Overrides for Banner */
body.dark-mode .cookie-banner {
  background: #1e293b;
  /* Slate 800 */
  border-top-color: #334155;
}