/* ImageCompressor Pro - Main Stylesheet */
/* Modern Tech Blue Theme */

:root {
  /* Core Theme Colors */
  --primary: #4A90E2;        /* Soft blue */
  --primary-hover: #357ABD;  /* Slightly darker blue for hover */
  --secondary: #50E3C2;      /* Aqua mint accent */
  --accent: #F5A623;         /* Soft orange for highlights or warning states */

  /* Backgrounds */
  --background: #F9FAFB;     /* Light gray-white background */
  --navbar-bg: #FFFFFF;      /* Pure white navbar */
  --footer-bg: #F3F4F6;      /* Subtle gray footer */
  --card-bg: #FFFFFF;        /* White cards for clean sections */

  /* Text Colors */
  --text-color: #333333;     /* Main text */
  --text-muted: #6B7280;     /* Muted gray for descriptions */
  --heading-color: #1F2937;  /* Darker gray for headings */

  /* Borders & Dividers */
  --border-color: #E5E7EB;   /* Light gray borders */

  /* Shadows */
  --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.05);
  --shadow-medium: 0 4px 15px rgba(0, 0, 0, 0.1);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
}

/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: 'Inter', sans-serif;
  background-color: var(--background);
  color: var(--text-color);
  line-height: 1.6;
}

/* Layout Helpers */
.flex-grow-1 {
  flex-grow: 1;
}

.bg-gradient-primary {
  background: var(--gradient-primary);
}

