/* =========================
   GLOBAL
========================= */
* {
  box-sizing: border-box;
  font-family: 'Inter', system-ui, sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at top, #1e293b, #020617);
  color: #e5e7eb;
}

/* =========================
   HEADER
========================= */
.site-header {
  padding: 80px 20px 50px;
  text-align: center;
}

.site-header .logo {
  font-size: 42px;
  margin: 0;
  background: linear-gradient(90deg, #38bdf8, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-header .tagline {
  margin-top: 10px;
  font-size: 15px;
  color: #cbd5f5;
}


/* =========================
   HOMEPAGE
========================= */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px 80px;
  flex: 1;
}

.hero {
  padding: 90px 20px 60px;
  text-align: center;
}

.hero h1 {
  font-size: 44px;
  margin: 0;
  background: linear-gradient(90deg, #38bdf8, #a78bfa);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.hero p {
  margin-top: 12px;
  color: #cbd5f5;
}

/* Tools grid */
.tools {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* Responsive tools grid for mobile */
@media (max-width: 768px) {
  .tools {
    grid-template-columns: 1fr;  /* 1 card per row */
    gap: 20px;                    /* smaller gap */
  }
}

@media (max-width: 480px) {
  .tools {
    gap: 16px;
  }

  .tool-card {
    padding: 20px; /* smaller padding inside cards */
  }
}


/* Tool cards */
.tool-card {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(14px);
  border-radius: 16px;
  padding: 28px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 20px 40px rgba(0,0,0,0.35);
  text-decoration: none;
  color: #e5e7eb;
  transition: 0.3s;
}

.tool-card:hover {
  transform: translateY(-6px);
}

.tool-card h2 {
  color: #7dd3fc;
}

.coming-soon {
  opacity: 0.45;
  cursor: not-allowed;
}


/* =========================
   TOOL PAGE LAYOUT
========================= */
.tool-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 16px 70px;
}

.tool-wrapper {
  width: 100%;
}

/* =========================
   CARD
========================= */
.compress-card {
  max-width: 440px;
  margin: auto;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(14px);
  border-radius: 18px;
  padding: 32px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 20px 40px rgba(0,0,0,0.35);
  text-align: center;
}

.compress-card h2 {
  margin-top: 0;
}

.subtext {
  font-size: 14px;
  color: #cbd5e1;
  margin-bottom: 18px;
}

/* =========================
   DRAG & DROP
========================= */
.drop-zone {
  min-height: 140px;
  border: 2px dashed rgba(255,255,255,0.25);
  border-radius: 14px;
  padding: 26px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.3s;
  text-align: center;
  line-height: 1.5;
}

.drop-zone span {
  color: #7dd3fc;
  font-size: 14px;
}

.drop-zone em {
  color: #cbd5e1;
  font-style: normal;
}

.drop-zone.active {
  border-color: #a78bfa;
  background: rgba(167,139,250,0.08);
}

/* =========================
   PREVIEW
========================= */
.preview {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 22px 0 10px;
}

.preview img {
  width: 100%;
  max-height: 170px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  padding: 6px;
}

.preview p {
  margin: 0 0 6px;
  font-size: 13px;
  color: #cbd5e1;
  text-align: center;
}

/* =========================
   BUTTONS
========================= */
button,
.primary-btn {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: none;
  margin-top: 20px;
  background: linear-gradient(135deg, #38bdf8, #a78bfa);
  font-weight: 600;
  cursor: pointer;
  color: #020617;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.primary-btn {
  display: inline-block;
  text-align: center;
  text-decoration: none;
}

/* =========================
   FOOTER
========================= */
.site-footer {
  text-align: center;
  padding: 22px 14px;
  font-size: 13px;
  color: #94a3b8;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.site-footer a {
  color: #7dd3fc;
  text-decoration: none;
  margin: 0 6px;
}

.site-footer a:hover {
  color: #a78bfa;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 600px) {
  .site-header .logo {
    font-size: 32px;
  }

  .compress-card {
    padding: 24px;
  }

  .drop-zone {
    min-height: 120px;
  }

  .preview {
    grid-template-columns: 1fr;
  }
}

/* =========================
   UPLOADED IMAGE PREVIEW
========================= */
.uploaded-preview {
  display: none;
  margin-top: 18px;
}

.uploaded-preview img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

/* =========================
   FORMAT SELECT DROPDOWN
========================= */
.format-select {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 16px;
  text-align: left;
}

.format-select label {
  font-size: 14px;
  color: #cbd5e1;
  margin-bottom: 6px;
  width: 100%;
  text-align: left;
}

.format-select select {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.05);
  color: #e5e7eb;
  font-size: 14px;
  outline: none;
  cursor: pointer;
  transition: all 0.3s;
}

.format-select select:hover {
  border-color: #a78bfa;
  background: rgba(167,139,250,0.08);
}

.format-select select:focus {
  border-color: #38bdf8;
  background: rgba(56,189,248,0.08);
}

/* Style the options inside the select */
/* =========================
   SELECT OPTIONS
========================= */
#outputFormat option {
  color: #e5e7eb;             /* light text */
  background-color: #1e293b;  /* dark card-like background */
  font-size: 14px;
}

/* Highlight selected option (works in most browsers) */
#outputFormat option:checked {
  background-color: #38bdf8;  /* bright accent */
  color: #020617;             /* dark text on bright bg */
}

/* PDF file list */
#fileList {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  color: #e5e7eb;
}

#fileList li {
  background: rgba(255,255,255,0.06);
  padding: 8px 12px;
  margin-bottom: 6px;
  border-radius: 8px;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: grab;
  transition: background 0.2s;
}

#fileList li.dragging {
  background: rgba(56, 189, 248, 0.2); /* highlight dragged item */
  opacity: 0.7;
}

#fileList li .remove {
  flex-shrink: 0;
  cursor: pointer;
  color: #f87171;
  font-weight: bold;
  font-size: 16px;
}

#fileList li:hover {
  background: rgba(167, 139, 250, 0.1);
}

/* Hide empty AdSense ads to remove extra space */
.adsbygoogle:empty {
  display: none !important;
}


.site-header .logo-img {
  width: 200px;
  height: auto; /* keeps aspect ratio */
}

/* TOOL NAV */
.tool-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tool-nav a {
  text-decoration: none;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #e5e7eb;
  background: rgba(255, 255, 255, 0.06);
  transition: all 0.25s ease;
}

.tool-nav a:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

/* MOBILE OPTIMIZATION */
@media (max-width: 640px) {
  .tool-nav {
    gap: 8px;
  }

  .tool-nav a {
    font-size: 13px;
    padding: 6px 10px;
  }
}

.site-header {
  padding-bottom: 16px;
}

.tool-nav {
  margin-top: 12px;
}
