/* 
  QuickPdfBox Premium UI System
  Modern SaaS Aesthetic, Mesh Gradients, and Advanced Glassmorphism 
*/
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Premium Dark Theme Palette */
  --bg-base: #050505;
  --bg-surface: rgba(18, 18, 20, 0.6);
  --bg-card: rgba(24, 24, 27, 0.45);
  --bg-card-hover: rgba(39, 39, 42, 0.65);
  
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-strong: rgba(255, 255, 255, 0.15);
  
  /* Vibrant Accents */
  --accent-primary: #8b5cf6; /* Violet */
  --accent-secondary: #3b82f6; /* Blue */
  --accent-tertiary: #ec4899; /* Pink */
  
  --gradient-main: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary), var(--accent-tertiary));
  --gradient-hover: linear-gradient(135deg, #60a5fa, #a78bfa, #f472b6);

  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-tertiary: #71717a;

  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;

  --shadow-glow: 0 0 30px rgba(139, 92, 246, 0.25);
  --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease-out;
}

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

html {
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.015em;
  scroll-behavior: smooth;
}

/* Dynamic Mesh Gradient Background */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: -1;
  background-color: var(--bg-base);
  background-image: 
    radial-gradient(at 0% 0%, rgba(139, 92, 246, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(236, 72, 153, 0.1) 0px, transparent 50%);
  filter: blur(100px);
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); margin-bottom: 1rem; }
h3 { font-size: 1.25rem; }

p { line-height: 1.6; }

a { color: var(--accent-secondary); text-decoration: none; transition: var(--transition-fast); }
a:hover { color: #60a5fa; }

/* Navbar - True Glassmorphism */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 5, 5, 0.5);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  padding: 1rem 2rem;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.04em;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--gradient-main);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.5);
}

.logo-text span { color: var(--text-secondary); font-weight: 500; }

.nav-links {
  display: flex;
  gap: 0.3rem;
  list-style: none;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.35rem 0.5rem;
  border-radius: 99px;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.45rem 1.1rem;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: var(--transition-fast);
}

.nav-links a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-links a.active {
  color: #fff;
  background: var(--gradient-main);
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.35);
  font-weight: 600;
}

/* Trust Pill & Language Switcher */
.badge-trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 99px;
  color: #34d399;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.lang-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  border-radius: 99px;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.lang-switch-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--glass-border-strong);
  color: #fff;
}


/* Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 4rem 2rem;
  width: 100%;
  flex: 1;
}

/* Hero Section */
.hero {
  text-align: center;
  max-width: 900px;
  margin: 0 auto 4rem;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.25rem;
  margin: 1.5rem auto 3rem;
  max-width: 700px;
}

.text-gradient {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Premium Dropzone */
.dropzone-wrapper {
  padding: 2px;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02));
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.dropzone-wrapper::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%; width: 200%; height: 200%;
  background: conic-gradient(transparent, var(--accent-primary), transparent 30%);
  animation: rotate 4s linear infinite;
  opacity: 0.3;
}

@keyframes rotate { 100% { transform: rotate(360deg); } }

.dropzone {
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  border-radius: calc(var(--radius-lg) - 2px);
  padding: 4rem 2rem;
  text-align: center;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: var(--transition-smooth);
}

.dropzone:hover, .dropzone.dragover {
  background: rgba(30, 30, 35, 0.7);
  box-shadow: inset 0 0 0 1px var(--accent-primary), var(--shadow-glow);
}

.dropzone-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  display: inline-block;
  filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.4));
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

/* Tool Grid & Cards */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: var(--transition-smooth);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.tool-card:hover {
  transform: translateY(-8px);
  border-color: var(--glass-border-strong);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-card), 0 0 40px rgba(139, 92, 246, 0.1);
}

/* Glass Orb Icons */
.tool-icon-orb {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.0));
  border: 1px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  box-shadow: inset 0 4px 10px rgba(255,255,255,0.1), 0 8px 20px rgba(0,0,0,0.2);
  position: relative;
}

.tool-icon-orb::after {
  content: '';
  position: absolute;
  top: -10px; left: -10px; right: -10px; bottom: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
  opacity: 0.15;
  z-index: -1;
  transition: var(--transition-smooth);
}

.tool-card:hover .tool-icon-orb::after { opacity: 0.4; transform: scale(1.2); }

.tool-title { font-size: 1.4rem; color: #fff; }
.tool-desc { color: var(--text-secondary); font-size: 0.95rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  border-radius: 99px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-fast);
  border: none;
}

.btn-primary {
  background: var(--gradient-main);
  color: #fff;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.btn-primary:hover {
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.6);
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid var(--glass-border);
}

.btn-secondary:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--glass-border-strong); }

.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Editor Workspace */
.editor-workspace {
  background: var(--bg-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card);
}

.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--glass-border);
  flex-wrap: wrap;
  gap: 1rem;
}

/* Form Controls */
.form-control {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  color: #fff;
  font-family: inherit;
  width: 100%;
  transition: var(--transition-fast);
}
.form-control:focus {
  border-color: var(--accent-primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.control-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tool-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
}

/* Thumbnails */
.thumbnails-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
  min-height: 300px;
}

.thumb-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: var(--transition-fast);
}

.thumb-card:hover {
  border-color: var(--glass-border-strong);
  background: rgba(255, 255, 255, 0.05);
}

.thumb-card.selected {
  border-color: var(--accent-primary);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.15);
}

.thumb-preview {
  width: 100%;
  height: 200px;
  object-fit: contain;
  background: #fff; /* Keep white for PDF preview contrast */
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

/* SEO Article */
.seo-article {
  margin-top: 5rem;
  padding: 4rem;
  background: linear-gradient(180deg, rgba(24, 24, 27, 0.4) 0%, rgba(18, 18, 20, 0.2) 100%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
}
.seo-article h2 { color: #fff; margin-bottom: 2rem; font-size: 2rem; }
.seo-article p { color: var(--text-secondary); margin-bottom: 1.5rem; font-size: 1.05rem; }

/* Loader Overlay */
.loader-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-fast);
}
.loader-overlay.active { opacity: 1; pointer-events: auto; }
.spinner {
  width: 60px; height: 60px;
  border: 4px solid rgba(255,255,255,0.1);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

/* Footer */
.footer {
  border-top: 1px solid var(--glass-border);
  padding: 3rem 2rem;
  margin-top: auto;
  background: rgba(0, 0, 0, 0.3);
}
