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

:root {
  color-scheme: light;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #f4f5f8;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #0c0f1b, #20253c 42%, #0c0f1b 80%);
  color: #fff;
}

.hero {
  padding: 3rem clamp(1rem, 4vw, 4rem);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  align-items: center;
  background: radial-gradient(circle at top right, rgba(255, 166, 0, 0.25), transparent 45%),
    rgba(7, 10, 21, 0.9);
}

.hero__content h1 {
  margin-bottom: 0.5rem;
  font-size: clamp(2.4rem, 4vw, 3.6rem);
}

.hero__content p {
  margin: 0;
  max-width: 42ch;
  color: #b5bbcf;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.hero__actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero__actions button {
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  background: linear-gradient(120deg, #f7a400, #eb3349);
  color: #fff;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.hero__actions button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.hero__panel {
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 1.5rem;
  border-radius: 1rem;
  background: rgba(5, 7, 16, 0.7);
  backdrop-filter: blur(10px);
}

.hero__panel ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.35rem;
  color: #dfe1eb;
}

.studio {
  padding: clamp(1.5rem, 3vw, 2.5rem);
  display: grid;
  gap: 1.5rem;
}

.panel {
  background: rgba(15, 21, 38, 0.95);
  border-radius: 1.5rem;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 60px rgba(3, 6, 18, 0.7);
}

.panel header,
.panel h2,
.panel h3 {
  margin: 0;
}

.panel header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.panel header p,
.panel h2 + p,
.panel h3 + p {
  margin: 0.35rem 0 0;
  color: #a9b0c8;
}

.upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.9rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.upload-btn input {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.canvas-wrap {
  position: relative;
  margin-top: 1.25rem;
  min-height: 280px;
  border: 1px dashed rgba(255, 255, 255, 0.3);
  border-radius: 1.25rem;
  overflow: hidden;
  background: #0f111b;
}

.canvas-wrap canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.canvas-wrap canvas#maskCanvas {
  mix-blend-mode: multiply;
  pointer-events: none;
  opacity: 0.75;
}

.canvas-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

.controls {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.controls label {
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  color: #dfe1eb;
}

.action-row {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.action-row button {
  border: none;
  color: #fff;
  border-radius: 999px;
  padding: 0.65rem 1.15rem;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: background 120ms ease;
}

.action-row button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.panel form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: 1rem;
}

.panel label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.9rem;
  color: #c2c7d8;
}

.panel select,
.panel input[type="file"],
.panel input[type="text"],
.panel input[type="number"],
.panel input[type="color"] {
  border-radius: 0.7rem;
  padding: 0.6rem 0.8rem;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-family: inherit;
}

.panel button {
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.3rem;
  background: linear-gradient(120deg, #7b5dff, #ff6e7f);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.panel-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.panel.slim {
  background: rgba(3, 6, 18, 0.9);
}

.panel.slim canvas {
  margin-top: 1rem;
  width: 100%;
  height: 220px;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.note {
  font-size: 0.8rem;
  color: #828ba2;
  margin-top: 0.5rem;
}

footer {
  padding: 2rem 1rem 3rem;
  text-align: center;
  color: #9ea3c3;
  font-size: 0.95rem;
}

footer code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.2rem 0.4rem;
  border-radius: 0.4rem;
}

.layer-controls {
  margin-top: 1rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.layer-controls input {
  flex: 1;
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border: none;
  padding: 0.65rem 0.9rem;
  font: inherit;
}

.layer-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.layer-row {
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
}

.layer-row.active {
  border-color: #f7a400;
  box-shadow: 0 0 0 1px rgba(247, 164, 0, 0.35);
}

.layer-row button,
.layer-row input[type="range"] {
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 0.4rem 0.9rem;
}

.layer-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mask-tools {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.mask-mode {
  display: flex;
  gap: 0.5rem;
}

.mask-mode button {
  border: none;
  border-radius: 999px;
  padding: 0.4rem 1rem;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
}

.mask-mode button.active {
  background: rgba(247, 164, 0, 0.8);
  color: #0b0e1a;
}

.mask-info {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #cfd3e8;
}

.retouch-tools {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.retouch-mode label {
  gap: 0.25rem;
  display: inline-flex;
  align-items: center;
  font-size: 0.9rem;
}

.grade-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}

.grade-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: #cfd3e8;
}

.grade-grid input[type="range"] {
  border: none;
  width: 100%;
}

.grade-actions {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.batch-log {
  margin-top: 1rem;
  min-height: 80px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 1rem;
  border: 1px dashed rgba(255, 255, 255, 0.3);
  padding: 0.85rem;
  font-size: 0.85rem;
  color: #cfd3e8;
}

.asset-grid {
  margin-top: 0.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.asset-card {
  padding: 0.75rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  gap: 0.5rem;
}

.asset-card img {
  width: 100%;
  border-radius: 0.75rem;
  height: 110px;
  object-fit: cover;
}

.asset-card small {
  color: #a7ace1;
}

.dam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.dam-form,
.dam-search {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 1rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.dam-form label,
.dam-search label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
}

.raw-preview,
.tether-feed {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px dashed rgba(255, 255, 255, 0.4);
  min-height: 100px;
  font-size: 0.9rem;
  color: #cfd3e8;
}

.tether-feed {
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.02);
}

@media (max-width: 768px) {
  .controls {
    flex-direction: column;
  }

  .hero {
    padding: 2rem 1rem;
  }
}
