/* ===================================================================
   GIF Compressor — Design System & Styles
   Matches the FreeConvert / Etheric UI mockups
   =================================================================== */

/* ===== Google Fonts ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ===== Design Tokens ===== */
:root {
  --color-primary: #1b2a4a;
  --color-primary-hover: #243a5e;
  --color-accent: #2d5ca6;
  --color-accent-light: #3a6fbf;
  --color-bg: #f0f4f8;
  --color-bg-alt: #e8eef5;
  --color-bg-subtle: #f6f8fb;
  --color-card: #ffffff;
  --color-border: #dde5ef;
  --color-border-hover: #bcc8d9;
  --color-text: #1b2a4a;
  --color-text-secondary: #6b7d99;
  --color-text-muted: #8fa3bf;
  --color-success: #1a7a4c;
  --color-success-bg: #e6f5ee;
  --color-info-bg: #e0eaf5;
  --color-info: #2d5ca6;
  --color-danger: #dc3545;
  --color-danger-bg: rgba(220, 53, 69, 0.08);

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 20px;
  --radius-full: 50%;

  --shadow-xs: 0 1px 2px rgba(27, 42, 74, 0.04);
  --shadow-sm: 0 1px 3px rgba(27, 42, 74, 0.06);
  --shadow-md: 0 4px 12px rgba(27, 42, 74, 0.08);
  --shadow-lg: 0 8px 24px rgba(27, 42, 74, 0.1);
  --shadow-xl: 0 12px 36px rgba(27, 42, 74, 0.12);

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

button:disabled {
  cursor: not-allowed;
}

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

ul, ol {
  list-style: none;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

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

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.spin {
  animation: spin 1s linear infinite;
}

.animate-in {
  animation: fadeInUp 0.5s ease forwards;
}

/* ===== Navbar ===== */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 60px;
  background: var(--color-card);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.navbar-hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--color-text);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.navbar-hamburger:hover {
  background: var(--color-bg);
}

.navbar-hamburger svg {
  width: 18px;
  height: 18px;
}

.navbar-logo {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.03em;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.navbar-links a {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  font-weight: 500;
  transition: color var(--transition-fast);
  white-space: nowrap;
  position: relative;
}

.navbar-links a:hover,
.navbar-links a.active {
  color: var(--color-text);
}

.navbar-links a.active::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
}

.navbar-icon:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

.navbar-icon svg {
  width: 18px;
  height: 18px;
}

/* ===== Layout ===== */
.container {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-wide {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 2rem;
}

.main-content {
  flex: 1;
}

/* ===== Hero Section ===== */
.hero {
  text-align: center;
  padding: 3.5rem 0 2rem;
  animation: fadeIn 0.6s ease;
}

.hero-badge {
  display: inline-block;
  padding: 0.3rem 0.875rem;
  background: var(--color-info-bg);
  color: var(--color-accent);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.625rem;
}

.hero p {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  max-width: 440px;
  margin: 0 auto;
  line-height: 1.65;
}

/* ===== Dropzone ===== */
.dropzone-wrapper {
  padding: 0 0 1.75rem;
  animation: fadeInUp 0.5s ease 0.1s both;
}

.dropzone {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-xl);
  padding: 2.75rem 2rem;
  text-align: center;
  background: var(--color-card);
  transition: all var(--transition-base);
  cursor: default;
  position: relative;
}

.dropzone:hover {
  border-color: var(--color-border-hover);
}

.dropzone.drag-over {
  border-color: var(--color-accent);
  background: rgba(45, 92, 166, 0.03);
  transform: scale(1.005);
  box-shadow: 0 0 0 4px rgba(45, 92, 166, 0.08);
}

.dropzone.is-loading {
  cursor: wait;
  border-color: var(--color-accent);
}

.dropzone-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  color: var(--color-text-secondary);
  border: 1.5px solid var(--color-border);
  transition: all var(--transition-base);
}

.dropzone:hover .dropzone-icon {
  border-color: var(--color-border-hover);
  color: var(--color-text);
}

.dropzone-icon svg {
  width: 22px;
  height: 22px;
}

.dropzone h2,
.dropzone-title {
  display: block;
  font-size: 1.375rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
  color: var(--color-primary);
}

.dropzone p {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  margin-bottom: 1.5rem;
}