/* Typography - Optimized for better readability */
h1, h2, h3, h4, h5, h6 {
  color: var(--heading-color);
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

.text-accent {
  color: var(--accent) !important;
}

/* Navigation Styles */
.navbar {
  background-color: var(--navbar-bg) !important;
  box-shadow: var(--shadow-light);
  padding: 1rem 0;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
}

.navbar-brand img {
  transition: transform 0.3s ease;
}

.navbar-brand:hover img {
  transform: scale(1.05);
}

.navbar-nav .nav-link {
  color: var(--text-color) !important;
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
  border-radius: 8px;
  margin: 0 0.25rem;
}

.navbar-nav .nav-link:hover {
  color: var(--primary) !important;
  background-color: rgba(74, 144, 226, 0.1);
}

.navbar-nav .nav-link.active {
  color: var(--primary) !important;
  background-color: rgba(74, 144, 226, 0.15);
}

.navbar-toggler {
  border: none;
  padding: 0.5rem;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(74, 144, 226, 0.25);
}

/* Hero Section - Optimized sizing */
.hero-section {
  padding: 3rem 0;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  pointer-events: none;
}

/* Hero Comparison Styles */
.hero-comparison {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  padding: 2rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.comparison-container {
  position: relative;
  display: flex;
  gap: 2rem;
  align-items: stretch;
  justify-content: center;
  margin-bottom: 2rem;
  padding: 1rem;
}

.comparison-item {
  position: relative;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.1),
    0 8px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.4s ease;
  overflow: hidden;
  flex: 1;
  max-width: 320px;
  min-height: 380px;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.comparison-item:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow:
    0 25px 50px rgba(0, 0, 0, 0.2),
    0 10px 25px rgba(74, 144, 226, 0.3);
}

.comparison-item:hover .comparison-label {
  transform: translateX(-50%) scale(1.05);
  box-shadow: 0 8px 25px rgba(74, 144, 226, 0.5);
}

.before-item {
  border: 2px solid #ff6b6b;
}

.after-item {
  border: 2px solid #6bcf7f;
}

.comparison-label {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 1rem 2rem;
  border-radius: 30px;
  font-size: 1.1rem;
  font-weight: 700;
  z-index: 2;
  box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.before-label {
  background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
}

.after-label {
  background: linear-gradient(135deg, #6bcf7f, #4ecdc4);
}

.size-info {
  display: block;
  font-size: 0.7rem;
  opacity: 0.9;
  margin-top: 0.25rem;
}

.image-wrapper {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 4/3;
  height: 240px;
  box-shadow:
    0 8px 25px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.comparison-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  loading: lazy;
}

.comparison-item:hover .comparison-image {
  transform: scale(1.05);
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.comparison-item:hover .image-overlay {
  opacity: 1;
}

.overlay-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.overlay-text {
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Compression Arrow */
.compression-arrow {
  position: absolute;
  top: 75%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  z-index: 3;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.95));
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  height: auto;
  min-height: 45px;
}

.arrow-line {
  width: 70px;
  height: 3px;
  background: linear-gradient(90deg, #ff6b6b, #6bcf7f);
  position: relative;
  border-radius: 2px;
}

.arrow-line::after {
  content: '';
  position: absolute;
  right: -8px;
  top: -4px;
  width: 0;
  height: 0;
  border-left: 10px solid #6bcf7f;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

.arrow-head {
  font-size: 1.4rem;
  color: var(--primary);
  animation: arrowPulse 2s ease-in-out infinite;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.compression-stats {
  background: transparent;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Size Comparison Badge */
.size-comparison-badge {
  position: absolute;
  bottom: -25px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 1rem 2.5rem;
  border-radius: 20px;
  box-shadow:
    0 12px 30px rgba(74, 144, 226, 0.4),
    0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 4;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  height: auto;
  min-height: 60px;
}

.badge-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: white;
  flex-wrap: wrap;
}

.original-size, .compressed-size {
  font-size: 1.3rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.compression-arrow-mini {
  font-size: 1.5rem;
  animation: arrowPulse 2s ease-in-out infinite;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.compression-ratio {
  font-size: 1rem;
  opacity: 0.95;
  font-weight: 600;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-section .display-4 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  line-height: 1.2;
}

.hero-features {
  margin: 2rem 0;
}

.hero-features .fas {
  width: 20px;
}

/* Buttons */
.btn {
  border-radius: 12px;
  font-weight: 600;
  padding: 0.75rem 2rem;
  transition: all 0.3s ease;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.btn-accent {
  background-color: var(--accent);
  color: white;
}

.btn-accent:hover {
  background-color: #e6951f;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 166, 35, 0.3);
}

.btn-success {
  background-color: #10B981;
  color: white;
}

.btn-success:hover {
  background-color: #059669;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-secondary {
  background-color: #6B7280;
  color: white;
}

.btn-secondary:hover {
  background-color: #4B5563;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

/* Cards - Optimized spacing */
.card {
  border: none;
  border-radius: 12px;
  box-shadow: var(--shadow-light);
  transition: all 0.3s ease;
  background-color: var(--card-bg);
  margin-bottom: 1.5rem;
}

.card:hover {
  box-shadow: var(--shadow-medium);
  transform: translateY(-2px);
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

/* Upload Area */
.upload-area {
  transition: all 0.3s ease;
}

.upload-zone {
  border: 2px dashed var(--border-color);
  background:
    radial-gradient(circle at 20% 80%, rgba(74, 144, 226, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(80, 227, 194, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(245, 166, 35, 0.05) 0%, transparent 50%);
  transition: all 0.3s ease;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  position: relative;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-zone::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    linear-gradient(45deg, transparent 40%, rgba(74, 144, 226, 0.05) 50%, transparent 60%),
    linear-gradient(-45deg, transparent 40%, rgba(80, 227, 194, 0.05) 50%, transparent 60%);
  background-size: 40px 40px, 40px 40px;
  animation: patternMove 8s linear infinite;
  pointer-events: none;
}

.upload-zone::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(circle, rgba(74, 144, 226, 0.03) 1px, transparent 1px);
  background-size: 30px 30px;
  animation: sparkle 6s linear infinite;
  pointer-events: none;
}

.upload-zone:hover {
  border-color: var(--primary);
  background-color: rgba(74, 144, 226, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(74, 144, 226, 0.15);
}

.upload-zone.drag-over {
  border-color: var(--primary);
  background-color: rgba(74, 144, 226, 0.15);
  transform: scale(1.02) translateY(-2px);
  box-shadow: 0 12px 35px rgba(74, 144, 226, 0.25);
}

/* Animated Pattern */
.upload-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 10px,
      rgba(74, 144, 226, 0.05) 10px,
      rgba(74, 144, 226, 0.05) 11px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 10px,
      rgba(80, 227, 194, 0.05) 10px,
      rgba(80, 227, 194, 0.05) 11px
    );
  animation: patternShift 4s ease-in-out infinite alternate;
  pointer-events: none;
}

/* Floating Elements */
.floating-element {
  position: absolute;
  font-size: 1.5rem;
  animation: float 3s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

.floating-element-1 {
  top: 15%;
  left: 15%;
  animation-delay: 0s;
}

.floating-element-2 {
  top: 20%;
  right: 20%;
  animation-delay: 1s;
}

.floating-element-3 {
  bottom: 25%;
  left: 20%;
  animation-delay: 2s;
}

/* Upload Content */
.upload-content {
  z-index: 2;
  position: relative;
}

.upload-icon {
  margin-bottom: 1.5rem;
}

.icon-container {
  position: relative;
  display: inline-block;
}

.icon-main {
  font-size: 4rem;
  filter: drop-shadow(0 4px 8px rgba(74, 144, 226, 0.3));
  animation: iconBounce 2s ease-in-out infinite;
}

.icon-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120px;
  height: 120px;
  border: 3px solid rgba(74, 144, 226, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: pulse 2s ease-out infinite;
}

.upload-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--heading-color);
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.upload-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.feature-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.8rem;
  margin: 0.25rem;
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
  animation: badgeGlow 2s ease-in-out infinite alternate;
}

/* Progress Bar */
.progress {
  height: 8px;
  background-color: #E5E7EB;
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.3s ease;
  border-radius: 10px;
}

/* Footer - Optimized */
.footer {
  background: linear-gradient(135deg, #1F2937, #111827) !important;
  color: #FFFFFF !important;
  padding: 2rem 0 1.5rem;
  margin-top: auto;
  border-top: 3px solid var(--primary);
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.3);
}

.footer * {
  color: #FFFFFF !important;
}

.footer h1, .footer h2, .footer h3,
.footer h4, .footer h5, .footer h6 {
  color: #FFFFFF !important;
  font-weight: 700;
}

.footer a, .footer .nav-link {
  color: #FFFFFF !important;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
}

.footer a:hover, .footer .nav-link:hover {
  color: var(--primary) !important;
  text-decoration: none;
}

.footer .navbar-nav .nav-link {
  color: #FFFFFF !important;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
  border-radius: 8px;
  margin: 0 0.25rem;
}

.footer .navbar-nav .nav-link:hover {
  color: var(--primary) !important;
  background-color: rgba(74, 144, 226, 0.2);
}

.footer hr {
  border-color: rgba(74, 144, 226, 0.3);
}

/* Override Bootstrap footer text colors */
.footer .navbar-brand,
.footer .navbar-text,
.footer .navbar-nav .nav-link,
.footer .footer-links a,
.footer .footer-menu a {
  color: #FFFFFF !important;
}

.footer .navbar-brand:hover,
.footer .navbar-text:hover,
.footer .navbar-nav .nav-link:hover,
.footer .footer-links a:hover,
.footer .footer-menu a:hover {
  color: var(--primary) !important;
}

.footer .social-links a {
  transition: all 0.3s ease;
  display: inline-block;
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  border-radius: 50%;
  background-color: rgba(74, 144, 226, 0.2);
  color: #FFFFFF !important;
  border: 2px solid rgba(74, 144, 226, 0.3);
}

.footer .social-links a:hover {
  background-color: var(--primary);
  color: #FFFFFF !important;
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow:
    0 6px 16px rgba(74, 144, 226, 0.5),
    0 2px 8px rgba(0, 0, 0, 0.3);
}

.footer p, .footer span, .footer div {
  color: #FFFFFF !important;
}

.footer .text-muted {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* Page Headers - Optimized */
.page-header {
  padding: 2rem 0;
}

.page-header h1 {
  color: var(--heading-color);
  margin-bottom: 0.5rem;
  font-size: 2rem;
}

.page-header .lead {
  font-size: 1.1rem;
  margin-bottom: 0;
}

/* Feature Icons */
.feature-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  transition: all 0.3s ease;
}

.feature-icon:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(74, 144, 226, 0.3);
}

/* Contact Form */
.form-control, .form-select {
  border-radius: 12px;
  border: 2px solid var(--border-color);
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
  background-color: white;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(74, 144, 226, 0.25);
}

/* Enhanced Format Select */
.format-select {
  background: linear-gradient(135deg, #ffffff, #f8f9fa);
  border: 2px solid rgba(74, 144, 226, 0.2);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: var(--heading-color);
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.format-select:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.2);
}

.format-select:focus {
  border-color: var(--primary);
  box-shadow:
    0 0 0 0.2rem rgba(74, 144, 226, 0.25),
    0 4px 12px rgba(74, 144, 226, 0.2);
  background: linear-gradient(135deg, #ffffff, #f1f3f4);
}

.format-select option {
  padding: 0.5rem;
  font-weight: 500;
}

.form-label {
  font-weight: 600;
  color: var(--heading-color);
  margin-bottom: 0.5rem;
}

/* Tables */
.table {
  background-color: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
  width: 100%;
  table-layout: fixed;
  min-width: 100%;
}

.table thead th {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  font-weight: 700;
  padding: 1rem 0.5rem;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.8rem;
  min-width: 80px;
  text-align: center;
}

.table thead th:first-child {
  width: 25%;
  text-align: left;
}

.table thead th:nth-child(2) {
  width: 25%;
}

.table thead th:nth-child(3) {
  width: 20%;
}

.table thead th:last-child {
  width: 30%;
  text-align: center;
}

.table tbody td {
  border: none;
  padding: 0.75rem 0.5rem;
  vertical-align: middle;
  background-color: white;
  font-size: 0.85rem;
  text-align: center;
  word-wrap: break-word;
}

.table tbody td:first-child {
  text-align: left;
  font-weight: 600;
}

.table tbody td:last-child {
  text-align: center;
}

.table-hover tbody tr:hover {
  background-color: rgba(74, 144, 226, 0.05);
}

/* Table content styling */
.table tbody td img {
  max-width: 40px;
  max-height: 40px;
  border-radius: 6px;
  object-fit: cover;
}

.table tbody td .file-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.table tbody td .file-name {
  font-weight: 600;
  color: var(--heading-color);
  word-break: break-word;
}

.table tbody td .file-size {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(74, 144, 226, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
  white-space: nowrap;
}

/* Results Table Container */
.results-table-container {
  width: 100%;
  overflow-x: auto;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
}

/* Responsive Table */
@media (max-width: 768px) {
  .results-table-container {
    width: calc(100vw - 2rem);
    margin: 0 -1rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
    box-shadow: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table {
    min-width: 600px; /* Ensure minimum width for proper display */
    font-size: 0.8rem;
  }

  .table thead th {
    padding: 0.6rem 0.4rem;
    font-size: 0.75rem;
    min-width: 70px;
  }

  .table tbody td {
    padding: 0.6rem 0.4rem;
    font-size: 0.8rem;
  }

  .table tbody td .btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
    margin-bottom: 0.4rem;
    width: 100%;
    display: block;
    border-radius: 6px;
    font-weight: 600;
  }

  .table tbody td .btn + .btn {
    margin-top: 0.4rem;
  }

  /* Stack action buttons vertically on mobile */
  .table tbody td .d-flex {
    flex-direction: column;
    gap: 0.4rem;
  }
}

/* Alerts */
.alert {
  border-radius: 12px;
  border: none;
  padding: 1rem 1.5rem;
}

.alert-success {
  background-color: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.alert-danger {
  background-color: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.alert-info {
  background-color: rgba(74, 144, 226, 0.1);
  color: #1e40af;
}

/* Optimized Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.4s ease-out;
  animation-fill-mode: both;
}

/* Performance optimizations */
* {
  box-sizing: border-box;
}

/* Reduce repaints */
.card, .btn, .navbar {
  will-change: auto;
  transform: translateZ(0);
}

/* Optimize font rendering */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Responsive Design - Optimized */
@media (max-width: 768px) {
  .hero-section .display-4 {
    font-size: 1.75rem;
  }

  .hero-section {
    padding: 2rem 0;
    text-align: center;
  }

  .btn {
    width: 100%;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
  }

  .navbar-brand {
    font-size: 1.25rem;
  }

  .card-body {
    padding: 1.25rem;
  }

  .footer {
    text-align: center;
    padding: 1.5rem 0 1rem;
  }

  .footer .row > div {
    margin-bottom: 1.5rem;
  }

  /* Better mobile typography */
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
}

@media (max-width: 576px) {
  .hero-features {
    text-align: left;
  }

  .hero-features .d-flex {
    margin-bottom: 1rem;
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Better mobile spacing for results */
  .results-area {
    margin-top: 1rem;
  }

  .card-title {
    font-size: 1.25rem;
  }

  /* Stack action buttons vertically on very small screens */
  .table tbody td .btn {
    margin-bottom: 0.5rem;
  }

  .table tbody td .btn:last-child {
    margin-bottom: 0;
  }

  /* Mobile Upload Zone */
  .upload-zone {
    min-height: 220px;
    padding: 1.5rem;
  }

  .icon-main {
    font-size: 3rem;
  }

  .icon-pulse {
    width: 100px;
    height: 100px;
  }

  .upload-title {
    font-size: 1.25rem;
  }

  .floating-element {
    font-size: 1.25rem;
  }

  .feature-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    margin: 0.2rem;
  }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
  :root {
    --background: #1F2937;
    --navbar-bg: #111827;
    --footer-bg: #111827;
    --card-bg: #1F2937;
    --text-color: #F9FAFB;
    --text-muted: #D1D5DB;
    --heading-color: #F9FAFB;
    --border-color: #374151;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .footer,
  .btn {
    display: none !important;
  }

  .card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus Styles for Better Accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus,
.navbar-toggler:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Loading States - Optimized */
.loading {
  position: relative;
  pointer-events: none;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Simple Icons using CSS */
.icon-check {
  display: inline-block;
  width: 16px;
  height: 16px;
  background-color: var(--primary);
  position: relative;
  margin-right: 0.5rem;
}

.icon-check::after {
  content: '✓';
  color: white;
  font-weight: bold;
  position: absolute;
  top: -2px;
  left: 2px;
}

.icon-arrow {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 6px solid var(--primary);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  margin-right: 0.25rem;
}

.icon-compress {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 2px;
  position: relative;
  margin-right: 0.5rem;
}

.icon-compress::after {
  content: '↗';
  position: absolute;
  top: -3px;
  left: -1px;
  font-size: 12px;
  color: inherit;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--background);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-hover);
}

/* Quality Slider Styles - Compact & Beautiful */
.quality-slider-container {
  position: relative;
  margin-bottom: 1rem;
  background:
    linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow:
    0 4px 15px rgba(0, 0, 0, 0.08),
    0 2px 6px rgba(74, 144, 226, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(74, 144, 226, 0.12);
  transition: all 0.3s ease;
  overflow: hidden;
}

.quality-slider-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 16px 16px 0 0;
}

.quality-slider-container:hover {
  border-color: var(--primary);
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.12),
    0 3px 8px rgba(74, 144, 226, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transform: translateY(-2px);
}

.slider-wrapper {
  position: relative;
  margin-bottom: 1rem;
  padding: 0.75rem 0;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 10px;
  border: 1px solid rgba(74, 144, 226, 0.08);
}

.slider-wrapper::before {
  content: '🎚️ Drag to adjust quality';
  position: absolute;
  top: -25px;
  left: 0;
  font-size: 0.8rem;
  color: var(--heading-color);
  font-weight: 600;
  opacity: 0.9;
  background: rgba(255, 255, 255, 0.95);
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(74, 144, 226, 0.15);
}

.quality-slider {
  width: 100%;
  height: 10px;
  border-radius: 10px;
  background: linear-gradient(to right, #ff6b6b 0%, #ffd93d 25%, #6bcf7f 50%, #4ecdc4 75%, #45b7d1 100%);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid rgba(74, 144, 226, 0.2);
}

.quality-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: white;
  border: 4px solid var(--primary);
  cursor: pointer;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.3),
    0 0 0 2px rgba(74, 144, 226, 0.2);
  transition: all 0.3s ease;
  position: relative;
}

.quality-slider::-webkit-slider-thumb::after {
  content: '⚪';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  color: var(--primary);
}

.quality-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.4),
    0 0 0 3px rgba(74, 144, 226, 0.3);
  border-color: var(--primary-hover);
}

.quality-slider::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: white;
  border: 4px solid var(--primary);
  cursor: pointer;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.3),
    0 0 0 2px rgba(74, 144, 226, 0.2);
  transition: all 0.3s ease;
}

.quality-slider::-moz-range-thumb:hover {
  transform: scale(1.15);
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.4),
    0 0 0 3px rgba(74, 144, 226, 0.3);
}

.slider-value-display {
  margin-top: 1rem;
  padding: 1rem;
  background:
    linear-gradient(135deg, rgba(74, 144, 226, 0.06), rgba(80, 227, 194, 0.06));
  border-radius: 12px;
  border: 1px solid rgba(74, 144, 226, 0.12);
  position: relative;
  overflow: hidden;
}

.slider-value-display::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.quality-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 1rem;
}

.quality-value-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 0.75rem 1rem;
  border-radius: 12px;
  box-shadow:
    0 4px 12px rgba(74, 144, 226, 0.3),
    0 2px 6px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  min-width: 90px;
}

.quality-value-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shimmer 2s ease-in-out infinite;
}

.quality-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  line-height: 1;
  margin-bottom: 0.2rem;
}

.quality-unit {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.quality-label {
  font-size: 0.95rem;
  color: var(--heading-color);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.4rem 0.8rem;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(74, 144, 226, 0.15);
  white-space: nowrap;
}

/* Floating value bubble above slider thumb */
.slider-value-bubble {
  position: absolute;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 700;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.3),
    0 0 0 2px rgba(255, 255, 255, 0.2);
  display: none;
  z-index: 1000;
  white-space: nowrap;
  pointer-events: none;
  transform: translateX(-50%);
  animation: fadeIn 0.2s ease-in-out;
  border: 2px solid rgba(255, 255, 255, 0.3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.slider-value-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: var(--primary);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes valuePulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.6);
  }
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Upload Zone Animations */
@keyframes patternMove {
  0% {
    background-position: 0px 0px, 0px 0px;
  }
  100% {
    background-position: 40px 40px, -40px 40px;
  }
}

@keyframes sparkle {
  0% {
    transform: translateX(0) translateY(0);
  }
  33% {
    transform: translateX(-10px) translateY(-10px);
  }
  66% {
    transform: translateX(10px) translateY(-5px);
  }
  100% {
    transform: translateX(0) translateY(0);
  }
}

@keyframes patternShift {
  0% {
    opacity: 0.5;
    transform: scale(1);
  }
  100% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.7;
  }
  50% {
    transform: translateY(-15px) rotate(5deg);
    opacity: 1;
  }
}

@keyframes iconBounce {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

@keyframes pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0.8;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.4;
  }
  100% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0.8;
  }
}

@keyframes badgeGlow {
  0% {
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
  }
  100% {
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.6);
  }
}

