/* ============================================
   Super Narzedzia — Global Stylesheet
   Mobile-first, responsive, dark-mode ready
   ============================================ */

/* --- CSS Reset / Normalize --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  line-height: 1.6;
  color: #1e293b;
  background-color: #f8fafc;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: #2563EB;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #1d4ed8;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.25;
  font-weight: 700;
  color: #0f172a;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
}

/* --- Site Header --- */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: #0f172a;
  font-weight: 800;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.logo:hover {
  color: #2563EB;
}

.logo-icon {
  font-size: 1.75rem;
  line-height: 1;
}

.logo-text {
  letter-spacing: -0.02em;
}

/* --- Main Navigation --- */
.main-nav {
  display: none;
}

.nav-list {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  color: #475569;
  transition: background-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover {
  background-color: #f1f5f9;
  color: #2563EB;
}

.nav-icon {
  font-size: 1.1rem;
}

/* Dropdown menus */
.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  min-width: 220px;
  padding: 0.5rem;
  z-index: 100;
}

.dropdown li a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  color: #475569;
  font-size: 0.9rem;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.dropdown li a:hover {
  background-color: #eff6ff;
  color: #2563EB;
}

.has-dropdown:hover .dropdown,
.has-dropdown.open .dropdown {
  display: block;
}

/* --- Hamburger Button --- */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 4px;
  border-radius: 8px;
  transition: background-color 0.2s ease;
  z-index: 1001;
}

.hamburger:hover {
  background-color: #f1f5f9;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #475569;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Dark Mode Toggle --- */
.dark-mode-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 1.25rem;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

.dark-mode-toggle:hover {
  background-color: #f1f5f9;
}

.icon-moon {
  display: none;
}

body.dark-mode .icon-sun {
  display: none;
}

body.dark-mode .icon-moon {
  display: inline;
}

/* --- Ad Banners --- */
.ad-banner {
  text-align: center;
  padding: 0.5rem 1rem;
  background: #f8fafc;
  transition: background-color 0.3s ease;
}

.ad-banner-top {
  border-bottom: 1px solid #e2e8f0;
}

.ad-placeholder {
  max-width: 728px;
  margin: 0 auto;
  padding: 1rem;
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #94a3b8;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ad-slot {
  padding: 1rem;
  text-align: center;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #94a3b8;
  font-size: 0.8rem;
}

.ad-sidebar {
  margin-bottom: 1.5rem;
}

.ad-in-content {
  margin: 2rem 0;
}

.ad-banner-inline {
  margin: 1.5rem 0;
  padding: 1rem;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  text-align: center;
  color: #94a3b8;
  font-size: 0.8rem;
}

/* --- Site Main --- */
.site-main {
  flex: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem;
}

/* --- Hero Section --- */
.hero {
  text-align: center;
  padding: 2rem 1rem 3rem;
}

.hero-content {
  max-width: 700px;
  margin: 0 auto;
}

.hero-title {
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: #64748b;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero-search {
  position: relative;
  max-width: 500px;
  margin: 0 auto 2rem;
}

.hero-search-input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1rem;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hero-search-input:focus {
  outline: none;
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.hero-search-input::placeholder {
  color: #94a3b8;
}

.hero-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: #94a3b8;
  pointer-events: none;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: #2563EB;
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: #64748b;
}

/* --- Tools Container & Sections --- */
.tools-container {
  padding: 0 0 3rem;
}

.category-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2rem;
  padding: 0 1rem;
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  border: 2px solid #e2e8f0;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #475569;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: #2563EB;
  color: #2563EB;
}

.filter-btn.active {
  background: #2563EB;
  border-color: #2563EB;
  color: #ffffff;
}

.tools-section {
  margin-bottom: 2.5rem;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e2e8f0;
}

.section-icon {
  font-size: 1.5rem;
}

/* --- Tools Grid --- */
.tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

/* --- Tool Card --- */
.tool-card {
  display: block;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
  overflow: hidden;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  border-color: #2563EB;
  color: inherit;
}

.tool-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #2563EB, #7C3AED);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.tool-card:hover::after {
  transform: scaleX(1);
}

.tool-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: block;
  line-height: 1.2;
}

.tool-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.35rem;
}