.dropzone-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.dropzone input[type="file"] {
  display: none;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn svg {
  width: 15px;
  height: 15px;
}

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

.btn-primary:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: var(--color-card);
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
}

.btn-outline:hover {
  border-color: var(--color-border-hover);
  background: var(--color-bg);
}

.btn:disabled {
  opacity: 0.62;
  box-shadow: none;
  transform: none;
}

.btn-lg {
  padding: 0.8rem 1.75rem;
  font-size: 0.875rem;
  border-radius: var(--radius-lg);
}

/* ===== Accordion ===== */
.accordion {
  background: var(--color-card);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-xl);
  margin-bottom: 2.5rem;
  overflow: hidden;
  animation: fadeInUp 0.5s ease 0.2s both;
}

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.125rem 1.5rem;
  cursor: pointer;
  transition: background var(--transition-fast);
  user-select: none;
}

.accordion-header:hover {
  background: var(--color-bg-subtle);
}

.accordion-header-left {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.accordion-header-left svg {
  width: 18px;
  height: 18px;
  color: var(--color-text-secondary);
}

.accordion-header h3,
.accordion-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-primary);
}

.accordion-chevron {
  width: 18px;
  height: 18px;
  color: var(--color-text-secondary);
  transition: transform var(--transition-base);
}

.accordion.open .accordion-chevron {
  transform: rotate(180deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow);
}

.accordion.open .accordion-body {
  max-height: 400px;
}

.accordion-content {
  padding: 0 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.setting-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.setting-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.setting-label span {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text);
}

.setting-label .setting-value {
  font-size: 0.8125rem;
  color: var(--color-accent);
  font-weight: 700;
  min-width: 28px;
  text-align: right;
}

/* Range Slider */
input[type="range"] {
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--color-border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  cursor: pointer;
  border: 2.5px solid #fff;
  box-shadow: 0 1px 4px rgba(45, 92, 166, 0.3);
  transition: transform var(--transition-fast);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  cursor: pointer;
  border: 2.5px solid #fff;
  box-shadow: 0 1px 4px rgba(45, 92, 166, 0.3);
}

/* ===== Step Cards ===== */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.125rem;
  margin-bottom: 2.5rem;
  animation: fadeInUp 0.5s ease 0.3s both;
}

.step-card {
  background: var(--color-card);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 1.375rem;
  transition: all var(--transition-base);
}

.step-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--color-border-hover);
}

.step-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-lg);
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.875rem;
  color: var(--color-text-secondary);
}

.step-icon svg {
  width: 18px;
  height: 18px;
}

.step-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
  font-style: italic;
}

.step-card p {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* ===== Trusted By ===== */
.trusted {
  text-align: center;
  padding: 1.5rem 0 2.5rem;
  animation: fadeInUp 0.5s ease 0.4s both;
}

.trusted-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
}

.trusted-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
}

.trusted-logo {
  height: 24px;
  border-radius: var(--radius-sm);
  opacity: 0.35;
  background: var(--color-text-muted);
}

.trusted-logo:nth-child(1) { width: 70px; }
.trusted-logo:nth-child(2) { width: 85px; }
.trusted-logo:nth-child(3) { width: 60px; }
.trusted-logo:nth-child(4) { width: 90px; }

/* ===== GIF Compressor By Size ===== */
.by-size-hero {
  padding-bottom: 1.5rem;
}

.size-link-section {
  margin-bottom: 1.75rem;
  animation: fadeInUp 0.5s ease both;
}

.size-link-section:nth-of-type(2) {
  animation-delay: 0.08s;
}

.size-link-section:nth-of-type(3) {
  animation-delay: 0.16s;
}

.size-link-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.size-link-header h2 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-primary);
}

.size-link-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.size-link-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 520px;
}

.size-link {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0.875rem 1rem;
  background: var(--color-card);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-primary);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.25;
  transition: all var(--transition-fast);
}

.size-link:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.by-size-cta {
  display: flex;
  justify-content: center;
  padding: 0.75rem 0 3rem;
}

/* ===== Specific Target Size Pages ===== */
.target-tool {
  max-width: 720px;
  margin: 0 auto;
  padding: 3.5rem 0;
  text-align: center;
}