/* Success Animation Keyframes */
@keyframes successPulse {
  0% {
    transform: scale(0.8);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes ringExpand {
  0% {
    width: 0px;
    height: 0px;
    opacity: 1;
  }
  100% {
    width: 80px;
    height: 80px;
    opacity: 0;
  }
}

@keyframes sizeBadgePulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Ad Section Styles */
.ad-section {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    position: relative;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
    min-height: 100px;
  }

.ad-section-article {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid var(--primary);
    border-top: 2px solid var(--primary);
    position: relative;
    padding: 2rem 0;
    margin: 2rem 0;
    box-shadow:
      0 4px 15px rgba(0, 0, 0, 0.05),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }

.ad-section-article .container {
    position: relative;
  }

.ad-section-article::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
  }

/* Vertical Ad Styles */
.vertical-ad-left,
.vertical-ad-right {
   position: sticky;
   top: 100px;
   z-index: 10;
   display: flex;
   align-items: flex-start;
   justify-content: center;
   padding: 1rem 0.5rem;
   background: rgba(255, 255, 255, 0.95);
   border-radius: 12px;
   box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
   backdrop-filter: blur(10px);
   border: 1px solid rgba(255, 255, 255, 0.2);
   margin: 0 0.25rem;
   min-height: 600px;
   max-width: 120px;
}

.vertical-ad-left {
   margin-right: 0.5rem;
}

.vertical-ad-right {
   margin-left: 0.5rem;
}

/* Hide ads if they would interfere with content */
@media (max-width: 1199px) {
   .vertical-ad-left,
   .vertical-ad-right {
      display: none;
   }
}

/* Ensure ads don't overlap with tool content */
@media (min-width: 1200px) {
   #compressor-tool .row {
      align-items: flex-start;
   }

   .vertical-ad-left,
   .vertical-ad-right {
      min-height: 600px;
      max-height: 600px;
      overflow: hidden;
   }
}

