:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary-color: #10b981;
  --danger-color: #ef4444;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --bg-primary: #111827;
  --bg-secondary: #1f2937;
  --bg-tertiary: #374151;
  --border-color: #374151;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  /* line-height: 1.6; */
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.breadcrumb a {
  font-size: 1rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.upload-container{
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 10px;
}

.brand-logo {
  font-family: 'Inter', sans-serif;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.5px;
  text-decoration: none;
  color: #2D3436;   /* Light mode exact color */
  transition: opacity 0.2s ease;
}

.brand-logo:hover {
  opacity: 0.85;
}

.brand-logo span {
  color: #FF6600;
  font-weight: 800;
}

/* Dark Mode Support */
[data-theme="dark"] .brand-logo {
  color: #ffffff;
}

header {
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-content {
  display: flex;
  justify-content: space-between; /* This pushes logo left and buttons right */
  align-items: center;
  padding: 1rem 0;
  width: 100%;
}


.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-primary);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

nav a {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  transition: color 0.3s ease;
}

nav a:hover {
  color: var(--primary-color);
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background-color: var(--bg-secondary);
}

.hero {
  text-align: center;
  padding: 1rem 0;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  line-height: 1;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 2rem;
}


.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  padding: 2rem 0;
}

.tool-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.tool-card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}

.tool-card h3 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.tool-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.section {
  padding: 1rem 0;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 1rem;
  text-align: center;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.tool-container {
  
  background-color: var(--bg-secondary);
  border-radius: 10px;
  padding: 0.5rem;
  margin: 1rem 0;
  box-shadow: var(--shadow-md);
}

.upload-area {
  border: 3px dashed var(--border-color);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: var(--bg-primary);
}

.upload-area:hover {
  border-color: var(--primary-color);
  background-color: var(--bg-secondary);
}

.upload-area.dragover {
  border-color: var(--primary-color);
  background-color: var(--bg-secondary);
}

.upload-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.file-input {
  display: none;
}

.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: white;
}