.target-tool h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.target-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  padding: 2rem;
  margin-bottom: 1.25rem;
  background: var(--color-card);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.target-upload:hover,
.target-upload.drag-over {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
}

.target-upload-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--color-text-secondary);
}

.target-upload-icon svg {
  width: 22px;
  height: 22px;
}

.target-upload strong {
  display: block;
  font-size: 1.25rem;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

.target-file-name {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  word-break: break-word;
}

.target-actions {
  display: flex;
  justify-content: center;
  margin-bottom: 0.875rem;
}

.target-status {
  min-height: 1.5rem;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin-bottom: 1.25rem;
}

.target-status.target-error {
  color: var(--color-danger);
}

.target-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.85fr);
  gap: 1rem;
  text-align: left;
  background: var(--color-card);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.target-result[hidden] {
  display: none;
}

.target-preview {
  min-height: 260px;
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.target-preview img {
  max-height: 240px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  object-fit: contain;
}

.target-result-details {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.target-result-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.target-result-heading span {
  font-size: 0.75rem;
  color: var(--color-success);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.target-result-heading strong {
  font-size: 1.25rem;
  color: var(--color-primary);
}

.target-size-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.875rem;
}

.target-size-row span {
  color: var(--color-text-secondary);
}

.target-size-row strong {
  color: var(--color-primary);
}

/* ===== Homepage Article Content ===== */
.home-article {
  background:
    linear-gradient(180deg, var(--color-bg) 0%, #f7fafc 42%, var(--color-bg) 100%);
}

.home-hero-panel {
  padding: 4rem 0 2.25rem;
  text-align: center;
}

.home-hero-panel h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.08;
  color: var(--color-primary);
  margin-bottom: 0.875rem;
}

.home-hero-panel p {
  max-width: 760px;
  margin: 0 auto;
  color: var(--color-text-secondary);
  font-size: 1rem;
  line-height: 1.75;
}

.home-hero-panel .dropzone-wrapper {
  max-width: 760px;
  margin: 1.5rem auto 1.25rem;
}

.hero .dropzone-wrapper {
  margin-top: 1.25rem;
}

.entity-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.625rem;
  margin-top: 1.5rem;
}

.entity-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-card);
  color: var(--color-primary);
  font-size: 0.75rem;
  font-weight: 700;
}

.intro-coverage {
  max-width: 960px;
  margin: 1.25rem auto 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  text-align: left;
}

.intro-coverage div {
  background: var(--color-card);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 0.9rem;
  box-shadow: var(--shadow-xs);
}

.intro-coverage strong {
  display: block;
  color: var(--color-primary);
  font-size: 0.8125rem;
  margin-bottom: 0.35rem;
}

.intro-coverage span {
  color: var(--color-text-secondary);
  font-size: 0.8125rem;
  line-height: 1.55;
}

.section-entities {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.875rem 0 1rem;
}

.section-entities.compact {
  margin-bottom: 0.25rem;
}

.section-entities span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-pill);
  background: #eef8f2;
  border: 1px solid #c8e7d2;
  color: #285a42;
  font-size: 0.72rem;
  font-weight: 800;
}

.content-section {
  padding: 2rem 0;
}

.content-section + .content-section {
  border-top: 1px solid var(--color-border);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 1.25rem;
}