/* Hide ad section if no ad is visible */
.ad-section:empty,
.ad-section ins[style*="display: none"] {
  display: none !important;
}

.ad-section .container {
  position: relative;
}

/* Center ad on desktop */
@media (min-width: 768px) {
  .ad-section .container {
    max-width: 750px;
  }

  .ad-section ins {
    width: 728px !important;
    height: 90px !important;
  }
}

/* Ad Section Article Responsive */
@media (max-width: 768px) {
   .ad-section-article {
     padding: 1.5rem 0;
     margin: 1.5rem 0;
   }

   .ad-section-article ins {
     width: 100% !important;
     max-width: 400px !important;
     height: auto !important;
     min-height: 250px !important;
   }
 }

@media (max-width: 480px) {
   .ad-section-article {
     padding: 1rem 0;
     margin: 1rem 0;
   }

   .ad-section-article ins {
     max-width: 300px !important;
     min-height: 250px !important;
   }
 }

/* Responsive ad sizing for other ad sections */
@media (max-width: 768px) and (min-width: 481px) {
   .ad-section ins {
     width: 100% !important;
     max-width: 468px !important;
     height: 60px !important;
   }
 }

@media (max-width: 480px) {
   .ad-section ins {
     width: 100% !important;
     max-width: 320px !important;
     height: 50px !important;
   }
}

