:root {
    --bg: #0f0f14;
    --surface: #15151d;
    --glass: rgba(255, 255, 255, 0.06);
    --text: #f7f7fb;
    --muted: #b7b7c9;
    --accent: #6c63ff;
    --accent-2: #ff6b9a;
    --border: rgba(255, 255, 255, 0.10);
    --shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background: radial-gradient(1200px 600px at 20% 0%, #1a1a24, 0%, #0f0f14 60%), #0f0f14;
    color: var(--text);
    font-family: "Inter", sans-serif;
    font-style: normal;
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
    color: inherit;
}

#pdfToImageApp {
    max-width: 1100px;
    margin: 40px auto;
    padding: 24px;
    border-radius: 20px;
    background: #15151d;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    font-family: "Inter", sans-serif;
    color: #333;
    text-align: center;
    transition: all 0.3s ease;
  }

  #pdfToImageApp:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  }

  h2 {
    font-size: 1.8rem;
    margin-bottom: 6px;
    color: #ffffff;
  }

  .subtitle {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 20px;
  }

  .controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
  }
  
  input[type="file"] {
    background: #fff;
    padding: 8px;
    border-radius: 10px;
    border: 1px solid #d0d7de;
    cursor: pointer;
    transition: 0.2s;
  }

  input[type="file"]:hover {
    border-color: #a0aec0;
  }

  button {
    background: linear-gradient(135deg, #4a90e2, #357abd);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-weight: 500;
  }

  button:hover:not(:disabled) {
    background: linear-gradient(135deg, #5aa0f0, #4a90e2);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(74,144,226,0.3);
  }

  button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  .scale-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
    color: #444;
  }

  select {
    padding: 5px 8px;
    border-radius: 8px;
    border: 1px solid #cbd5e0;
    background: #fff;
  }

  #status {
    margin: 15px auto 20px;
    font-size: 0.95rem;
    color: #2d3748;
    min-height: 22px;
  }

  #previews {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 15px;
  }

  .page-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    padding: 10px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
  }

  .page-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
  }

  .page-card img {
    width: 100%;
    border-radius: 10px;
  }

  .page-card .buttons {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 6px;
  }

  .btn-png {
    background: linear-gradient(135deg, #38b2ac, #319795);
  }

  .btn-png:hover {
    background: linear-gradient(135deg, #4fd1c5, #38b2ac);
  }

  .btn-jpg {
    background: linear-gradient(135deg, #f6ad55, #ed8936);
  }

  .btn-jpg:hover {
    background: linear-gradient(135deg, #fbd38d, #f6ad55);
  }

  .btn-view {
    background: linear-gradient(135deg, #805ad5, #6b46c1);
  }

  .btn-view:hover {
    background: linear-gradient(135deg, #9f7aea, #805ad5);
  }

  .page-name {
    font-size: 0.8rem;
    color: #555;
    margin-top: 6px;
    word-break: break-all;
  }

  @media (max-width: 600px) {
    #pdfToImageApp {
      padding: 18px;
      border-radius: 16px;
    }
    
    .controls {
        flex-direction: column;
    }
    button, input[type="file"], select {
        width: 100%;
    }
  }