.section-heading h2,
.section-copy h2 {
  font-size: 1.75rem;
  line-height: 1.2;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.section-heading p,
.section-copy p {
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.section-kicker {
  display: inline-block;
  color: #7a3f12;
  background: #fff4e8;
  border: 1px solid #f4d6b8;
  border-radius: var(--radius-pill);
  padding: 0.2rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.625rem;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1fr);
  gap: 1.5rem;
  align-items: center;
}

.interactive-panel,
.security-flow,
.data-diagram,
.quality-output,
.animation-output {
  background: var(--color-card);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.interactive-panel {
  padding: 1.25rem;
}

.diagram-stage {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.75rem;
  align-items: center;
}

.diagram-card {
  min-height: 112px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-subtle);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
}

.diagram-card.compressed {
  background: #eef8f2;
  border-color: #c8e7d2;
}

.diagram-card span,
.target-screen span,
.quality-output span,
.animation-output span {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.diagram-card strong,
.target-screen strong,
.quality-output strong {
  color: var(--color-primary);
  font-size: 1.5rem;
}

.diagram-arrow {
  color: var(--color-text-muted);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.diagram-bars {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1rem 0;
}

.diagram-bars .bar {
  display: block;
  height: 10px;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  transition: width var(--transition-base);
}

.diagram-bars .bar.wide {
  width: 100%;
  background: #dfb267;
}

.diagram-bars .bar.medium {
  width: 70%;
  background: var(--color-success);
}

.diagram-controls,
.target-buttons,
.animation-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.diagram-step,
.target-choice,
.frame-dot {
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-card);
  color: var(--color-primary);
  padding: 0.45rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  transition: all var(--transition-fast);
}

.diagram-step.active,
.target-choice.active,
.frame-dot.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.tool-content-section .dropzone-wrapper {
  padding-bottom: 0;
}

.quality-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 1rem;
}

.quality-selector {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.quality-card {
  min-height: 112px;
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--color-border);
  background: var(--color-card);
  color: var(--color-primary);
  font-weight: 800;
  text-align: left;
  transition: all var(--transition-fast);
}

.quality-card.active,
.quality-card:hover {
  border-color: #326b4c;
  background: #eef8f2;
}

.quality-output {
  padding: 1.25rem;
}

.quality-output p {
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-top: 0.75rem;
}

.quality-meter,
.target-track,
.animation-meter {
  width: 100%;
  height: 12px;
  background: var(--color-bg);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-top: 0.75rem;
}

.quality-meter span,
.target-track span,
.animation-meter span {
  display: block;
  height: 100%;
  background: #2f7a56;
  border-radius: inherit;
  transition: width var(--transition-base);
}

.security-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 1.25rem;
  align-items: center;
}

.security-flow {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
}

.security-flow div {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  background: var(--color-bg-subtle);
}

.security-flow strong {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: #fff4e8;
  color: #7a3f12;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.security-flow span {
  color: var(--color-primary);
  font-weight: 700;
}

.size-target-panel {
  display: grid;
  gap: 1rem;
}

.target-screen {
  padding: 1rem;
  border-radius: var(--radius-lg);
  background: var(--color-bg-subtle);
}

.data-diagram {
  padding: 1rem;
  display: grid;
  gap: 0.75rem;
}

.data-node {
  padding: 0.75rem 1rem;
  background: var(--color-bg-subtle);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-primary);
  font-weight: 800;
  transition: all var(--transition-fast);
}

.data-node.active {
  background: #eef8f2;
  border-color: #c8e7d2;
}

.data-diagram p {
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
}

.animation-strip {
  background: var(--color-card);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.frame-dot {
  width: 42px;
  height: 42px;
  padding: 0;
}

.animation-output {
  padding: 1rem;
}

.faq-list {
  display: grid;
  gap: 0.625rem;
}

.faq-list details {
  background: var(--color-card);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
}

.faq-list summary {
  cursor: pointer;
}

.faq-list summary::marker {
  color: var(--color-accent);
}

.faq-list h3 {
  display: inline;
  font-size: 0.9375rem;
  color: var(--color-primary);
}

.faq-list p {
  margin-top: 0.625rem;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  line-height: 1.65;
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-card);
  margin-top: auto;
}

.footer-left {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

.footer-right {
  display: flex;
  gap: 1.5rem;
}

.footer-right a {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  font-weight: 500;
  transition: color var(--transition-fast);
}

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

/* =======================================================================
   PROCESSING PAGE
   ======================================================================= */

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 2.25rem 0 1.5rem;
  animation: fadeIn 0.4s ease;
}

.page-header-text h1 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
  font-style: italic;
}

.page-header-text p {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  max-width: 400px;
  line-height: 1.55;
}

/* ===== File Cards Grid ===== */
.file-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.125rem;
  padding-bottom: 7.5rem;
}

.file-card {
  background: var(--color-card);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 1.125rem;
  transition: all var(--transition-base);
  position: relative;
  animation: fadeInUp 0.4s ease both;
}

.file-card:nth-child(1) { animation-delay: 0.05s; }
.file-card:nth-child(2) { animation-delay: 0.1s; }
.file-card:nth-child(3) { animation-delay: 0.15s; }
.file-card:nth-child(4) { animation-delay: 0.2s; }
.file-card:nth-child(5) { animation-delay: 0.25s; }
.file-card:nth-child(6) { animation-delay: 0.3s; }

