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

:root {
  --bg: #f5f7fa;
  --card: #ffffff;
  --foreground: #1a1f2e;
  --muted: #64748b;
  --border: #e2e8f0;
  --primary: #4285f4;
  --primary-fg: #ffffff;
  --primary-light: #e8f0fe;
  --primary-dark: #1a56db;
  --accent: #e8f0fe;
  --accent-fg: #1a56db;
  --success: #22c55e;
  --destructive: #ef4444;
  --radius: 0.75rem;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--foreground);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 960px; margin: 0 auto; padding: 0 1rem; }
.hidden { display: none !important; }

/* ===== Header ===== */

/* ===== Site Header/Footer ===== */
:root {
  --navy: #1e3a5f;
  --navy-dark: #152d4a;
  --blue: #1a73e8;
  --blue-hover: #1557b0;
  --blue-light: #e8f0fe;
  --green: #34a853;
  --orange: #fa7b17;
  --red: #d93025;
  --white: #ffffff;
  --card-bg: #ffffff;
  --text: #202124;
  --muted2: #9aa0a6;
  --shadow: 0 2px 12px rgba(0,0,0,0.10);
  --radius-sm: 8px;
}

/* Site container */
.container {
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

/* HEADER */
.site-header {
  background: var(--navy);
  padding: 15px 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-box {
  width: 36px;
  height: 36px;
  background: #fff;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 6px;
}

.logo-box span {
  border-radius: 2px;
}

.logo-box .b1,
.logo-box .b2,
.logo-box .b3 {
  background: var(--blue);
}

.logo-box .b4 {
  background: var(--green);
}

.logo-text {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
}

.header-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 7px 15px;
  border-radius: 6px;
  transition: all 0.18s;
  white-space: nowrap;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.12);
}

.nav-link.active {
  color: #fff;
  background: rgba(255,255,255,0.2);
}

/* FOOTER */
.site-footer {
  background: var(--navy);
  padding: 28px 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 800;
  color: #fff;
}

.footer-logo-box {
  width: 26px;
  height: 26px;
  background: rgba(255,255,255,0.15);
  border-radius: 6px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 4px;
}

.footer-logo-box span {
  border-radius: 1px;
}

.footer-logo-box .b1,
.footer-logo-box .b2,
.footer-logo-box .b3 {
  background: rgba(255,255,255,0.9);
}

.footer-logo-box .b4 {
  background: var(--green);
}

.footer-nav {
  display: flex;
  gap: 20px;
}

.footer-nav a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  transition: color 0.18s;
}

.footer-nav a:hover {
  color: #fff;
}

.footer-copy {
  margin-left: auto;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
}

/* Responsive */
@media (max-width: 640px) {
  .header-nav {
    display: none;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .footer-copy {
    margin-left: 0;
  }
}

@media (min-width: 768px) {
  .footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .footer-nav {
    margin-left: auto;
    display: flex;
    gap: 25px;
  }

  .footer-copy {
    width: 100%;
    text-align: center;
    margin-top: 15px;
  }
}

/* Hero Section*/
.hero {
  background: linear-gradient(160deg, #1e3a5f 0%, #1a4f8a 55%, #1e5ea8 100%);
  padding: 48px 0 40px;
  text-align: center;
  border-bottom: 4px solid #2563c8;
}

/* Text Inside Section*/
.hero-title {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 800;
  color: #fff;
}

.hero-sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.78);
  font-weight: 600;
}


/* ===== Main ===== */
.main { padding: 2rem 1rem; }

/* ===== Upload Zone ===== */
.upload-zone {
  border: 2px dashed rgba(100,116,139,.3);
  border-radius: 1rem;
  padding: 3rem 1.5rem;
  text-align: center;
  background: var(--card);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.upload-zone:hover,
.upload-zone.dragging {
  border-color: var(--primary);
  background: var(--accent);
}
.upload-icon-circle {
  width: 64px; height: 64px;
  margin: 0 auto 1rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--primary);
}
.upload-title { font-size: 1.25rem; font-weight: 600; }
.upload-hint { font-size: 0.875rem; color: var(--muted); margin-top: 0.25rem; }
.upload-btn { margin-top: 1.25rem; }
.upload-formats { margin-top: 1rem; font-size: 0.75rem; color: var(--muted); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem; font-weight: 600;
  border: none; border-radius: var(--radius);
  cursor: pointer; transition: background .15s, box-shadow .15s;
  font-family: var(--font);
}
.btn-primary {
  background: var(--primary);
  color: var(--primary-fg);
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--foreground);
}
.btn-outline:hover { background: var(--accent); }
.btn-ghost {
  background: transparent;
  color: var(--muted);
}
.btn-ghost:hover { background: var(--accent); color: var(--foreground); }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.75rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ===== Controls Bar ===== */
.controls-bar {
  margin-top: 2rem;
  padding: 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between;
  gap: 1rem;
}
.quality-section { flex: 1; min-width: 200px; }
.quality-label { font-size: 0.875rem; font-weight: 500; margin-bottom: 0.5rem; display: block; }
.quality-hint { font-size: 0.75rem; color: var(--muted); margin-top: 0.25rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* Range slider */
.slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; max-width: 280px; height: 6px;
  background: var(--border); border-radius: 3px;
  outline: none;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px;
  background: var(--primary); border-radius: 50%;
  cursor: pointer; border: 2px solid var(--primary-fg);
  box-shadow: var(--shadow-sm);
}
.slider::-moz-range-thumb {
  width: 18px; height: 18px;
  background: var(--primary); border-radius: 50%;
  cursor: pointer; border: 2px solid var(--primary-fg);
}

