:root {
  --navy: #1e3a5f;
  --navy-dark: #152d4a;
  --blue: #1a73e8;
  --blue-hover: #1557b0;
  --blue-light: #e8f0fe;
  --green: #34a853;
  --orange: #fa7b17;
  --red: #d93025;
  --white: #ffffff;
  --bg: #f1f5ff;
  --card-bg: #ffffff;
  --border: #dadce0;
  --text: #202124;
  --muted: #5f6368;
  --muted2: #9aa0a6;
  --font: 'Nunito', sans-serif;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.10);
  --radius: 14px;
  --radius-sm: 8px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
}

/* CONTAINER */
.container {
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

/* HERO */
.hero {
  background: linear-gradient(160deg, #1e3a5f 0%, #1a4f8a 55%, #1e5ea8 100%);
  padding: 48px 0 40px;
  text-align: center;
  border-bottom: 4px solid #2563c8;
}

.hero-title {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.hero-sub {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 600;
}

/* MAIN */
.main-content {
  flex: 1;
  padding: 36px 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* CARD */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: fadeUp 0.35s ease both;
  min-width: 0;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* UPLOAD ZONE */
.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 56px 24px 44px;
  text-align: center;
  border: 2.5px dashed #c0cce8;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  background: #fff;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--blue);
  background: #eef3fd;
}

.upload-icon-wrap {
  width: 76px;
  height: 76px;
  background: var(--blue-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--blue);
  transition: transform 0.2s;
}

.upload-zone:hover .upload-icon-wrap {
  transform: translateY(-4px);
}

.upload-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.upload-sub {
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 22px;
}

.upload-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 20px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 4px 11px;
  border-radius: 20px;
  font-weight: 700;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  font-family: var(--font);
  font-weight: 700;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.18s;
  white-space: normal;
  text-align: center;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  padding: 12px 30px;
  font-size: 0.95rem;
  box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
}

.btn-primary:hover {
  background: var(--blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(26, 115, 232, 0.4);
}

.btn-resize {
  background: var(--green);
  color: #fff;
  padding: 14px 54px;
  font-size: 1.05rem;
  box-shadow: 0 2px 10px rgba(52, 168, 83, 0.35);
}

.btn-resize:hover {
  background: #2a9647;
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(52, 168, 83, 0.45);
}

.btn-resize:disabled {
  background: #9aa0a6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-download {
  background: var(--green);
  color: #fff;
  width: 100%;
  padding: 13px 24px;
  font-size: 0.95rem;
  box-shadow: 0 2px 8px rgba(52, 168, 83, 0.3);
  border-radius: 8px;
}

.btn-download:hover {
  background: #2d9248;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--blue);
  border: 2px solid var(--blue);
  width: 100%;
  padding: 11px 24px;
  font-size: 0.9rem;
}

.btn-outline:hover {
  background: var(--blue-light);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fff;
  border: 1.5px solid var(--border);
  color: var(--muted);
  padding: 7px 14px;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s;
  flex-shrink: 0;
}

.btn-icon:hover {
  border-color: var(--blue);
  color: var(--blue);
}

/* RESIZE PANEL */
.resize-panel {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}

/* Preview row */
.preview-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  min-width: 0;
}

.preview-thumb {
  width: 64px;
  height: 64px;
  border-radius: 6px;
  overflow: hidden;
  background: #ddd;
  flex-shrink: 0;
}

.preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.preview-info {
  flex: 1;
  min-width: 0;
}

.preview-name {
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 2px;
  word-break: break-word;
}

/* Mode wrap */
.mode-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mode-label {
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

/* Radio buttons */
.radio-group {
  display: flex;
  gap: 28px;
  justify-content: center;
  flex-wrap: wrap;
}

.radio-lbl {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--blue);
  cursor: pointer;
  user-select: none;
}

.radio-lbl input[type="radio"] {
  display: none;
}

.radio-custom {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--blue);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.18s;
}

.radio-lbl input:checked + .radio-custom {
  border-color: var(--blue);
  background: var(--blue);
}

.radio-lbl input:checked + .radio-custom::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  display: block;
}