.file-card:hover {
  box-shadow: var(--shadow-md);
}

.file-card.processing {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px rgba(45, 92, 166, 0.15), var(--shadow-sm);
}

.file-card-header {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.625rem;
}

.file-thumbnail {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-md);
  background: var(--color-bg-alt);
  overflow: hidden;
  flex-shrink: 0;
}

.file-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.file-badge {
  display: inline-block;
  padding: 0.175rem 0.5rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
}

.file-badge.ready {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.file-badge.processing-badge {
  background: var(--color-info-bg);
  color: var(--color-accent);
}

.file-size {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  font-weight: 500;
}

.file-info {
  margin-bottom: 0.625rem;
}

.file-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.125rem;
  word-break: break-all;
}

.file-resolution {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
}

/* Progress Bar */
.file-progress {
  margin-bottom: 0.625rem;
}

.file-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.375rem;
}

.file-progress-header span {
  font-size: 0.6875rem;
  color: var(--color-text-secondary);
  font-weight: 500;
}

.progress-bar {
  width: 100%;
  height: 5px;
  background: var(--color-bg);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light));
  border-radius: 3px;
  transition: width 0.3s ease;
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}

/* File Actions */
.file-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.25rem;
}

.file-settings {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--color-accent);
  font-weight: 600;
  cursor: pointer;
  transition: color var(--transition-fast);
  padding: 0.25rem 0;
}

.file-settings:hover {
  color: var(--color-accent-light);
}

.file-settings svg {
  width: 13px;
  height: 13px;
}

.file-delete {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.file-delete:hover {
  color: var(--color-danger);
  background: var(--color-danger-bg);
}

.file-delete svg {
  width: 15px;
  height: 15px;
}

/* ===== Bottom Bar ===== */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-card);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 20px rgba(27, 42, 74, 0.06);
  padding: 0.875rem 2rem;
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: slideUp 0.4s ease;
}

.bottom-bar-info {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.bar-stat {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.bar-stat-label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.bar-stat-value {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-primary);
}

.bar-stat-value.savings {
  color: var(--color-success);
}

.bottom-bar-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Quality Toggles */
.quality-toggles {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.quality-toggle {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 700;
  border: 1.5px solid var(--color-border);
  color: var(--color-text-secondary);
  background: var(--color-card);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.quality-toggle:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.quality-toggle.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* Compress Button */
.btn-compress {
  padding: 0.75rem 1.75rem;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
}

.btn-compress:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.btn-compress:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-compress svg {
  width: 16px;
  height: 16px;
}

/* =======================================================================
   RESULT PAGE
   ======================================================================= */

.result-header {
  text-align: center;
  padding: 2.5rem 0 1.75rem;
  animation: fadeIn 0.5s ease;
}

.result-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.02em;
  margin-bottom: 0.375rem;
}

.result-header p {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

/* Result Card */
.result-card {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  background: var(--color-card);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 1.75rem;
  animation: fadeInUp 0.5s ease 0.1s both;
}

.result-preview {
  background: var(--color-bg-alt);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 360px;
}

.result-preview img {
  max-width: 90%;
  max-height: 280px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  object-fit: contain;
}

.result-filename {
  position: absolute;
  bottom: 1.125rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(27, 42, 74, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  padding: 0.35rem 0.875rem;
  border-radius: var(--radius-pill);
  font-size: 0.6875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  white-space: nowrap;
}

.result-filename svg {
  width: 12px;
  height: 12px;
  opacity: 0.8;
}

/* Result Details Panel */
.result-details {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
}

.compression-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.compression-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.saved-badge {
  padding: 0.25rem 0.625rem;
  background: var(--color-success-bg);
  color: var(--color-success);
  font-size: 0.6875rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
}

/* Size Comparison */
.size-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.625rem;
  margin-bottom: 1.25rem;
}

.size-box {
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border);
}

.size-box.new-size {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.size-box-label {
  font-size: 0.6875rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.size-box:not(.new-size) .size-box-label {
  color: var(--color-text-muted);
}

.size-box.new-size .size-box-label {
  opacity: 0.7;
}

.size-box-value {
  font-size: 1.25rem;
  font-weight: 700;
}

/* Detail Rows */
.detail-rows {
  flex: 1;
  margin-bottom: 0.5rem;
}

.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-row-label {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

.detail-row-value {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-primary);
}

/* Result Buttons */
.result-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding-top: 0.75rem;
}

.btn-download {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: #fff;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 600;
  gap: 0.5rem;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.btn-download:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-md);
}

.btn-download svg {
  width: 16px;
  height: 16px;
}

.btn-download-split {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
}

.btn-download-split svg {
  width: 14px;
  height: 14px;
}

.btn-more {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-card);
  color: var(--color-primary);
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 600;
  border: 1.5px solid var(--color-border);
  gap: 0.5rem;
  transition: all var(--transition-fast);
}

.btn-more:hover {
  border-color: var(--color-border-hover);
  background: var(--color-bg);
}

.btn-more svg {
  width: 16px;
  height: 16px;
}

/* ===== Pro Upsell Banner ===== */
.pro-upsell {
  background: var(--color-card);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 1.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 3rem;
  animation: fadeInUp 0.5s ease 0.2s both;
}

.pro-upsell-content {
  flex: 1;
}

.pro-upsell-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.pro-upsell-title svg {
  width: 22px;
  height: 22px;
  color: var(--color-accent);
}

.pro-upsell-title h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
}