/* Article Section Styles */
.article-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  position: relative;
  overflow: hidden;
}

.article-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="article-pattern" width="60" height="60" patternUnits="userSpaceOnUse"><circle cx="30" cy="30" r="2" fill="%234A90E2" opacity="0.05"/><circle cx="60" cy="60" r="1" fill="%2350E3C2" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23article-pattern)"/></svg>');
  pointer-events: none;
}

.article-content {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.article-header {
  margin-bottom: 2rem;
}

.article-icon {
  display: inline-block;
  margin-bottom: 1rem;
}

.icon-wrapper {
  position: relative;
  display: inline-block;
}

.icon-main-article {
  font-size: 4rem;
  color: var(--primary);
  filter: drop-shadow(0 4px 8px rgba(74, 144, 226, 0.3));
  animation: iconFloat 3s ease-in-out infinite;
}

.icon-pulse-article {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120px;
  height: 120px;
  border: 3px solid rgba(74, 144, 226, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: pulseArticle 3s ease-out infinite;
}

.article-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--heading-color);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.article-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 800px;
  margin: 0 auto;
}

.article-body {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-color);
}

.article-section {
  margin-bottom: 3rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  border-left: 5px solid var(--primary);
  transition: all 0.3s ease;
}

.article-section:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.section-header {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.section-icon {
  font-size: 2rem;
  margin-right: 1rem;
  color: var(--primary);
  background: rgba(74, 144, 226, 0.1);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.section-header h3 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--heading-color);
  margin: 0;
}