/* Slider */
.slider-box {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 22px 28px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.pct-slider {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(to right, var(--blue) 36%, #dde3f0 36%);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  transition: background 0.1s;
}

.pct-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--blue);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(26, 115, 232, 0.4);
  border: 3px solid #fff;
  transition: transform 0.15s, box-shadow 0.15s;
}

.pct-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 3px 10px rgba(26, 115, 232, 0.5);
}

.pct-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--blue);
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(26, 115, 232, 0.4);
}

.slider-label {
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.slider-val {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--green);
  min-width: 2.5ch;
  text-align: center;
  line-height: 1;
}

/* Pixels mode */
.px-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.px-grp {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1 1 140px;
  min-width: 110px;
}

.px-grp label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.px-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  transition: all 0.18s;
  -moz-appearance: textfield;
}

.px-input::-webkit-outer-spin-button,
.px-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.px-input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.12);
}

.px-sep {
  padding-bottom: 12px;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--muted2);
}

.aspect-lbl {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  margin-top: 10px;
  user-select: none;
  width: fit-content;
}

.aspect-lbl input[type="checkbox"] {
  display: none;
}

.chk {
  width: 19px;
  height: 19px;
  border: 2px solid var(--border);
  border-radius: 4px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s;
  flex-shrink: 0;
}

.aspect-lbl input:checked + .chk {
  background: var(--blue);
  border-color: var(--blue);
}

.aspect-lbl input:checked + .chk::after {
  content: '';
  width: 9px;
  height: 5px;
  border-left: 2.5px solid #fff;
  border-bottom: 2.5px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
  display: block;
}

/* Action */
.action-row {
  display: flex;
  justify-content: center;
  padding-top: 4px;
}

/* Loader */
.loader-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.loader-track {
  width: 260px;
  max-width: 100%;
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
  overflow: hidden;
}

.loader-bar {
  height: 100%;
  width: 40%;
  background: var(--blue);
  border-radius: 3px;
  animation: slide 1.2s ease-in-out infinite;
}

@keyframes slide {
  0% { transform: translateX(-200%); }
  100% { transform: translateX(600%); }
}

/* Error */
.error-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fce8e6;
  border: 1.5px solid #ea4335;
  border-radius: 8px;
  padding: 13px 16px;
  color: #c62828;
  font-size: 0.88rem;
  font-weight: 700;
  word-break: break-word;
}

/* RESULT CARD */
.result-card {
  overflow: hidden;
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(14px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.result-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 28px;
  background: linear-gradient(135deg, var(--navy), #1a4f8a);
  color: #fff;
}

.result-check {
  width: 40px;
  height: 40px;
  background: var(--green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.result-header h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}

.result-body {
  display: flex;
  gap: 24px;
  padding: 28px;
  flex-wrap: wrap;
  min-width: 0;
}

.result-img-wrap {
  flex: 1 1 260px;
  min-width: 180px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 280px;
}

.result-img-wrap img {
  max-width: 100%;
  max-height: 280px;
  object-fit: contain;
  display: block;
}

.result-info {
  flex: 1 1 210px;
  min-width: 210px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.size-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}

.sz {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: center;
  min-width: 0;
}

.sz-lbl {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted2);
}

.sz-val {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text);
  word-break: break-word;
}

.sz-bytes {
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 600;
}

.sz-arrow {
  color: var(--blue);
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* INFO SECTION */
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.info-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 24px 18px;
  text-align: center;
  box-shadow: var(--shadow);
  min-width: 0;
}

.info-ico {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}

.ico-blue {
  background: var(--blue-light);
  color: var(--blue);
}

.ico-green {
  background: #e6f4ea;
  color: var(--green);
}

.ico-orange {
  background: #fce8d5;
  color: var(--orange);
}

.info-card h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.info-card p {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}

/* FAQ */
.section-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  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(--text);
  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: var(--blue);
  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: var(--muted);
  line-height: 1.6;
}

.faq-item.open .faq-a {
  display: block;
}

/* FOOTER */
.site-footer {
  background: var(--navy);
  padding: 34px 0 30px;
  margin-top: auto;
}

.footer-inner {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
}

.footer-logo-box {
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 4px;
  flex-shrink: 0;
}

