/* FastConvert - Custom Styles */

/* ========================
   CSS Variables (Theme)
   ======================== */
:root {
  /* Light mode colors */
  --color-bg-primary: #f8fafc;
  --color-bg-secondary: #ffffff;
  --color-bg-tertiary: #f1f5f9;
  --color-text-primary: #0f172a;
  --color-text-secondary: #475569;
  --color-text-muted: #94a3b8;
  --color-border: #e2e8f0;
  --color-border-hover: #cbd5e1;

  /* Brand colors */
  --color-primary: #6366f1;
  --color-primary-hover: #4f46e5;
  --color-primary-light: #eef2ff;
  --color-secondary: #06b6d4;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #0ea5e9 100%);
  --gradient-dark: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-glow: 0 0 40px -10px rgb(99 102 241 / 0.5);

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-blur: blur(20px);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;

  /* Border radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
}

/* Dark mode variables */
[data-theme="dark"] {
  --color-bg-primary: #0f172a;
  --color-bg-secondary: #1e293b;
  --color-bg-tertiary: #334155;
  --color-text-primary: #f1f5f9;
  --color-text-secondary: #cbd5e1;
  --color-text-muted: #64748b;
  --color-border: #334155;
  --color-border-hover: #475569;
  --color-primary-light: #1e1b4b;

  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
}

/* ========================
   Base Styles
   ======================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  line-height: 1.6;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* ========================
   Typography
   ======================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text-primary);
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========================
   Layout
   ======================== */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ========================
   Navigation
   ======================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  padding: 1rem 0;
  transition: all var(--transition-normal);
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--color-text-primary);
}

.nav-logo-icon {
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  text-decoration: none;
  color: var(--color-text-secondary);
  font-weight: 500;
  transition: color var(--transition-fast);
}

.nav-link:hover {
  color: var(--color-primary);
}

/* Theme Toggle */
.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-bg-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  border-color: var(--color-primary);
  transform: scale(1.05);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  color: var(--color-text-secondary);
}

/* ========================
   Hero Section
   ======================== */
.hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%);
  animation: pulse-bg 8s ease-in-out infinite;
}

@keyframes pulse-bg {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.5;
  }

  50% {
    transform: scale(1.1);
    opacity: 1;
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--color-text-secondary);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ========================
   Tool Cards
   ======================== */
.tools-section {
  padding: 4rem 0;
}

.section-title {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 3rem;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.tool-card {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform var(--transition-normal);
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--color-primary);
}

.tool-card:hover::before {
  transform: scaleX(1);
}

.tool-icon {
  width: 56px;
  height: 56px;
  background: var(--color-primary-light);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--color-primary);
}

.tool-icon svg {
  width: 28px;
  height: 28px;
}

.tool-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.tool-description {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
}

/* ========================
   Upload Area
   ======================== */
.upload-section {
  padding: 4rem 0;
}

.upload-container {
  max-width: 700px;
  margin: 0 auto;
}

.upload-area {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-2xl);
  padding: 4rem 2rem;
  text-align: center;
  background: var(--color-bg-secondary);
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
}

