
/* PixelEase — Modern Minimal Dark Theme */

:root {
  color-scheme: dark;
  --primary: #8b7cff;
  --primary-dark: #7665f5;
  --text: #f3f4f6;
  --muted: #a8abb7;
  --border: #343744;
  --background: #111318;
  --surface: #1c1f27;
  --surface-hover: #252936;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--background);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  min-height: 76px;
  padding: 16px 7%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #15171e;
  border-bottom: 1px solid var(--border);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 23px;
  font-weight: 800;
}

.logo-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: white;
  background: var(--primary);
  border-radius: 12px;
}

nav {
  display: flex;
  gap: 24px;
}

nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s ease;
}

nav a:hover {
  color: #c0b8ff;
}

.hero {
  padding: 70px 20px 45px;
  text-align: center;
  background: radial-gradient(
    ellipse at top,
    #292442 0%,
    transparent 70%
  );
}

.eyebrow {
  display: inline-block;
  padding: 6px 12px;
  color: #c0b8ff;
  background: #302b4c;
  border-radius: 30px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.hero h1 {
  max-width: 850px;
  margin: 20px auto 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.12;
}

.hero-description {
  max-width: 650px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 17px;
}

.trust-points {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 26px;
  color: #c4c7d2;
  font-size: 13px;
}

.tool-section,
.info-section {
  width: min(100% - 32px, 1060px);
  margin: 0 auto;
}

.tool-card {
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.18);
}

.section-heading {
  margin-bottom: 26px;
  text-align: center;
}

.section-heading h2,
.info-section > h2,
.privacy-section h2 {
  margin: 0 0 8px;
  font-size: 25px;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
}

.upload-area {
  min-height: 190px;
  padding: 28px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border: 2px dashed #514777;
  border-radius: 16px;
  background: #171923;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.upload-area:hover,
.upload-area:focus-within {
  background: #242137;
  border-color: var(--primary);
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #302b4c;
  color: #c0b8ff;
  font-size: 30px;
}

.upload-area strong {
  font-size: 18px;
}

.upload-area span:not(.upload-icon) {
  color: var(--muted);
  font-size: 14px;
}

.upload-area .small-text {
  font-size: 12px !important;
}

.file-info,
.status-message {
  color: var(--muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.editor {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.editor[hidden],
.result-panel[hidden] {
  display: none;
}

.preview-panel,
.settings-panel,
.result-panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: #191c24;
}

.preview-panel h3,
.settings-panel h3,
.result-panel h3 {
  margin: 0 0 16px;
  font-size: 18px;
}

.preview-panel img,
.result-panel img {
  display: block;
  width: 100%;
  max-height: 350px;
  object-fit: contain;
  border-radius: 10px;
  background-color: #101116;
}

.preview-panel p,
.result-panel p {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.dimension-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 18px;
}

.field label {
  font-size: 13px;
  font-weight: 700;
}

.field input[type="number"],
.field select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #15171e;
  color: var(--text);
  font: inherit;
}

.field input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
  cursor: pointer;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 13px;
}

.checkbox-row input {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}

.primary-button,
.download-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 12px 18px;
  border: 0;
  border-radius: 10px;
  background: var(--primary);
  color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.primary-button:hover,
.download-button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.primary-button:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.result-panel {
  grid-column: 1 / -1;
}

.download-button {
  margin-top: 8px;
}

.status-message {
  margin-bottom: 0;
}

.status-message:empty {
  display: none;
}

.info-section {
  margin: 80px auto;
  text-align: center;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 28px;
  text-align: left;
}

.step-card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px;
  transition: border-color 0.2s ease,
              background 0.2s ease;
}

.step-card:hover {
  background: var(--surface-hover);
  border-color: #514777;
}

.step-number {
  color: #b4a8ff;
  font-size: 13px;
  font-weight: 800;
}

.step-card h3 {
  margin: 12px 0 8px;
  font-size: 17px;
}

.step-card p,
.privacy-section p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.privacy-section {
  width: min(100% - 32px, 800px);
  margin: 0 auto 75px;
  padding: 32px;
  border: 1px solid #40385e;
  border-radius: 18px;
  background: #201d32;
  text-align: center;
}

.site-footer {
  padding: 28px 16px;
  border-top: 1px solid var(--border);
  background: #15171e;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.site-footer p {
  margin: 5px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #a5a0ff;
  outline-offset: 3px;
}

::selection {
  background: var(--primary);
  color: white;
}

@media (max-width: 700px) {
  .site-header {
    padding: 14px 5%;
  }

  nav {
    gap: 14px;
  }

  nav a {
    font-size: 12px;
  }

  .hero {
    padding: 50px 18px 35px;
  }

  .hero-description {
    font-size: 15px;
  }

  .tool-card {
    padding: 18px;
  }

  .editor,
  .steps-grid {
    grid-template-columns: 1fr;
  }

  .info-section {
    margin: 55px auto;
  }

  .privacy-section {
    padding: 25px 20px;
  }
}

@media (max-width: 390px) {
  .logo {
    font-size: 19px;
  }

  nav {
    gap: 10px;
  }

  nav a {
    font-size: 11px;
  }

  .dimension-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