.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;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
  transition: color 0.18s ease;
}

.footer-nav a:hover {
  color: #fff;
}

.footer-copy {
  margin-top: 26px;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.42);
}

/* HEADER */
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  min-width: 0;
}

.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;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
}

.logo-box {
  width: 36px;
  height: 36px;
  background: #fff;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 6px;
  flex-shrink: 0;
}

.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-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center;
  min-width: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 15px;
  border-radius: 10px;
  color: #e7edf6;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-item:hover > .nav-link {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav-link.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.has-dropdown > .nav-link::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  opacity: 0.9;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 220px;
  background: #ffffff;
  border: 1px solid #dbe5f1;
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(16, 39, 68, 0.14);
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  z-index: 1000;
}

.dropdown-menu a {
  display: block;
  padding: 11px 16px;
  color: #1d3557;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.dropdown-menu a:hover {
  background: #f3f7fc;
  color: #0f4fa8;
}

.nav-btn {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  cursor: pointer;
  box-shadow: none;
}

.dropdown-item {
  position: relative;
}

.has-submenu > a::after {
  content: "›";
  float: right;
  font-size: 16px;
  opacity: 0.7;
}

.submenu {
  position: absolute;
  top: -10px;
  left: calc(100% + 8px);
  min-width: 230px;
  background: #ffffff;
  border: 1px solid #dbe5f1;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(16, 39, 68, 0.14);
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(8px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  z-index: 1001;
}

.dropdown-item:hover > .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.submenu a {
  display: block;
  padding: 11px 16px;
  color: #1d3557;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.submenu a:hover {
  background: #f3f7fc;
  color: #0f4fa8;
}

.menu-toggle {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  background: #fff;
  display: block;
  border-radius: 2px;
}

.mobile-menu {
  display: none;
  background: var(--navy);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 20px 16px;
}

.mobile-menu > a,
.mobile-menu > details > summary {
  display: block;
  padding: 12px 0;
  color: #ffffff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  list-style: none;
}

.mobile-menu > details > summary::-webkit-details-marker {
  display: none;
}

.mobile-menu details a {
  display: block;
  padding: 10px 0 10px 14px;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.mobile-menu details a:hover,
.mobile-menu > a:hover,
.mobile-menu > details > summary:hover {
  color: #ffffff;
}

.mobile-menu.active {
  display: block;
}

.nav-item.has-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* 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;
  min-width: 0;
}

.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;
}

/* Benefits checklist */
.seo-benefits {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg);
  border-radius: 8px;
  padding: 16px 18px;
  border: 1px solid var(--border);
}

.seo-benefit-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.seo-check {
  width: 22px;
  height: 22px;
  background: var(--green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}

/* Steps list */
.seo-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg);
  border-radius: 8px;
  padding: 16px 18px;
  border: 1px solid var(--border);
}

.seo-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.step-num {
  width: 26px;
  height: 26px;
  background: var(--blue);
  border-radius: 50%;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Format badges */
.format-badges {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.format-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
}

.fmt-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.fmt-name {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--navy);
  min-width: 80px;
}

.fmt-desc {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Two column layout */
.seo-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

/* Social */
.social-icons {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: 12px;
  flex-wrap: wrap;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.08);
}

.social-icons svg {
  width: 16px;
  height: 16px;
  fill: #cfd8e3;
}

.social-icons a:hover {
  background: #1a73e8;
  transform: translateY(-2px);
}

.social-icons a:hover svg {
  fill: #ffffff;
}

/* TOOLS SECTION */
.tools-section {
  padding: 50px 0;
  background: #f8fafc;
}

.tools-title {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 30px;
}

.tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.tools-col {
  min-width: 0;
}

.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;
  word-break: break-word;
}

.tools-col a:hover {
  color: #2f5d8a;
}