.upload-area:hover,
.upload-area.drag-over {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.upload-area.drag-over {
  transform: scale(1.02);
}

.upload-icon {
  width: 80px;
  height: 80px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: white;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.upload-icon svg {
  width: 36px;
  height: 36px;
}

.upload-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.upload-subtitle {
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
}

.upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gradient-primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.upload-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.upload-info {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* ========================
   Progress Bar
   ======================== */
.progress-container {
  display: none;
  margin-top: 2rem;
}

.progress-container.active {
  display: block;
}

.progress-bar-wrapper {
  background: var(--color-bg-tertiary);
  border-radius: var(--radius-xl);
  overflow: hidden;
  height: 12px;
}

.progress-bar {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-xl);
  width: 0%;
  transition: width var(--transition-normal);
  position: relative;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

.progress-text {
  margin-top: 0.75rem;
  text-align: center;
  font-weight: 500;
  color: var(--color-text-secondary);
}

/* ========================
   Download Section
   ======================== */
.download-section {
  display: none;
  text-align: center;
  margin-top: 2rem;
  padding: 2rem;
  background: var(--color-bg-secondary);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
}

.download-section.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.download-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: white;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 1rem 2rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px -10px rgb(16 185 129 / 0.5);
}

/* ========================
   Google AdSense - High CPM/CTR Optimized
   ======================== */

/* Base Ad Container - Policy Compliant */
.ad-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 2rem auto;
  padding: 1.5rem;
  box-sizing: border-box;
}

/* Ad Label - Required for Policy Compliance */
.ad-label {
  display: block;
  text-align: center;
  font-size: 0.65rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
  opacity: 0.7;
}

/* Ad Container Base */
.ad-container {
  background: var(--color-bg-tertiary);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  overflow: hidden;
  /* Responsive */
  max-width: 100%;
  height: auto;
  /* Safe clickable margin - prevents accidental clicks */
  margin: 0.5rem 0;
}

/* Horizontal Banner - Above/Below Upload (728x90 or Responsive) */
.ad-container.horizontal {
  min-height: 90px;
  max-height: 120px;
  width: 100%;
  max-width: 728px;
  margin-left: auto;
  margin-right: auto;
}

/* Large Horizontal - Leaderboard (970x90) */
.ad-container.leaderboard {
  min-height: 90px;
  max-width: 970px;
  margin-left: auto;
  margin-right: auto;
}

/* Square/Rectangle - During Progress (300x250) */
.ad-container.rectangle {
  min-height: 250px;
  width: 300px;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* Large Rectangle - High CPM (336x280) */
.ad-container.large-rectangle {
  min-height: 280px;
  width: 336px;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* Vertical/Sidebar - Desktop Only (300x600 or 160x600) */
.ad-container.sidebar {
  min-height: 600px;
  width: 300px;
  max-width: 100%;
  position: sticky;
  top: 100px;
}

.ad-container.skyscraper {
  min-height: 600px;
  width: 160px;
  max-width: 100%;
}

/* In-Article - Native Looking */
.ad-container.in-article {
  min-height: 250px;
  max-width: 100%;
  margin: 2rem 0;
  border-style: solid;
  border-color: var(--color-border);
}

/* Download Button Ad - Safe Margin Above Button */
.ad-container.before-download {
  min-height: 100px;
  max-width: 468px;
  margin: 2rem auto;
  /* Extra safe margin to prevent accidental clicks */
  margin-bottom: 2.5rem;
}

/* Lazy Load Placeholder */
.ad-container.lazy {
  background: linear-gradient(90deg,
      var(--color-bg-tertiary) 25%,
      var(--color-bg-secondary) 50%,
      var(--color-bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: adShimmer 1.5s infinite linear;
}

@keyframes adShimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* Ad Loaded State */
.ad-container.loaded {
  background: transparent;
  border: none;
  padding: 0;
  animation: none;
}

/* Page Layout with Sidebar */
.page-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.page-main-content {
  min-width: 0;
}

.page-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Hide sidebar on mobile */
@media (max-width: 1024px) {
  .page-with-sidebar {
    grid-template-columns: 1fr;
  }

  .page-sidebar {
    display: none;
  }

  .ad-container.sidebar,
  .ad-container.skyscraper {
    display: none;
  }
}

/* Mobile Ad Sizes */
@media (max-width: 768px) {
  .ad-wrapper {
    padding: 1rem;
    margin: 1.5rem auto;
  }

  .ad-container.horizontal,
  .ad-container.leaderboard {
    min-height: 50px;
    max-height: 100px;
  }

  .ad-container.rectangle,
  .ad-container.large-rectangle {
    width: 100%;
    max-width: 300px;
    min-height: 250px;
  }

  .ad-container.before-download {
    max-width: 100%;
    min-height: 50px;
  }
}

/* Small Mobile */
@media (max-width: 400px) {

  .ad-container.rectangle,
  .ad-container.large-rectangle {
    max-width: 250px;
    min-height: 200px;
  }
}

/* AdSense INS Element Responsive */
.ad-container ins.adsbygoogle {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}

/* Processing Ad - Shown During Conversion */
.ad-processing {
  display: none;
  margin: 2rem auto;
}

.ad-processing.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

/* ========================
   Footer
   ======================== */
.footer {
  background: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--color-text-primary);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* ========================
   Responsive
   ======================== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hero {
    min-height: auto;
    padding: 7rem 0 3rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .upload-area {
    padding: 2rem 1rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* ========================
   File List
   ======================== */
.file-list {
  margin-top: 1.5rem;
  text-align: left;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--color-bg-tertiary);
  border-radius: var(--radius-lg);
  margin-bottom: 0.5rem;
}

.file-item-icon {
  width: 40px;
  height: 40px;
  background: var(--color-primary-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
}

.file-item-info {
  flex: 1;
}

.file-item-name {
  font-weight: 500;
  word-break: break-all;
}

.file-item-size {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.file-item-remove {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: all var(--transition-fast);
}

.file-item-remove:hover {
  background: var(--color-error);
  color: white;
}

/* ========================
   Options Panel
   ======================== */
.options-panel {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--color-bg-tertiary);
  border-radius: var(--radius-xl);
}

.options-title {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.option-group label {
  display: block;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.5rem;
}

.option-group select,
.option-group input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-secondary);
  color: var(--color-text-primary);
  font-size: 0.95rem;
  transition: border-color var(--transition-fast);
}

.option-group select:focus,
.option-group input:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* ========================
   Convert Button
   ======================== */
.convert-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  background: var(--gradient-primary);
  color: white;
  padding: 1rem 2rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-top: 1.5rem;
}

.convert-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.convert-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ========================
   Loading Spinner
   ======================== */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ========================
   Language Selector
   ======================== */
.lang-selector {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lang-btn:hover {
  border-color: var(--color-primary);
}

.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 150px;
  margin-top: 0.5rem;
  display: none;
  z-index: 50;
}

.lang-dropdown.active {
  display: block;
}

.lang-option {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--color-text-primary);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.lang-option:hover {
  background: var(--color-bg-tertiary);
}

/* ========================
   Alert Messages
   ======================== */
.alert {
  padding: 1rem 1.5rem;
  border-radius: var(--radius-lg);
  margin: 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #059669;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #dc2626;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #d97706;
}

[data-theme="dark"] .alert-success {
  color: #34d399;
}

[data-theme="dark"] .alert-error {
  color: #f87171;
}

[data-theme="dark"] .alert-warning {
  color: #fbbf24;
}

/* ========================
   MOBILE RESPONSIVE STYLES
   ======================== */

/* Mobile First - Small Screens (up to 480px) */
@media (max-width: 480px) {

  /* Container */
  .container {
    padding: 0 1rem;
  }

  /* Hero Section */
  .hero-title {
    font-size: 1.75rem !important;
    line-height: 1.3;
  }

  .hero-subtitle {
    font-size: 0.95rem;
    padding: 0 0.5rem;
  }

  /* Navigation */
  .navbar {
    padding: 0.75rem 0;
  }

  .nav-logo span {
    font-size: 1.25rem;
  }

  .nav-links {
    display: none;
  }

  .theme-toggle {
    width: 36px;
    height: 36px;
  }

  /* Upload Area */
  .upload-area {
    padding: 2rem 1rem;
    min-height: 180px;
  }

  .upload-icon svg {
    width: 40px;
    height: 40px;
  }

  .upload-title {
    font-size: 1rem;
  }

  .upload-subtitle,
  .upload-info {
    font-size: 0.8rem;
  }

  /* Upload Container */
  .upload-container {
    padding: 1.5rem;
    margin: 0 0.5rem;
  }

  /* Tool Cards */
  .tools-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }

  .tool-card {
    padding: 1.25rem;
  }

  .tool-icon {
    width: 50px;
    height: 50px;
  }

  .tool-icon svg {
    width: 24px;
    height: 24px;
  }

  .tool-title {
    font-size: 1rem;
  }

  .tool-description {
    font-size: 0.85rem;
  }

  /* Buttons */
  .convert-btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
    width: 100%;
  }

  .download-btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
    width: 100%;
  }

  /* Options Panel */
  .options-panel {
    padding: 1rem;
  }

  .options-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }

  .option-group label {
    font-size: 0.85rem;
  }

  .option-group select,
  .option-group input {
    padding: 0.625rem;
    font-size: 0.9rem;
  }

  /* Section Title */
  .section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }

  /* Footer */
  .footer-content {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
    text-align: center;
  }

  .footer-section h4 {
    font-size: 1rem;
  }

  .footer-links {
    justify-content: center;
  }

  .footer-bottom {
    font-size: 0.8rem;
  }

  /* File List */
  .file-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem;
  }

  .file-name {
    font-size: 0.85rem;
    word-break: break-all;
  }

  .file-size {
    font-size: 0.75rem;
  }

  /* Progress */
  .progress-text {
    font-size: 0.85rem;
  }

  /* Download Section */
  .download-section {
    padding: 1.5rem;
  }

  .download-icon svg {
    width: 40px;
    height: 40px;
  }

  /* Ads */
  .ad-container {
    min-height: 100px !important;
  }

  .ad-container.sidebar {
    display: none;
  }

  .page-sidebar {
    display: none;
  }

  .page-with-sidebar {
    display: block;
  }

  .page-main-content {
    max-width: 100%;
  }

  /* Features Section */
  .features-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Medium Screens - Tablets (481px to 768px) */
