  * {
    box-sizing: border-box;
    margin: 0;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  }

  body {
    background: linear-gradient(145deg, #f8faff 0%, #eef2f9 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 16px;
    flex-direction: column;
  }

  .card {
    max-width: 820px;
    width: 100%;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 42px;
    box-shadow: 0 25px 50px -8px rgba(0,10,40,0.25), inset 0 0 0 1px rgba(255,255,255,0.6);
    padding: 2rem 2rem 2.5rem;
    transition: all 0.2s ease;
  }

  h1 {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #13294b;
    margin: 0 0 0.1rem 0;
    flex-wrap: wrap;
  }

  .sub {
    color: #2c3e6d;
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 2rem;
    border-left: 4px solid #5b8cff;
    padding-left: 1rem;
    background: rgba(91, 140, 255, 0.06);
    border-radius: 0 20px 20px 0;
  }

  .badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
  }

  .badge {
    background: white;
    border-radius: 60px;
    padding: 0.6rem 1.3rem;
    font-weight: 500;
    font-size: 0.9rem;
    box-shadow: 0 6px 14px rgba(0,20,50,0.08);
    border: 1px solid rgba(255,255,255,0.7);
    color: #1e2f4b;
  }

  .badge span {
    font-weight: 700;
    color: #2d5bee;
    margin-right: 4px;
  }


  .drop-area {
    background: rgba(255, 255, 255, 0.5);
    border: 2px dashed #a5bbff;
    border-radius: 36px;
    padding: 2.8rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.1s;
    margin-bottom: 28px;
    backdrop-filter: blur(4px);
  }

  .drop-area:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: #3f6aff;
  }

  .drop-area:active {
    transform: scale(0.99);
  }

  .drop-area svg {
    width: 56px;
    height: 56px;
    stroke: #2f54b0;
    stroke-width: 1.5;
    fill: none;
    margin-bottom: 12px;
    opacity: 0.8;
  }

  .drop-text {
    font-size: 1.25rem;
    font-weight: 500;
    color: #121f3f;
  }

  .small-hint {
    font-size: 0.9rem;
    color: #4a5b7c;
    margin-top: 8px;
  }

  .file-input {
    display: none;
  }

  .preview-panel {
    background: rgba(255,255,255,0.5);
    border-radius: 32px;
    padding: 1.75rem 1.5rem;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.8);
    box-shadow: 0 8px 18px -6px rgba(0,0,0,0.1);
    margin-bottom: 24px;
  }

  #previewPanel, #transparencyWarning {
    display: none;
  }
  #compressedSize, #originalSize {
    margin-top: 10px;
  }

  .preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
  }

  .preview-header h3 {
    font-weight: 600;
    color: #13294b;
    font-size: 1.3rem;
    margin: 0;
  }

  .file-name {
    background: white;
    border-radius: 40px;
    padding: 0.4rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #1f3a78;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: 1px solid #e3eaff;
  }

  /* Image comparison */
  .img-comparison {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 20px;
    transition: all 0.3s ease;
    margin-bottom: 24px;
  }

  .preview-box {
    flex: 1 1 200px;
    text-align: center;
    background: white;
    border-radius: 28px;
    padding: 20px 15px;
    box-shadow: 0 12px 24px -12px rgba(18, 52, 77, 0.15);
    min-width: 0;
  }

  .preview-box p {
    margin: 0 0 10px 0;
    font-weight: 600;
    color: #2f4096;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }

  .preview-box img {
    max-width: 100%;
    max-height: 160px;
    border-radius: 18px;
    background: #f0f4ff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.02);
    object-fit: contain;
  }

  .arrow-container {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
  }

  .arrow {
    font-size: 2.5rem;
    color: #5572d4;
    font-weight: 300;
    line-height: 1;
  }

  /* Responsive breakpoint */
  @media (max-width: 580px) {
    .img-comparison {
      flex-direction: column;
    }
    .arrow-container {
      transform: rotate(90deg);
    }
    .preview-box {
      width: 100%;
    }
  }

  /* Compression controls */
  .compression-controls {
    background: #eef3fe;
    border-radius: 32px;
    padding: 1.5rem;
    margin: 1.5rem 0;
  }

  .control-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
  }

  .quality-slider-container {
    flex: 2;
    min-width: 250px;
  }

  .format-select-container {
    flex: 1;
    min-width: 180px;
  }

  .slider-header, .format-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
  }

  .slider-header label, .format-header label {
    font-weight: 600;
    color: #1d2b5f;
    font-size: 1rem;
  }

  .quality-value {
    background: white;
    padding: 0.3rem 1rem;
    border-radius: 40px;
    font-weight: 600;
    color: #2d5bee;
    border: 1px solid #cddcff;
  }

  input[type=range] {
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, #2d5bee 0%, #2d5bee var(--value, 0%), #cddcff var(--value, 0%), #cddcff 100%);
    border-radius: 20px;
    -webkit-appearance: none;
    appearance: none;
  }

  input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(45, 91, 238, 0.3);
    border: 2px solid #2d5bee;
    cursor: pointer;
    margin-top: -8px;
  }

  input[type=range]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(45, 91, 238, 0.3);
    border: 2px solid #2d5bee;
    cursor: pointer;
  }

  #targetFormat {
    width: 100%;
    background: white;
    border: none;
    padding: 10px 16px;
    border-radius: 40px;
    font-weight: 500;
    color: #0031b3;
    outline: 1px solid #cddcff;
    font-size: 0.95rem;
    cursor: pointer;
  }

  .file-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(205, 220, 255, 0.6);
  }

  .size-badge {
    background: white;
    border-radius: 40px;
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
    color: #1f3a78;
    border: 1px solid #cddcff;
  }

  .size-badge span {
    font-weight: 700;
    color: #2d5bee;
    margin-right: 4px;
  }

  .savings-badge {
    background: #2d5bee;
    color: white;
    border-radius: 40px;
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
  }

  .warning-badge {
    background: #ff9800;
    color: white;
    border-radius: 40px;
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
  }

  .action-bar {
    display: flex;
    justify-content: center;
    margin-top: 24px;
  }

  .compress-btn {
    background: #1d2b5f;
    border: none;
    color: white;
    font-size: 1.3rem;
    font-weight: 500;
    padding: 1rem 3rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 18px 28px -12px #142b70;
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid rgba(255,255,255,0.3);
    letter-spacing: 0.3px;
  }

  .compress-btn:not(:disabled):hover {
    background: #253b7a;
    transform: scale(1.02);
    box-shadow: 0 22px 32px -12px #0f2460;
  }

  .compress-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    box-shadow: none;
  }

  .reset-link {
    text-align: center;
    margin-top: 24px;
  }

  .reset-btn {
    background: transparent;
    border: 1px solid #b7c6ec;
    border-radius: 40px;
    padding: 0.5rem 1.8rem;
    color: #1f3c7a;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.1s;
  }

  .reset-btn:hover {
    background: white;
    border-color: #3e63dd;
  }

  .footnote {
    text-align: center;
    color: #596f9f;
    font-size: 0.85rem;
    margin-top: 22px;
  }

  /* Transparency warning */
  .transparency-warning {
    background: rgba(255, 152, 0, 0.1);
    border-left: 4px solid #ff9800;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #663d00;
  }

  /* SEO Content Styles - keeping same as before */
  .seo-content {
    max-width: 820px;
    width: 100%;
    margin: 2rem auto 0;
  }

  .explanation-block,
  .how-it-works,
  .use-cases,
  .faq-mini,
  .more-tools {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 32px;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 18px -6px rgba(0, 0, 0, 0.1);
  }

  .seo-content h2 {
    color: #13294b;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    letter-spacing: -0.02em;
  }

  .explanation-block p {
    color: #2c3e6d;
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0;
  }

  .feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
  }

  .feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
  }

  .feature-icon {
    font-size: 1.8rem;
    line-height: 1;
    min-width: 2.2rem;
    text-align: center;
  }

  .feature-item p {
    color: #2c3e6d;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
  }

  .feature-item strong {
    color: #1d2b5f;
    display: block;
    margin-bottom: 0.2rem;
  }

  .cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
  }

  .case-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
  }

  .case-icon {
    font-size: 1.8rem;
    min-width: 2.2rem;
    text-align: center;
  }

  .case-item p {
    color: #2c3e6d;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
  }

  .case-item strong {
    color: #1d2b5f;
    display: block;
    margin-bottom: 0.2rem;
  }

  .faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
  }

  .faq-item {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    padding: 1.2rem;
  }

  .faq-q {
    margin: 0 0 0.5rem 0;
    color: #1d2b5f;
    font-size: 1rem;
  }

  .faq-a {
    margin: 0;
    color: #2c3e6d;
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .more-tools ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
  }

  .more-tools li {
    margin: 0;
  }

  .more-tools a {
    display: inline-block;
    background: white;
    color: #1d2b5f;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border-radius: 40px;
    font-weight: 500;
    font-size: 1rem;
    border: 1px solid #cddcff;
    transition: all 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.02);
  }

  .more-tools a:hover {
    background: #2d5bee;
    color: white;
    border-color: #2d5bee;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -8px #2d5bee;
  }

  .authority-line {
    text-align: center;
    padding: 1rem 0 2rem;
    color: #596f9f;
    font-size: 0.95rem;
    font-style: italic;
    border-top: 1px solid rgba(89, 111, 159, 0.2);
    margin-top: 0.5rem;
  }

  .brand-highlight {
    color: #2d5bee;
    font-weight: 600;
    font-style: normal;
  }

  @media (max-width: 640px) {
    .explanation-block,
    .how-it-works,
    .use-cases,
    .faq-mini,
    .more-tools {
      padding: 1.2rem 1.2rem;
    }
    
    .feature-grid,
    .cases-grid,
    .faq-grid {
      grid-template-columns: 1fr;
      gap: 1rem;
    }
    
    .more-tools ul {
      flex-direction: column;
      align-items: center;
    }
    
    .more-tools a {
      width: 100%;
      text-align: center;
    }
    
    .seo-content h2 {
      font-size: 1.3rem;
    }

    .control-row {
      flex-direction: column;
      gap: 15px;
    }
  }