.tool-desc {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
}

/* --- Tool Page Layout --- */
.tool-page {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 1rem 0 3rem;
}

.tool-container {
  flex: 1;
  min-width: 0;
}

.tool-header {
  margin-bottom: 1.5rem;
}

.tool-header h1 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.tool-header p {
  color: #64748b;
  font-size: 1rem;
}

.tool-workspace {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.5rem;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* --- Upload Zone --- */
.upload-zone {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  background: #fafbfc;
}

.upload-zone:hover {
  border-color: #2563EB;
  background: #eff6ff;
}

.upload-zone.drag-over {
  border-color: #2563EB;
  background: #dbeafe;
  border-style: solid;
}

.upload-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
  color: #94a3b8;
}

.upload-zone p {
  color: #64748b;
  margin-bottom: 0.5rem;
}

.upload-link {
  color: #2563EB;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.upload-link:hover {
  color: #1d4ed8;
}

.upload-hint {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 0.5rem;
  margin-bottom: 0;
}

/* --- File List --- */
.file-list {
  margin-top: 1.5rem;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  transition: background-color 0.2s ease;
}

.file-item:hover {
  background: #f1f5f9;
}

.file-item .file-name {
  flex: 1;
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-item .file-size {
  color: #94a3b8;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.file-item .file-remove {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ef4444;
  font-size: 1.1rem;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

.file-item .file-remove:hover {
  background-color: #fef2f2;
}

.file-item .file-thumbnail {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

/* --- Tool Options (Form Controls) --- */
.tool-options {
  margin: 1.5rem 0;
}

.tool-options label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: #334155;
  margin-bottom: 0.5rem;
}

.tool-options input[type="text"],
.tool-options input[type="number"],
.tool-options input[type="email"],
.tool-options input[type="url"],
.tool-options select,
.tool-options textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 1rem;
}

.tool-options input:focus,
.tool-options select:focus,
.tool-options textarea:focus {
  outline: none;
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.tool-options textarea {
  min-height: 120px;
  resize: vertical;
}

.tool-options select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* Range slider */
.tool-options input[type="range"] {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: #e2e8f0;
  border-radius: 3px;
  outline: none;
  margin-bottom: 1rem;
}

.tool-options input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2563EB;
  cursor: pointer;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.tool-options input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2563EB;
  cursor: pointer;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Radio & checkbox */
.tool-options .radio-group,
.tool-options .checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.tool-options .radio-group label,
.tool-options .checkbox-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  margin-bottom: 0;
}

.tool-options .radio-group label:hover,
.tool-options .checkbox-group label:hover {
  border-color: #2563EB;
  background: #eff6ff;
}

.tool-options .radio-group input:checked + span,
.tool-options .checkbox-group input:checked + span {
  color: #2563EB;
  font-weight: 600;
}

.tool-options .radio-group label:has(input:checked),
.tool-options .checkbox-group label:has(input:checked) {
  border-color: #2563EB;
  background: #eff6ff;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  line-height: 1.4;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: #2563EB;
  color: #ffffff;
}

.btn-primary:hover {
  background: #1d4ed8;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.btn-success {
  background: #10B981;
  color: #ffffff;
}

.btn-success:hover {
  background: #059669;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.btn-lg {
  padding: 0.875rem 2rem;
  font-size: 1.05rem;
  border-radius: 10px;
}

.btn-loading {
  pointer-events: none;
  opacity: 0.7;
  position: relative;
}

.btn-loading::after {
  content: '';
  width: 18px;
  height: 18px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-left: 0.5rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Result Area --- */
.result-area {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  transition: background-color 0.3s ease;
}

.result-success {
  border-color: #10B981;
  background: #ecfdf5;
}

.result-success .result-icon {
  color: #10B981;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

/* --- Preview Area --- */
.preview-area {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  margin: 1.5rem 0;
}

.preview-before,
.preview-after {
  flex: 1;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.preview-before img,
.preview-after img {
  max-height: 250px;
  border-radius: 8px;
}

.preview-arrow {
  font-size: 1.5rem;
  color: #94a3b8;
  transform: rotate(90deg);
}

.preview-info {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.5rem;
}

.preview-placeholder {
  color: #94a3b8;
  font-size: 0.9rem;
}

/* --- Sidebar Navigation --- */
.sidebar-nav {
  width: 100%;
}

.sidebar-section {
  margin-bottom: 1.5rem;
}

.sidebar-heading {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-bottom: 0.75rem;
}

.sidebar-list li a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  color: #475569;
  font-size: 0.9rem;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-list li a:hover,
.sidebar-list li a.active {
  background: #eff6ff;
  color: #2563EB;
}

/* --- Footer --- */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 3rem 1rem 1.5rem;
  margin-top: auto;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col {
  min-width: 0;
}

.footer-heading {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-desc {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #94a3b8;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #94a3b8;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: #64748b;
}

/* --- Interstitial Overlay --- */
.interstitial-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.interstitial-overlay.active {
  display: flex;
}

.interstitial-content {
  background: #ffffff;
  border-radius: 20px;
  padding: 2.5rem 2rem;
  max-width: 500px;
  width: 100%;
  text-align: center;
  position: relative;
  animation: slideUp 0.3s ease;
}

.interstitial-ad {
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  color: #94a3b8;
  font-size: 0.8rem;
}

.interstitial-timer {
  margin-bottom: 1.5rem;
}

.countdown-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #eff6ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: #2563EB;
}

.interstitial-hint {
  font-size: 0.9rem;
  color: #64748b;
  margin-bottom: 1rem;
}

.interstitial-download-btn {
  display: none;
}

.interstitial-download-btn.visible {
  display: inline-flex;
}

.interstitial-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #94a3b8;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.interstitial-close.visible {
  display: flex;
}

.interstitial-close:hover {
  background: #f1f5f9;
  color: #475569;
}

/* --- Popup Overlay --- */
.popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9998;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.popup-overlay.active {
  display: flex;
}

.popup-modal {
  background: #ffffff;
  border-radius: 20px;
  padding: 2.5rem 2rem;
  max-width: 480px;
  width: 100%;
  text-align: center;
  position: relative;
  animation: slideUp 0.3s ease;
}

.popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #94a3b8;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.popup-close:hover {
  background: #f1f5f9;
  color: #475569;
}

.popup-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.popup-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.75rem;
}

.popup-text {
  color: #64748b;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.popup-features {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.popup-feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #334155;
}

.popup-feature::before {
  content: '\2714';
  color: #10B981;
  font-weight: bold;
}

.popup-cta {
  margin-bottom: 1rem;
}

.popup-remember {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #94a3b8;
}

/* --- Text Tool Container (text/dev tools) --- */
.text-tool-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.text-input-area,
.text-output-area {
  width: 100%;
}

.text-input-area textarea,
.text-output-area textarea {
  width: 100%;
  min-height: 200px;
  padding: 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  font-size: 0.9rem;
  resize: vertical;
  transition: border-color 0.2s ease;
}

.text-input-area textarea:focus,
.text-output-area textarea:focus {
  outline: none;
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.text-output-area textarea {
  background: #f8fafc;
}

/* --- Calculator Form & Result --- */
.calculator-form {
  max-width: 500px;
}

.calculator-form .form-group {
  margin-bottom: 1.25rem;
}

.calculator-form .form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: #334155;
  margin-bottom: 0.4rem;
}

.calculator-form .form-group input,
.calculator-form .form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.calculator-form .form-group input:focus,
.calculator-form .form-group select:focus {
  outline: none;
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.calculator-result {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #eff6ff, #f0fdf4);
  border-radius: 12px;
  text-align: center;
}

.calculator-result .result-value {
  font-size: 2rem;
  font-weight: 800;
  color: #2563EB;
}

.calculator-result .result-label {
  font-size: 0.9rem;
  color: #64748b;
  margin-top: 0.25rem;
}

/* --- Color / Gradient Previews --- */
.color-preview {
  width: 100%;
  height: 120px;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  margin-bottom: 1rem;
  transition: border-color 0.2s ease;
}

.gradient-preview {
  width: 100%;
  height: 160px;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  margin-bottom: 1rem;
}

/* --- Progress Bar --- */
.progress-bar {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin: 1rem 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563EB, #7C3AED);
  border-radius: 4px;
  width: 0%;
  transition: width 0.3s ease;
}

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Utility Classes --- */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.mt-1 {
  margin-top: 0.5rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mb-1 {
  margin-bottom: 0.5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

/* ============================================
   DARK MODE
   ============================================ */
body.dark-mode {
  background-color: #0f172a;
  color: #e2e8f0;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
  color: #f1f5f9;
}

body.dark-mode .site-header {
  background: #1e293b;
  border-bottom-color: #334155;
}

body.dark-mode .logo {
  color: #f1f5f9;
}

body.dark-mode .nav-link {
  color: #94a3b8;
}

body.dark-mode .nav-link:hover {
  background-color: #334155;
  color: #60a5fa;
}

body.dark-mode .dropdown {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

body.dark-mode .dropdown li a {
  color: #94a3b8;
}

body.dark-mode .dropdown li a:hover {
  background-color: #334155;
  color: #60a5fa;
}

body.dark-mode .hamburger span {
  background-color: #94a3b8;
}

body.dark-mode .dark-mode-toggle:hover {
  background-color: #334155;
}

body.dark-mode .ad-banner {
  background: #1e293b;
}

body.dark-mode .ad-banner-top {
  border-bottom-color: #334155;
}

body.dark-mode .ad-placeholder,
body.dark-mode .ad-slot,
body.dark-mode .ad-banner-inline {
  background: #0f172a;
  border-color: #334155;
  color: #475569;
}

body.dark-mode .hero-title {
  color: #f1f5f9;
}

body.dark-mode .hero-subtitle {
  color: #94a3b8;
}

body.dark-mode .hero-search-input {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-mode .hero-search-input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

body.dark-mode .filter-btn {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

body.dark-mode .filter-btn:hover {
  border-color: #60a5fa;
  color: #60a5fa;
}

body.dark-mode .filter-btn.active {
  background: #2563EB;
  border-color: #2563EB;
  color: #ffffff;
}

body.dark-mode .section-title {
  color: #f1f5f9;
  border-bottom-color: #334155;
}

body.dark-mode .tool-card {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .tool-card:hover {
  border-color: #60a5fa;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

body.dark-mode .tool-name {
  color: #f1f5f9;
}

body.dark-mode .tool-desc {
  color: #94a3b8;
}

body.dark-mode .tool-workspace {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .upload-zone {
  background: #0f172a;
  border-color: #334155;
}

body.dark-mode .upload-zone:hover {
  border-color: #60a5fa;
  background: #1e293b;
}

body.dark-mode .upload-zone.drag-over {
  border-color: #60a5fa;
  background: #1e3a5f;
}

body.dark-mode .file-item {
  background: #0f172a;
  border-color: #334155;
}

body.dark-mode .tool-options input[type="text"],
body.dark-mode .tool-options input[type="number"],
body.dark-mode .tool-options input[type="email"],
body.dark-mode .tool-options input[type="url"],
body.dark-mode .tool-options select,
body.dark-mode .tool-options textarea {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-mode .tool-options input:focus,
body.dark-mode .tool-options select:focus,
body.dark-mode .tool-options textarea:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.15);
}

body.dark-mode .tool-options input[type="range"] {
  background: #334155;
}

body.dark-mode .tool-options .radio-group label,
body.dark-mode .tool-options .checkbox-group label {
  border-color: #334155;
  color: #94a3b8;
}

body.dark-mode .tool-options .radio-group label:hover,
body.dark-mode .tool-options .checkbox-group label:hover {
  border-color: #60a5fa;
  background: #1e3a5f;
}

body.dark-mode .tool-options label {
  color: #cbd5e1;
}

body.dark-mode .result-area {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .result-success {
  background: #064e3b;
  border-color: #10B981;
}

body.dark-mode .preview-before,
body.dark-mode .preview-after {
  background: #0f172a;
  border-color: #334155;
}

body.dark-mode .sidebar-list li a {
  color: #94a3b8;
}

body.dark-mode .sidebar-list li a:hover,
body.dark-mode .sidebar-list li a.active {
  background: #334155;
  color: #60a5fa;
}

body.dark-mode .text-input-area textarea,
body.dark-mode .text-output-area textarea {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-mode .text-output-area textarea {
  background: #1e293b;
}

body.dark-mode .calculator-form .form-group input,
body.dark-mode .calculator-form .form-group select {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-mode .calculator-result {
  background: linear-gradient(135deg, #1e293b, #0f2922);
}

body.dark-mode .calculator-result .result-value {
  color: #60a5fa;
}

body.dark-mode .color-preview,
body.dark-mode .gradient-preview {
  border-color: #334155;
}

body.dark-mode .progress-bar {
  background: #334155;
}

body.dark-mode .interstitial-content,
body.dark-mode .popup-modal {
  background: #1e293b;
}

body.dark-mode .interstitial-ad {
  background: #0f172a;
  border-color: #334155;
}

body.dark-mode .countdown-circle {
  background: #334155;
  color: #60a5fa;
}

body.dark-mode .interstitial-hint {
  color: #94a3b8;
}

body.dark-mode .popup-title {
  color: #f1f5f9;
}

body.dark-mode .popup-text {
  color: #94a3b8;
}

body.dark-mode .popup-feature {
  color: #cbd5e1;
}

body.dark-mode .popup-remember {
  color: #64748b;
}

body.dark-mode .site-footer {
  background: #020617;
}

body.dark-mode .footer-bottom {
  border-top-color: #1e293b;
}

/* ============================================
   RESPONSIVE — 480px
   ============================================ */
@media (min-width: 480px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-title {
    font-size: 2.25rem;
  }

  .preview-area {
    flex-direction: row;
  }

  .preview-arrow {
    transform: rotate(0);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================
   RESPONSIVE — 768px (Tablet)
   ============================================ */
@media (min-width: 768px) {
  .header-container {
    padding: 0 1.5rem;
  }

  .main-nav {
    display: block;
  }

  .hamburger {
    display: none;
  }

  .site-main {
    padding: 1.5rem;
  }

  .hero {
    padding: 3rem 1.5rem 4rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.2rem;
  }

  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .tool-page {
    flex-direction: row;
  }

  .tool-container {
    flex: 1;
  }

  .sidebar-nav {
    width: 240px;
    flex-shrink: 0;
  }

  .text-tool-container {
    flex-direction: row;
  }

  .text-input-area,
  .text-output-area {
    flex: 1;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .site-footer {
    padding: 3rem 1.5rem 1.5rem;
  }
}

/* ============================================
   RESPONSIVE — 1024px (Desktop)
   ============================================ */
@media (min-width: 1024px) {
  .header-container {
    padding: 0 2rem;
  }

  .site-main {
    padding: 2rem;
  }

  .hero {
    padding: 4rem 2rem 5rem;
  }

  .hero-title {
    font-size: 2.75rem;
  }

  .tools-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  .tool-workspace {
    padding: 2rem;
  }

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

/* ============================================
   RESPONSIVE — 1280px (Large Desktop)
   ============================================ */
@media (min-width: 1280px) {
  .tools-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .hero-title {
    font-size: 3rem;
  }

  .tool-card {
    padding: 1.75rem;
  }
}

/* --- Mobile Menu Overlay --- */
@media (max-width: 767px) {
  .main-nav {
    display: none;
    position: fixed;
    inset: 0;
    top: 64px;
    background: #ffffff;
    z-index: 999;
    padding: 1rem;
    overflow-y: auto;
    animation: fadeIn 0.2s ease;
    transition: background-color 0.3s ease;
  }

  .main-nav.active {
    display: block;
  }

  body.dark-mode .main-nav {
    background: #1e293b;
  }

  .nav-list {
    flex-direction: column;
    gap: 0;
  }

  .nav-link {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border-radius: 10px;
  }

  .dropdown {
    position: static;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0 0 0 1rem;
  }

  body.dark-mode .dropdown {
    background: transparent;
    box-shadow: none;
    border: none;
  }

  .has-dropdown .dropdown {
    display: none;
  }

  .has-dropdown.open .dropdown {
    display: block;
  }
}

/* --- Print styles --- */
@media print {
  .site-header,
  .ad-banner,
  .site-footer,
  .hamburger,
  .dark-mode-toggle,
  .interstitial-overlay,
  .popup-overlay {
    display: none !important;
  }

  body {
    background: #ffffff;
    color: #000000;
  }

  .tool-card {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }
}