@media (min-width: 481px) and (max-width: 768px) {
  .container {
    padding: 0 1.5rem;
  }

  .hero-title {
    font-size: 2rem !important;
  }

  .nav-links {
    display: none;
  }

  .tools-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem;
  }

  .upload-container {
    padding: 2rem;
  }

  .upload-area {
    padding: 2.5rem 1.5rem;
  }

  .options-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 2rem;
  }

  .page-sidebar {
    display: none;
  }

  .page-with-sidebar {
    display: block;
  }
}

/* Large Screens - Laptops (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .tools-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  .footer-content {
    grid-template-columns: repeat(4, 1fr);
  }

  .page-sidebar {
    width: 250px;
  }
}

/* Touch Device Improvements */
@media (hover: none) and (pointer: coarse) {
  .upload-area {
    cursor: pointer;
  }

  .tool-card:active {
    transform: scale(0.98);
  }

  .convert-btn:active,
  .download-btn:active {
    transform: scale(0.98);
  }

  /* Larger touch targets */
  .nav-link {
    padding: 0.75rem 1rem;
  }

  .theme-toggle {
    width: 44px;
    height: 44px;
  }

  .file-remove {
    width: 32px;
    height: 32px;
  }
}

/* Landscape Phone */
@media (max-height: 500px) and (orientation: landscape) {
  .upload-section {
    padding-top: 5rem;
  }

  .upload-area {
    min-height: 150px;
    padding: 1.5rem;
  }

  .hero-title {
    font-size: 1.5rem !important;
    margin-bottom: 0.5rem;
  }

  .hero-subtitle {
    margin-bottom: 1rem;
  }
}

/* Safe Area for Notched Phones */
@supports (padding: env(safe-area-inset-bottom)) {
  .footer {
    padding-bottom: calc(2rem + env(safe-area-inset-bottom));
  }

  .navbar {
    padding-top: env(safe-area-inset-top);
  }
}

/* Print Styles */
@media print {

  .navbar,
  .footer,
  .ad-container,
  .ad-wrapper,
  .theme-toggle {
    display: none !important;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}