/* src/presentations/2DWeb/2DWeb.css */
@layer reset, base, components, utilities;
@layer reset {
  :where(*, *::before, *::after) {
    box-sizing: border-box;
    border-width: 0;
    border-style: solid;
    min-width: 0;
  }
  :where(html) {
    block-size: 100%;
    text-size-adjust: none;
    interpolate-size: allow-keywords;
  }
  :where(body) {
    min-block-size: 100vh;
    line-height: 1.5;
    margin: 0;
    -webkit-font-smoothing: antialiased;
  }
  :where(h1, h2, h3, h4, h5, h6) {
    text-wrap: balance;
    font-weight: bold;
    margin-block: 0;
  }
  :where(p) {
    text-wrap: pretty;
    margin-block-end: 1em;
  }
  :where(img, svg, video, canvas) {
    display: block;
    max-inline-size: 100%;
    block-size: auto;
  }
  :where(input, textarea, select, button) {
    font: inherit;
    letter-spacing: inherit;
    word-spacing: inherit;
    color: currentColor;
  }
  :where(textarea, select, input) {
    field-sizing: content;
  }
  :where(select) {
    appearance: base-select;
  }
  :where(:focus-visible) {
    outline: 2px solid canvasText;
    outline-offset: 2px;
  }
  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      animation-duration: 0.01ms !important;
      transition-duration: 0.01ms !important;
    }
  }
}
:root {
  --sticker: clamp(1.7rem, 4.2vw, 2.6rem);
  --gap: 0.3rem;
  --panel: #22232b;
  --panel-2: #2c2d37;
  --panel-3: #353643;
  --border: #3b3c4a;
  --body: #14141b;
  --text: #ecedf3;
  --muted: #9a9bad;
  --accent-x: #e0566a;
  --accent-y: #34c47c;
  --accent-z: #4f86ff;
  --accent-cube: #b78bff;
}
body {
  min-block-size: 100vh;
  background:
    radial-gradient(
      1100px 700px at 50% -15%,
      #2a2b3c 0%,
      transparent 60%),
    linear-gradient(
      180deg,
      #15151d 0%,
      #0f0f15 100%);
  color: var(--text);
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  display: flex;
  justify-content: center;
}
.app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.25rem;
  padding: 2.5rem 1.25rem 3.5rem;
  width: 100%;
  max-width: 960px;
}
.view-3d-link {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--panel-2);
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent-cube);
  border-radius: 11px;
  padding: 0.55rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.06s ease;
}
.view-3d-link:hover {
  background: var(--panel-3);
  border-color: #565768;
}
.view-3d-link:active {
  transform: translateY(1px);
}
.app__header {
  text-align: center;
}
.app__header h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  letter-spacing: 0.01em;
  background:
    linear-gradient(
      90deg,
      #fff,
      #b9bccb);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.subtitle {
  margin-block: 0.4rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.net {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, max-content);
  grid-template-areas: ".    top    .     ." "left front  right back" ".    bottom .     .";
  gap: 1rem;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 18px;
}
.net__reset {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 1;
  width: auto;
}
.area-top {
  grid-area: top;
}
.area-left {
  grid-area: left;
}
.area-front {
  grid-area: front;
}
.area-right {
  grid-area: right;
}
.area-back {
  grid-area: back;
}
.area-bottom {
  grid-area: bottom;
}
.face-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}
.face-label {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--muted);
}
.face {
  display: grid;
  grid-template-columns: repeat(3, var(--sticker));
  grid-template-rows: repeat(3, var(--sticker));
  gap: var(--gap);
  padding: var(--gap);
  background: var(--body);
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.cube {
  border-radius: 6px;
  background: #2a2a31;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.45),
    inset 0 -0.18rem 0.35rem rgba(0, 0, 0, 0.28),
    inset 0 0.12rem 0.2rem rgba(255, 255, 255, 0.06);
}
.Y {
  background-color: #ffd43b;
}
.R {
  background-color: #d92b3c;
}
.B {
  background-color: #2256d6;
}
.G {
  background-color: #1eaa5b;
}
.O {
  background-color: #ff7a18;
}
.W {
  background-color: #f4f4f0;
}
.controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
  width: 100%;
}
.control-group {
  background: var(--panel);
  border: 1px solid var(--border);
  border-top: 3px solid var(--group-accent, var(--accent-z));
  border-radius: 14px;
  padding: 1rem;
}
.group-x {
  --group-accent: var(--accent-x);
}
.group-y {
  --group-accent: var(--accent-y);
}
.group-z {
  --group-accent: var(--accent-z);
}
.group-cube {
  --group-accent: var(--accent-cube);
}
.control-group h2 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 0.85rem;
}
.btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0.55rem 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  transition:
    transform 0.06s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}
button .dir {
  font-size: 1.05rem;
  line-height: 1;
  color: var(--group-accent, var(--accent-z));
}
button:hover {
  background: var(--panel-3);
  border-color: #565768;
}
button:active {
  transform: translateY(1px);
}
button:focus-visible {
  outline: 2px solid var(--group-accent, var(--accent-z));
  outline-offset: 2px;
}