/* Code Snippets */
.code-snippet {
  background: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
  margin: 1.5rem 0;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.code-header {
  background: var(--primary);
  color: white;
  padding: 1rem 1.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.code-content {
  padding: 1.5rem;
  background: #2d2d2d;
}

.code-line {
  color: #e83e8c;
  font-family: 'Courier New', monospace;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.code-line .keyword {
  color: #61dafb;
}

.code-line .number {
  color: #f78c6c;
}

/* Presets Table */
.presets-table {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.preset-item {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.preset-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(74, 144, 226, 0.4);
}

.preset-size {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.preset-desc {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.feature-item {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border-left: 4px solid var(--secondary);
  transition: all 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.feature-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--heading-color);
  margin-bottom: 0.5rem;
}

.feature-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Example Box */
.example-box {
  background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  border: 2px dashed var(--primary);
  margin: 2rem 0;
}

.example-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.example-before, .example-after {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--heading-color);
}

.example-arrow {
  font-size: 2rem;
  color: var(--primary);
  animation: arrowBounce 2s ease-in-out infinite;
}

.example-result {
  font-size: 1.1rem;
  color: #10B981;
  font-weight: 600;
  margin-top: 1rem;
  width: 100%;
}

/* Benefits List */
.benefits-list {
  background: rgba(74, 144, 226, 0.05);
  border-radius: 12px;
  padding: 2rem;
  border-left: 5px solid var(--primary);
}

.benefit-item {
  margin-bottom: 1rem;
  font-size: 1.05rem;
  color: var(--text-color);
  padding-left: 1rem;
}

.benefit-item:last-child {
  margin-bottom: 0;
}

/* FAQ Accordion */
.faq-accordion {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

.faq-item {
  border-bottom: 1px solid rgba(74, 144, 226, 0.1);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  background: rgba(74, 144, 226, 0.05);
  padding: 1.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--heading-color);
  cursor: pointer;
  transition: all 0.3s ease;
}

.faq-question:hover {
  background: rgba(74, 144, 226, 0.1);
  color: var(--primary);
}

.faq-answer {
  padding: 1.5rem;
  background: white;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Conclusion Highlight */
.conclusion-highlight {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 2rem;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 8px 25px rgba(74, 144, 226, 0.3);
}

.conclusion-highlight p {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Article Animations */
@keyframes iconFloat {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulseArticle {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0.8;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.3);
    opacity: 0.3;
  }
  100% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0.8;
  }
}

@keyframes arrowBounce {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* Compact Article Elements */
.highlight-box {
  background: rgba(74, 144, 226, 0.1);
  border: 1px solid var(--primary);
  border-radius: 8px;
  padding: 1rem;
  margin: 1.5rem 0;
  font-family: monospace;
  font-size: 0.9rem;
  text-align: center;
}

.presets-compact {
  background: rgba(74, 144, 226, 0.05);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.preset-row {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.preset-size {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
}

.preset-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.features-compact {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}

.feature-badge {
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.example-compact {
  background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  border: 2px dashed var(--primary);
  margin: 1.5rem 0;
}

.benefits-compact {
  background: rgba(74, 144, 226, 0.05);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  border-left: 4px solid var(--primary);
}

.faq-compact {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.faq-item {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(74, 144, 226, 0.1);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.faq-item:last-child {
  border-bottom: none;
}

.conclusion-compact {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 1.5rem;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(74, 144, 226, 0.3);
}

.article-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  border-left: 5px solid var(--primary);
  transition: all 0.3s ease;
}

/* Responsive Article Styles */
@media (max-width: 768px) {
  .article-content {
    padding: 1.5rem 1rem;
  }

  .article-title {
    font-size: 1.6rem;
  }

  .article-subtitle {
    font-size: 0.95rem;
  }

  .article-section {
    padding: 1rem;
    margin-bottom: 1.5rem;
  }

  .section-header h3 {
    font-size: 1.3rem;
  }

  .preset-row {
    justify-content: center;
    gap: 0.5rem;
  }

  .features-compact {
    justify-content: center;
    gap: 0.5rem;
  }

  .feature-badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }

  .highlight-box, .example-compact, .benefits-compact {
    padding: 1rem;
  }

  .conclusion-compact {
    padding: 1rem;
  }
}

/* Image Fallback Styling */
.image-fallback {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  border-radius: 12px;
}

.fallback-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.fallback-text {
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
}

/* Hero Comparison Animations */
@keyframes arrowPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
}

/* Responsive Hero Comparison */
@media (max-width: 768px) {
  .hero-comparison {
    max-width: 600px;
    padding: 1.5rem;
    margin: 1rem;
  }

  .comparison-container {
    flex-direction: column;
    gap: 1.5rem;
    padding: 0.5rem;
  }

  .comparison-item {
    max-width: 400px;
    width: 100%;
    min-height: 320px;
    margin: 0 auto;
  }

  .image-wrapper {
    height: 200px;
  }

  .comparison-label {
    font-size: 1rem;
    padding: 0.8rem 1.5rem;
  }

  .compression-arrow {
    position: static;
    transform: none;
    justify-content: center;
    margin: 1.25rem 0;
    padding: 0.75rem 1rem;
    gap: 0.75rem;
  }

  .arrow-line {
    width: 50px;
  }

  .stat-number {
    font-size: 1.3rem;
  }

  .arrow-head {
    width: 30px;
    height: 30px;
    font-size: 1.1rem;
  }

  .size-comparison-badge {
    position: static;
    transform: none;
    margin-top: 1.5rem;
    padding: 1rem 2rem;
    height: auto;
    min-height: 50px;
  }

  .badge-content {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }

  .original-size, .compressed-size {
    font-size: 1.2rem;
  }

  .compression-arrow-mini {
    font-size: 1.3rem;
  }

  .compression-ratio {
    font-size: 0.9rem;
  }
}

/* Success State Styling */
.success-animation {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
}

.success-icon {
  font-size: 4rem;
  color: #10B981;
  animation: successPulse 0.8s ease-out;
}

.success-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80px;
  height: 80px;
  border: 3px solid #10B981;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: ringExpand 0.8s ease-out;
}

.success-state h4 {
  color: #10B981;
  font-weight: 700;
}

.file-item {
  background: rgba(16, 185, 129, 0.1);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(16, 185, 129, 0.2);
  transition: all 0.3s ease;
}

.file-item:hover {
  background: rgba(16, 185, 129, 0.15);
  transform: translateX(2px);
}

.file-name {
  font-size: 0.9rem;
  font-weight: 500;
  flex: 1;
  margin-right: 0.5rem;
}

.file-size {
  background: #10B981 !important;
  animation: sizeBadgePulse 2s ease-in-out infinite;
}

.slider-marks {
  position: relative;
  height: 30px;
  margin-top: 1rem;
  background:
    linear-gradient(135deg, rgba(74, 144, 226, 0.05), rgba(80, 227, 194, 0.05));
  border-radius: 15px;
  padding: 0 0.5rem;
  border: 1px solid rgba(74, 144, 226, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  box-sizing: border-box;
}

.slider-marks::before {
  content: '';
  position: absolute;
  left: 8px;
  right: 8px;
  top: 50%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(74, 144, 226, 0.3), transparent);
  transform: translateY(-50%);
  z-index: 1;
}

.slider-marks .mark {
  position: absolute;
  font-size: 0.75rem;
  color: var(--heading-color);
  font-weight: 600;
  transform: translateX(-50%);
  user-select: none;
  background: linear-gradient(135deg, white, #f8f9fa);
  padding: 0.3rem 0.5rem;
  border-radius: 8px;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.1),
    0 1px 2px rgba(74, 144, 226, 0.15);
  border: 1px solid rgba(74, 144, 226, 0.2);
  top: 50%;
  transform: translateX(-50%) translateY(-50%);
  transition: all 0.3s ease;
  z-index: 2;
}

.slider-marks .mark:hover {
  transform: translateX(-50%) translateY(-1px);
  box-shadow:
    0 3px 6px rgba(0, 0, 0, 0.15),
    0 1px 3px rgba(74, 144, 226, 0.2);
}

.slider-marks .mark::after {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  width: 3px;
  height: 8px;
  background: linear-gradient(to bottom, var(--primary), var(--secondary));
  transform: translateX(-50%);
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* Responsive layout adjustments */
@media (max-width: 768px) {
  .quality-slider-container {
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    border-radius: 12px;
  }

  .slider-wrapper {
    margin-bottom: 0.75rem;
    padding: 0.5rem 0;
  }

  .slider-value-display {
    margin-top: 0.75rem;
    padding: 0.75rem;
    gap: 0.75rem;
  }

  .quality-info {
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    width: 100%;
  }

  .quality-value-container {
    min-width: 80px;
    padding: 0.6rem 0.8rem;
  }

  .quality-value {
    font-size: 1.2rem;
  }

  .quality-unit {
    font-size: 0.65rem;
  }

  .quality-label {
    font-size: 0.85rem;
    padding: 0.3rem 0.6rem;
  }

  .slider-marks {
    height: 25px;
    margin-top: 0.75rem;
    padding: 0 0.3rem;
  }

  .slider-marks .mark {
    font-size: 0.7rem;
    padding: 0.25rem 0.4rem;
  }

  /* Adjust mark positions for mobile */
  .slider-marks .mark:nth-child(1) { left: 6% !important; }
  .slider-marks .mark:nth-child(2) { left: 28% !important; }
  .slider-marks .mark:nth-child(3) { left: 50% !important; }
  .slider-marks .mark:nth-child(4) { left: 72% !important; }
  .slider-marks .mark:nth-child(5) { left: 94% !important; }

  /* Hide slider bubble and instruction on mobile for cleaner look */
  .slider-value-bubble {
    display: none !important;
  }

  .slider-wrapper::before {
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    top: -22px;
  }

  /* Format select on mobile */
  .format-select {
    font-size: 0.95rem;
    padding: 0.875rem;
  }
}