.pro-upsell-content > p {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 0.875rem;
  max-width: 440px;
}

.pro-features {
  display: flex;
  gap: 1.25rem;
}

.pro-feature {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.pro-feature svg {
  width: 14px;
  height: 14px;
  color: var(--color-accent);
}

.pro-upsell-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  flex-shrink: 0;
}

.pro-price-label {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  text-align: right;
}

.pro-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
}

.pro-price span {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.btn-pro {
  padding: 0.7rem 1.5rem;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.btn-pro:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-md);
}

/* =======================================================================
   RESPONSIVE
   ======================================================================= */

@media (max-width: 768px) {
  .navbar {
    padding: 0 1rem;
  }

  .navbar-links {
    display: none;
  }

  .container-wide {
    padding: 0 1rem;
  }

  .hero h1 {
    font-size: 1.875rem;
  }

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

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

  .result-card {
    grid-template-columns: 1fr;
  }

  .result-preview {
    min-height: 240px;
  }

  .bottom-bar {
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
  }

  .bottom-bar-info {
    gap: 1.25rem;
  }

  .pro-upsell {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }

  .pro-upsell-right {
    align-items: flex-start;
    flex-direction: row;
    gap: 1.5rem;
    width: 100%;
    justify-content: space-between;
  }

  .page-header {
    flex-direction: column;
    gap: 1rem;
  }

  .size-link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .target-result {
    grid-template-columns: 1fr;
  }

  .home-hero-panel h1 {
    font-size: 2.2rem;
  }

  .split-section,
  .security-section,
  .quality-layout {
    grid-template-columns: 1fr;
  }

  .intro-coverage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quality-selector {
    grid-template-columns: 1fr;
  }

  .diagram-stage {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 520px) {
  .file-grid {
    grid-template-columns: 1fr;
  }

  .size-comparison {
    grid-template-columns: 1fr;
  }

  .pro-features {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .dropzone-buttons {
    flex-direction: column;
  }

  .dropzone-buttons .btn {
    width: 100%;
  }

  .size-link-grid,
  .size-link-grid.compact {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .target-tool {
    padding: 2.5rem 0;
  }

  .target-tool h1 {
    font-size: 1.75rem;
  }

  .target-upload {
    min-height: 190px;
    padding: 1.5rem;
  }

  .home-hero-panel {
    padding: 2.75rem 0 1.5rem;
  }

  .home-hero-panel h1 {
    font-size: 1.95rem;
  }

  .home-hero-panel p,
  .section-heading p,
  .section-copy p {
    font-size: 0.875rem;
  }

  .section-heading h2,
  .section-copy h2 {
    font-size: 1.45rem;
  }

  .content-section {
    padding: 1.5rem 0;
  }

  .entity-strip {
    justify-content: flex-start;
  }

  .intro-coverage {
    grid-template-columns: 1fr;
  }

  .section-entities span {
    max-width: 100%;
  }

  .diagram-controls,
  .target-buttons,
  .animation-strip {
    gap: 0.375rem;
  }
}
