:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #0f172a;
  --bg: #f8fafc;
  --white: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --success: #16a34a;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--secondary);
}

.logo span {
  color: var(--primary);
}

.nav {
  display: flex;
  gap: 22px;
}

.nav a {
  color: var(--text);
  font-weight: 600;
  transition: 0.3s ease;
}

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

.menu-btn {
  display: none;
  border: none;
  background: var(--white);
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.hero {
  padding: 80px 0 50px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 35%),
    radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.12), transparent 30%);
}

.hero-content {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: center;
}

.badge {
  display: inline-block;
  padding: 8px 14px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--primary);
  border-radius: 999px;
  font-weight: 700;
  margin-bottom: 14px;
}

.hero-text h1 {
  font-size: 3rem;
  line-height: 1.1;
  margin-bottom: 15px;
}

.hero-text p {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 550px;
  margin-bottom: 24px;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  padding: 13px 20px;
  border-radius: 12px;
  font-weight: 700;
  transition: 0.3s ease;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--white);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.hero-card {
  display: grid;
  gap: 16px;
}

.mini-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.mini-card h3 {
  margin-bottom: 6px;
}

.mini-card p {
  color: var(--muted);
}

.section-title {
  text-align: center;
  margin-bottom: 34px;
}

.section-title h2 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.section-title p {
  color: var(--muted);
}

.tool-section,
.features-section,
.how-section,
.faq-section {
  padding: 70px 0;
}

.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.upload-card,
.preview-card,
.feature-card,
.how-card,
.faq-item {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.upload-card,
.preview-card {
  padding: 24px;
}

.upload-box {
  border: 2px dashed #93c5fd;
  border-radius: 18px;
  padding: 36px 20px;
  display: block;
  text-align: center;
  background: #eff6ff;
  cursor: pointer;
  transition: 0.3s ease;
}

.upload-box.dragover {
  background: #dbeafe;
  border-color: var(--primary);
  transform: scale(1.01);
}

.upload-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.upload-inner h3 {
  margin-bottom: 6px;
}

.upload-inner p,
.upload-note {
  color: var(--muted);
}

.upload-note {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.95rem;
}
.size-display{
display:flex;
justify-content:space-between;
align-items:center;
font-weight:600;
margin-bottom:10px;
font-size:15px;
}

.size-display span{
color:#333;
}

.arrow{
margin:0 10px;
}

.controls {
  margin-top: 22px;
}

.quality-wrap {
  margin-bottom: 18px;
}

.quality-wrap label {
  display: block;
  font-weight: 700;
  margin-bottom: 10px;
}

.quality-wrap input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}

.action-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.preview-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.preview-box h3 {
  margin-bottom: 10px;
}

.image-frame {
  height: 240px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
}

.placeholder-text {
  color: var(--muted);
  padding: 16px;
  text-align: center;
}

.file-info {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.results {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.result-item {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 15px;
  text-align: center;
}

.result-item span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 6px;
}

.download-btn {
  width: 100%;
  margin-top: 18px;
}

.disabled {
  pointer-events: none;
  opacity: 0.55;
}

.features-grid,
.how-grid {
  display: grid;
  gap: 20px;
}

.features-grid {
  grid-template-columns: repeat(4, 1fr);
}

.how-grid {
  grid-template-columns: repeat(3, 1fr);
}

.feature-card,
.how-card {
  padding: 24px;
  transition: 0.3s ease;
}

.feature-card:hover,
.how-card:hover {
  transform: translateY(-5px);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.how-card span {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  margin-bottom: 14px;
}

.faq-list {
  display: grid;
  gap: 16px;
}

.faq-item {
  overflow: hidden;
}

.faq-question {
  width: 100%;
  background: var(--white);
  border: none;
  padding: 20px;
  font-weight: 700;
  font-size: 1rem;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer p {
  padding: 0 20px 20px;
  color: var(--muted);
}

.faq-item.active .faq-answer {
  max-height: 200px;
}

.faq-item.active .faq-question span {
  transform: rotate(45deg);
}

.footer {
  background: #0f172a;
  color: var(--white);
  margin-top: 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 24px;
  padding: 50px 0 30px;
}

.footer h3,
.footer h4 {
  margin-bottom: 12px;
}

.footer p,
.footer a {
  color: #cbd5e1;
}

.footer a {
  display: block;
  margin-bottom: 8px;
}

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

.footer-bottom {
  border-top: 1px solid rgba(203, 213, 225, 0.15);
  text-align: center;
  padding: 18px 0;
}

.toast {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #dcfce7;
  color: #166534;
  font-weight: 700;
  display: none;
}

.toast.show {
  display: block;
}

@media (max-width: 992px) {
  .hero-content,
  .tool-grid,
  .features-grid,
  .how-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .preview-columns {
    grid-template-columns: 1fr;
  }

  .hero-text h1 {
    font-size: 2.4rem;
  }
}

@media (max-width: 768px) {
  .nav {
    position: absolute;
    top: 76px;
    right: 4%;
    background: var(--white);
    flex-direction: column;
    padding: 16px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display: none;
    min-width: 200px;
  }

  .nav.show {
    display: flex;
  }

  .menu-btn {
    display: block;
  }

  .results {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 55px;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .section-title h2 {
    font-size: 1.7rem;
  }
}