/* ===== Stats Banner ===== */
.stats-banner {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--accent);
  border-radius: 0.5rem;
  display: flex; align-items: center; gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--accent-fg);
}
.stats-banner strong { font-weight: 700; }

/* ===== Image Grid ===== */
.image-grid {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

/* ===== Image Card ===== */
.image-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s;
}
.image-card:hover { box-shadow: var(--shadow-md); }

.image-card .preview {
  position: relative;
  aspect-ratio: 16/10;
  background: var(--bg);
  overflow: hidden;
}
.image-card .preview img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.image-card .remove-btn {
  position: absolute; top: 0.5rem; right: 0.5rem;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.5); color: #fff;
  border: none; border-radius: 50%;
  cursor: pointer; transition: background .15s;
}
.image-card .remove-btn:hover { background: var(--destructive); }

.image-card .overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.4);
}
.spinner {
  width: 32px; height: 32px;
  border: 3px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.image-card .info { padding: 0.75rem; }
.image-card .filename {
  font-size: 0.875rem; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.image-card .sizes {
  display: flex; justify-content: space-between;
  font-size: 0.75rem; color: var(--muted);
  margin-top: 0.5rem;
}
.image-card .status-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 0.5rem;
}
.image-card .saved {
  font-size: 0.75rem; font-weight: 600;
  color: var(--success);
  display: flex; align-items: center; gap: 0.25rem;
}
.image-card .error-msg {
  font-size: 0.75rem; color: var(--destructive);
  display: flex; align-items: center; gap: 0.25rem;
  margin-top: 0.5rem;
}

/* ===== Tips Grid ===== */
.tips-grid {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  text-align: center;
}
.tip-card {
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.tip-card h3 { font-size: 0.9375rem; font-weight: 600; }
.tip-card p { font-size: 0.8125rem; color: var(--muted); margin-top: 0.375rem; }


/* ── SEO CONTENT SECTION ───────────────────── */
.seo-section {
  display: flex; flex-direction: column; gap: 20px;
}

.seo-block {
  background: #fff; border-radius: var(--radius);
  border: 1px solid var(--border); padding: 28px 32px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 14px;
}

.seo-h2 {
  font-size: 1.2rem; font-weight: 800; color: var(--navy);
  padding-bottom: 10px; border-bottom: 2px solid var(--blue-light);
  margin-bottom: 2px;
}

.seo-h3 {
  font-size: 1rem; font-weight: 800; color: var(--blue);
  margin-top: 4px; margin-bottom: 2px;
  display: flex; align-items: center; gap: 7px;
}
.seo-h3::before {
  content: ''; display: inline-block;
  width: 4px; height: 16px; background: var(--blue);
  border-radius: 2px; flex-shrink: 0;
}

.seo-block p {
  font-size: 0.95rem; color: #3c4043; line-height: 1.75;
}

.seo-block p strong { color: var(--navy); font-weight: 800; }


/* FAQ */
.section-title { font-size: 1.3rem; font-weight: 800; color: var(--navy); margin-bottom: 16px; text-align: center; }
.faq-list { background: #fff; border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-q {
  width: 100%; background: none; border: none;
  padding: 18px 22px; font-family: var(--font);
  font-size: 0.95rem; font-weight: 700; color: var(--navy);
  cursor: pointer; display: flex; justify-content: space-between;
  align-items: center; gap: 12px; text-align: left; transition: background 0.18s;
}
.faq-q:hover { background: var(--bg); }
.faq-icon { font-size: 1.4rem; color: #1e3a5f; font-weight: 800; flex-shrink: 0; transition: transform 0.22s; line-height: 1; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-a { display: none; padding: 0 22px 18px; font-size: 0.88rem; color: #5f6368;; line-height: 1.6; }
.faq-item.open .faq-a { display: block; }

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.25rem;
  box-shadow: var(--shadow-md);
  min-width: 260px; max-width: 360px;
  z-index: 1000;
  animation: slideIn .3s ease-out;
}
@keyframes slideIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.toast-title { font-size: 0.875rem; font-weight: 600; }
.toast-desc { font-size: 0.75rem; color: var(--muted); margin-top: 0.25rem; }

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .upload-zone { padding: 2rem 1rem; }
  .controls-bar { flex-direction: column; align-items: stretch; }
  .actions { justify-content: stretch; }
  .actions .btn { flex: 1; justify-content: center; }
}


/* ===== TOOLS SECTION ===== */
.tools-section {
  padding: 50px 0;
  background: #f8fafc;
}

.tools-title {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 30px;
}

/* GRID */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* COLUMN */
.tools-col h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
}

.tools-col a {
  display: block;
  font-size: 14px;
  color: #374151;
  text-decoration: none;
  margin-bottom: 6px;
  transition: color 0.2s ease;
}

.tools-col a:hover {
  color: #2f5d8a;
}

/* TABLET */
@media (min-width: 768px) {
  .tools-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* DESKTOP */
@media (min-width: 1024px) {
  .tools-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .tools-section {
    padding: 60px 0;
  }
}



.tips-grid {
  margin-bottom: 40px;
}