.btn-danger {
  background-color: var(--danger-color);
  color: white;
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.controls {
  margin: 1.5rem 0;
  display: grid;
  gap: 1rem;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.control-group label {
  font-weight: 600;
  color: var(--text-primary);
}

.control-group input,
.control-group select {
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

.control-group input[type="range"] {
  padding: 0;
}

.range-value {
  font-weight: 700;
  color: var(--primary-color);
}

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

.preview-box {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  background-color: var(--bg-primary);
}

.preview-box h3 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.preview-box img {
  max-width: 100%;
  border-radius: 8px;
  margin-bottom: 0.7rem;
}

.file-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.progress-bar {
  width: 100%;
  height: 8px;
  background-color: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
  margin: 1rem 0;
}

.progress-fill {
  height: 100%;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
  width: 0%;
}

.content {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 0;
}

.content h2 {
  margin: 2rem 0 1rem;
  color: var(--text-primary);
}

.content h3 {
  margin: 1.5rem 0 0.75rem;
  color: var(--text-primary);
}

.content p {
  margin-bottom: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.content ul,
.content ol {
  margin: 1rem 0 1rem 2rem;
  color: var(--text-secondary);
}

.content li {
  margin-bottom: 0.5rem;
}

.faq-section {
  margin: 3rem 0;
}

.faq-item {
  background-color: var(--bg-secondary);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.faq-item h3 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.faq-item p {
  margin: 0;
  color: var(--text-secondary);
}

.related-tools {
  background-color: var(--bg-secondary);
  padding: 2rem;
  border-radius: 12px;
  margin: 2rem 0;
}

.related-tools h3 {
  margin-bottom: 1rem;
}

.related-tools-list {
  display: grid;
  gap: 0.75rem;
}

.related-tool-link {
  display: block;
  padding: 1rem;
  background-color: var(--bg-primary);
  border-radius: 8px;
  text-decoration: none;
  color: var(--primary-color);
  font-weight: 600;
  transition: all 0.3s ease;
}

.related-tool-link:hover {
  background-color: var(--primary-color);
  color: white;
}

.cta-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  color: white;
  text-align: center;
  padding: 3rem 2rem;
  border-radius: 12px;
  margin: 3rem 0;
}

.cta-section h2 {
  color: white;
  margin-bottom: 1rem;
}

.cta-section p {
  margin-bottom: 2rem;
  font-size: 1.1rem;
  opacity: 0.9;
}

.newsletter-form {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
  gap: 1rem;
}

.newsletter-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
}

.newsletter-form button {
  background-color: var(--bg-primary);
  color: var(--primary-color);
  font-weight: 700;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

.blog-card {
  background-color: var(--bg-secondary);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.blog-card-content {
  padding: 1.5rem;
}

.blog-card h3 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.blog-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.blog-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 1rem;
}

.breadcrumb {
  padding: 1rem 0;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--primary-color);
  text-decoration: none;
}

.breadcrumb span {
  color: var(--text-secondary);
  margin: 0 0.5rem;
}

.ad-placeholder {
  background-color: var(--bg-tertiary);
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  margin: 2rem 0;
  color: var(--text-secondary);
}

footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  margin-top: 4rem;
  padding: 3rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.footer-section ul {
  list-style: none;
}

.footer-section a {
  color: var(--text-secondary);
  text-decoration: none;
  display: block;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.batch-list {
  margin: 2rem 0;
}

.batch-item {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.batch-item-info {
  flex: 1;
}

.batch-item-name {
  font-weight: 600;
  color: var(--text-primary);
}

.batch-item-size {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.batch-item-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-small {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

.hidden {
  display: none;
}

/* --- Desktop Setup for Buttons --- */
.mobile-theme {
  display: none;
}

/* --- Unified Mobile Media Query (768px and below) --- */
/* --- Unified Mobile Media Query (768px and below) --- */
@media (max-width: 768px) {
  .header-content {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 15px;
  }

  .mobile-theme {
    display: inline-block;
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    color: var(--text-primary);
    margin-left: auto;
  }

  .nav-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
  }

  nav ul {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-primary);
    flex-direction: column;
    padding: 1rem;
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 1001;
  }

  nav ul.active {
    display: flex;
  }

  nav ul li:last-child {
    display: none;
  }

  /* Typography & Layout Adjustments - SHRUNKEN */
  .hero h1 {
    font-size: 1rem; /* Smaller heading */
    margin-bottom: 0.5rem;
  }

  .hero p {
    font-size: 0.85rem; /* Readable but small */
    margin-bottom: 0.8rem;
    line-height: 1.4;
  }

  .tools-grid, .preview-section, .footer-content {
    grid-template-columns: 1fr;
  }

  .newsletter-form {
    flex-direction: column;
  }

 .upload-area {
  /* Override any desktop width constraints */
  max-width: 90% !important; 
  width: auto !important;
  margin: 10px auto !important;

  /* Force height reduction */
  min-height: 80px !important; 
  padding: 10px 15px !important;
 
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
}

.upload-container {
  max-width: 90%;
  padding: 0 10px !important; /* Reduced horizontal padding */
}

.tool-container {
    padding: 0.5rem !important; /* Reduced padding */
  }

  .upload-icon {
    font-size: 1.2rem !important; /* Smaller icon */
    margin-bottom: 0.5rem;
  }

  .upload-area h2 {
    font-size: 1rem !important;
  }

  .upload-area h3 {
    font-size: 1rem !important;
  }

  .upload-area p {
    font-size: 0.7rem !important;
  }

  .content h2 {
    font-size: 1rem !important;
  }

  .content h3 {
    font-size: 1rem !important;
  }

  .content p {
    font-size: 0.8rem !important;
  }

  .section h1{
    font-size: 1.3rem !important;
  }
  
  .section-title{
    font-size: 1.2rem !important;
    margin-bottom: 0.5rem;
  }
  
  .section-subtitle {
    font-size: 0.9rem !important;
    margin-bottom: 0;
  }
}

/* --- Extra Small Screens (480px) --- */
@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  /* Fixed: Reduced from 2rem to 0.5rem to prevent giant gaps on tiny phones */
  .hero, .section {
    padding: 0.75rem 0 !important;
  }

  .tool-container {
    padding: 1rem; /* Shrunk from 1.5rem */
  }

  .brand-logo {
    font-size: 20px;
  }
  
  /* Shrink hero text even more for very small screens */
  .hero h1 {
    font-size: 1.2rem !important;
  }
}