/* LARGE TABLET */
@media (min-width: 768px) {
  .footer-nav {
    margin-left: auto;
    display: flex;
    gap: 25px;
    justify-content: flex-end;
  }

  .footer-copy {
    width: 100%;
    text-align: center;
    margin-top: 15px;
  }

  .tools-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* DESKTOP */
@media (min-width: 1024px) {
  .tools-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .tools-section {
    padding: 60px 0;
  }
}

@media (max-width: 1050px) {
  .header-nav {
    gap: 4px;
  }

  .nav-link {
    padding: 10px 12px;
    font-size: 14px;
  }
}

@media (max-width: 900px) {
  .header-nav {
    display: none;
  }

  .menu-toggle {
    display: flex !important;
  }

  .header-right {
    display: flex;
    align-items: center;
    gap: 8px;
  }
}

@media (max-width: 767px) {
  .container {
    padding: 0 16px;
  }

  .hero {
    padding: 36px 0 30px;
  }

  .hero-sub {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .main-content {
    padding: 24px 16px 40px;
    gap: 20px;
  }

  .upload-zone {
    padding: 38px 18px 32px;
  }

  .upload-title {
    font-size: 1.2rem;
  }

  .resize-panel,
  .seo-block,
  .result-body {
    padding: 20px 16px;
  }

  .slider-box {
    padding: 18px 16px 16px;
  }

  .preview-row,
  .result-header,
  .result-body,
  .footer-top,
  .size-box {
    flex-direction: column;
    align-items: stretch;
  }

  .preview-thumb {
    width: 72px;
    height: 72px;
    margin: 0 auto;
  }

  .preview-info {
    text-align: center;
  }

  .preview-name {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    word-break: break-word;
  }

  .action-row {
    width: 100%;
  }

  .action-row .btn-resize {
    width: 100%;
  }

  .btn-primary,
  .btn-resize,
  .btn-outline,
  .btn-download {
    width: 100%;
    max-width: 100%;
  }

  .radio-group {
    gap: 14px;
    justify-content: flex-start;
  }

  .mode-label {
    text-align: left;
  }

  .px-row {
    flex-direction: column;
    align-items: stretch;
  }

  .px-grp {
    width: 100%;
    min-width: 0;
  }

  .px-sep {
    display: none;
  }

  .result-check {
    margin: 0 auto;
  }

  .result-header {
    text-align: center;
  }

  .result-info {
    flex: 1 1 auto;
    min-width: 0;
  }

  .result-img-wrap {
    min-width: 0;
    width: 100%;
  }

  .size-box {
    gap: 14px;
  }

  .info-grid,
  .seo-two-col,
  .tools-grid {
    grid-template-columns: 1fr;
  }

  .faq-q {
    padding: 16px;
    font-size: 0.92rem;
  }

  .faq-a {
    padding: 0 16px 16px;
  }

  .seo-block p {
    font-size: 0.92rem;
    line-height: 1.7;
  }

  .footer-top {
    align-items: flex-start;
  }

  .footer-nav {
    width: 100%;
    justify-content: flex-start;
    gap: 14px 20px;
  }

  .social-icons {
    margin-left: 0;
  }

  .loader-track {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .header-inner {
    gap: 10px;
  }

  .logo-text {
    font-size: 0.98rem;
  }

  .lang-btn {
    min-height: 42px;
    padding: 0 12px;
    font-size: 14px;
  }

  .lang-label {
    display: none;
  }

  .lang-code {
    font-size: 13px;
  }

  #currentFlag {
    display: none;
  }

  .upload-badges {
    gap: 8px;
  }

  .badge {
    font-size: 0.72rem;
    padding: 4px 10px;
  }

  .section-title {
    font-size: 1.15rem;
  }

  .tools-title {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .container,
  .footer-inner {
    padding: 0 14px;
  }

  .main-content {
    padding-left: 14px;
    padding-right: 14px;
  }

  .logo-text {
    font-size: 0.92rem;
  }

  .upload-title {
    font-size: 1.08rem;
  }

  .upload-sub,
  .preview-meta,
  .faq-a,
  .info-card p,
  .tools-col a {
    font-size: 0.84rem;
  }

  .btn-primary,
  .btn-resize,
  .btn-download,
  .btn-outline {
    padding-left: 16px;
    padding-right: 16px;
  }

  .result-header h3 {
    font-size: 1rem;
  }

  .slider-val {
    font-size: 1.28rem;
  }

  .seo-h2 {
    font-size: 1.08rem;
  }

  .seo-h3 {
    font-size: 0.94rem;
  }
}

