:root {
  --bg: #071016;
  --panel: rgba(10, 15, 21, 0.94);
  --panel-border: rgba(173, 211, 255, 0.09);
  --text: #f4f8fc;
  --muted: rgba(227, 235, 244, 0.68);
  --focus-scale: 1.08;
  --focus-duration: 150ms;
  --screen-transition-duration: 280ms;
  --power-on-duration: 420ms;
  --overlay-duration: 280ms;
  --shadow-soft: 0 18px 50px rgba(0, 0, 0, 0.32);
  --shadow-strong: 0 24px 78px rgba(0, 0, 0, 0.52);
  --card-radius: 18px;
  --reference-image: url("assets/reference/samsung_2026_home_reference.jpg.jpg");
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top, rgba(40, 96, 110, 0.18), transparent 28%),
    linear-gradient(180deg, #030609 0%, #071018 46%, #08131a 100%);
  color: var(--text);
  font-family: Inter, Pretendard, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

body {
  overflow: hidden;
}

button {
  font: inherit;
}

kbd {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.84rem;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(290px, 360px) 1fr;
  gap: 28px;
  min-height: 100vh;
  padding: 28px;
}

.control-panel {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 26px 24px;
  border-radius: 28px;
  border: 1px solid var(--panel-border);
  background:
    linear-gradient(180deg, rgba(17, 24, 31, 0.98), rgba(9, 14, 19, 0.96)),
    var(--panel);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.eyebrow {
  margin: 0 0 6px;
  color: #8be4ff;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.panel-header h1 {
  margin: 0;
  font-size: clamp(1.55rem, 2vw, 2.1rem);
}

.panel-copy {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.control-label-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.control-label {
  font-size: 0.96rem;
  font-weight: 600;
}

.control-shortcut {
  color: var(--muted);
  font-size: 0.82rem;
}

.segmented-control,
.stacked-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.control-chip {
  position: relative;
  min-width: 96px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.control-chip[data-layout="stacked"] {
  width: 100%;
  text-align: left;
}

.control-chip.is-selected {
  background: linear-gradient(180deg, rgba(238, 247, 255, 0.16), rgba(166, 220, 255, 0.08));
  border-color: rgba(188, 228, 255, 0.4);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.control-chip.is-focused::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 2px solid rgba(219, 242, 255, 0.92);
  border-radius: 20px;
}

.chip-title {
  display: block;
  font-weight: 600;
}

.chip-meta {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.control-notes {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.88rem;
}

.control-notes p {
  margin: 6px 0;
}

.prototype-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.tv-screen-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
}

.tv-screen {
  position: relative;
  width: min(100vw - 460px, calc((100vh - 56px) * 16 / 9));
  height: min(calc((100vw - 460px) * 9 / 16), 100vh - 56px);
  max-width: 1600px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 34px;
  background: #000;
  box-shadow:
    0 18px 70px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.05);
}

.screen-backdrop,
.screen-vignette,
.power-off-state,
.tv-ui,
.overlay,
.debug-panel {
  position: absolute;
  inset: 0;
}

.screen-backdrop {
  opacity: 0;
  background:
    radial-gradient(circle at 50% 100%, rgba(76, 170, 194, 0.28), transparent 34%),
    radial-gradient(circle at 50% 14%, rgba(255, 255, 255, 0.08), transparent 26%),
    linear-gradient(180deg, #04080c 0%, #0a1016 30%, #10161c 73%, #091017 100%);
  transition: opacity var(--power-on-duration) ease;
}

.screen-vignette {
  opacity: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5, 8, 12, 0.24), transparent 14%, transparent 80%, rgba(4, 7, 10, 0.3)),
    radial-gradient(circle at top right, rgba(66, 83, 119, 0.16), transparent 20%);
  transition: opacity var(--power-on-duration) ease;
}

.tv-screen.is-on .screen-backdrop,
.tv-screen.is-on .screen-vignette {
  opacity: 1;
}

.power-off-state {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  text-align: center;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.03), transparent 35%),
    #000;
}

.off-core {
  width: 22%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(146, 232, 255, 0.1), transparent 62%),
    radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent 14%);
  filter: blur(8px);
}

.off-label {
  margin: 0;
  font-size: clamp(1.5rem, 1.8vw, 2rem);
  letter-spacing: 0.08em;
}

.off-copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
}

.hidden {
  display: none !important;
}

.tv-ui {
  padding: 2.3% 3.8% 2.1%;
  opacity: 0;
  transform: scale(0.996);
  transition:
    opacity var(--power-on-duration) ease,
    transform var(--power-on-duration) ease;
}

.tv-screen.is-on .tv-ui {
  opacity: 1;
  transform: scale(1);
}

.menu-strip {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75%;
  min-height: 17%;
  padding: 0 0.2%;
}

.menu-item {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  color: rgba(255, 255, 255, 0.78);
  transition: transform var(--focus-duration) ease;
}

.menu-item.is-focused {
  transform: scale(var(--focus-scale));
  z-index: 2;
}

.menu-icon-wrap {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
}

.menu-icon {
  width: clamp(34px, 3vw, 54px);
  height: clamp(34px, 3vw, 54px);
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.menu-item.service-tab .menu-icon {
  background: rgba(255, 255, 255, 0.02);
}

.menu-item.is-focused .menu-icon,
.menu-item.is-active .menu-icon {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 247, 255, 0.94));
  color: #071018;
  border-color: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34);
}

.menu-glyph {
  position: relative;
  width: 56%;
  height: 56%;
}

.menu-glyph::before,
.menu-glyph::after,
.menu-glyph span {
  content: "";
  position: absolute;
  display: block;
  background: currentColor;
}

.glyph-profile::before {
  inset: 6% 28% auto;
  height: 34%;
  border-radius: 50%;
}

.glyph-profile::after {
  left: 16%;
  right: 16%;
  bottom: 6%;
  height: 34%;
  border-radius: 999px 999px 40% 40%;
}

.glyph-search::before {
  inset: 6% 16% 20% 6%;
  border: 3px solid currentColor;
  border-radius: 50%;
  background: transparent;
}

.glyph-search::after {
  width: 24%;
  height: 10%;
  right: 4%;
  bottom: 8%;
  transform: rotate(44deg);
  border-radius: 999px;
}

.glyph-devices::before {
  inset: 12% 8%;
  border: 3px solid currentColor;
  border-radius: 8px;
  background: transparent;
}

.glyph-devices::after {
  left: 34%;
  right: 34%;
  bottom: 4%;
  height: 10%;
  border-radius: 999px;
}

.glyph-settings::before {
  inset: 24%;
  border: 3px solid currentColor;
  border-radius: 50%;
  background: transparent;
}

.glyph-settings::after {
  inset: 6%;
  border-radius: 50%;
  background:
    conic-gradient(from 0deg, currentColor 0 8%, transparent 8% 16%, currentColor 16% 24%, transparent 24% 32%, currentColor 32% 40%, transparent 40% 48%, currentColor 48% 56%, transparent 56% 64%, currentColor 64% 72%, transparent 72% 80%, currentColor 80% 88%, transparent 88% 96%, currentColor 96% 100%);
  mask: radial-gradient(circle, transparent 42%, #000 43%);
}

.glyph-shield::before {
  left: 22%;
  right: 22%;
  top: 6%;
  bottom: 10%;
  clip-path: polygon(50% 0%, 100% 14%, 100% 54%, 50% 100%, 0% 54%, 0% 14%);
  border: 3px solid currentColor;
  background: transparent;
}

.glyph-shield::after {
  left: 44%;
  right: 44%;
  top: 24%;
  bottom: 26%;
}

.glyph-ai::before {
  inset: 16%;
  border-radius: 50%;
  border: 3px solid currentColor;
  background: transparent;
}

.glyph-ai::after {
  left: 45%;
  right: 45%;
  top: 8%;
  bottom: 8%;
}

.glyph-home::before {
  left: 16%;
  right: 16%;
  bottom: 8%;
  top: 38%;
  border: 3px solid currentColor;
  border-top: none;
  background: transparent;
}

.glyph-home::after {
  left: 12%;
  right: 12%;
  top: 8%;
  height: 42%;
  transform: skewY(-32deg);
  border-top: 3px solid currentColor;
  border-right: 3px solid currentColor;
  background: transparent;
}

.glyph-live::before,
.glyph-live::after,
.glyph-live span {
  border-radius: 999px;
}

.glyph-live::before {
  left: 8%;
  top: 46%;
  width: 20%;
  height: 10%;
}

.glyph-live::after {
  left: 32%;
  top: 34%;
  width: 20%;
  height: 22%;
}

.glyph-live span {
  left: 56%;
  top: 20%;
  width: 20%;
  height: 36%;
}

.glyph-game::before {
  left: 10%;
  right: 10%;
  top: 24%;
  bottom: 20%;
  border-radius: 20px;
  border: 3px solid currentColor;
  background: transparent;
}

.glyph-game::after {
  left: 24%;
  top: 44%;
  width: 14%;
  height: 10%;
  border-radius: 999px;
}

.glyph-game span {
  right: 24%;
  top: 42%;
  width: 10%;
  height: 10%;
  border-radius: 50%;
  box-shadow:
    -18px 0 0 currentColor,
    -9px 9px 0 currentColor,
    -9px -9px 0 currentColor;
}

.glyph-art::before {
  left: 12%;
  right: 12%;
  top: 18%;
  bottom: 16%;
  border: 3px solid currentColor;
  border-radius: 14px;
  background: transparent;
}

.glyph-art::after {
  left: 20%;
  right: 20%;
  bottom: 24%;
  height: 28%;
  clip-path: polygon(0% 100%, 24% 38%, 44% 72%, 62% 22%, 100% 100%);
}

.glyph-daily::before {
  inset: 18%;
  border: 3px solid currentColor;
  border-radius: 12px;
  background: transparent;
}

.glyph-daily::after {
  left: 24%;
  right: 24%;
  top: 40%;
  height: 10%;
  box-shadow:
    0 14px 0 currentColor,
    0 -14px 0 currentColor;
}

.glyph-apps::before {
  left: 14%;
  top: 14%;
  width: 24%;
  height: 24%;
  border-radius: 9px;
  box-shadow:
    0 30px 0 currentColor,
    30px 0 0 currentColor,
    30px 30px 0 currentColor;
}

.glyph-apps::after {
  display: none;
}

.menu-label {
  min-height: 1.1rem;
  font-size: clamp(0.62rem, 0.84vw, 0.84rem);
  line-height: 1;
  text-align: center;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.menu-item.is-focused .menu-label {
  opacity: 1;
  transform: translateY(0);
}

.menu-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  min-width: 160px;
  padding: 10px 12px;
  border-radius: 16px;
  transform: translateX(-50%);
  background: rgba(11, 17, 23, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-soft);
  font-size: 0.8rem;
  backdrop-filter: blur(14px);
}

.menu-popover strong,
.menu-popover span {
  display: block;
}

.menu-popover span + span,
.menu-popover strong + span {
  margin-top: 5px;
}

.hero-band {
  display: grid;
  grid-template-columns: 1.15fr 0.9fr;
  gap: 1.2%;
  height: 29%;
  margin-top: 0.9%;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.8rem;
  padding: 1.4% 0.4% 0 0.6%;
}

.hero-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  padding: 0.38rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.78rem;
}

.hero-title {
  margin: 0;
  font-size: clamp(2rem, 2.95vw, 3.3rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.hero-description {
  max-width: 38ch;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.hero-cta {
  position: relative;
  width: fit-content;
  padding: 0.88rem 1.15rem;
  border-radius: 999px;
  background: rgba(249, 252, 255, 0.96);
  color: #071018;
  box-shadow: var(--shadow-soft);
  transition:
    transform var(--focus-duration) ease,
    box-shadow var(--focus-duration) ease;
}

.hero-cta.is-focused {
  transform: scale(var(--focus-scale));
  box-shadow: var(--shadow-strong);
}

.hero-cta.is-focused::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid rgba(255, 255, 255, 0.98);
  border-radius: inherit;
}

.hero-progress {
  width: 180px;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.hero-progress::after {
  content: "";
  display: block;
  width: 42%;
  height: 100%;
  background: linear-gradient(90deg, #8be4ff, #ffd79e);
}

.hero-visual {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background:
    linear-gradient(180deg, rgba(4, 8, 12, 0.06), rgba(4, 8, 12, 0.42)),
    var(--reference-image);
  background-size: 155% auto;
  background-position: 63% 48%;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(9, 13, 19, 0.18), rgba(9, 13, 19, 0.54)),
    radial-gradient(circle at 22% 32%, rgba(255, 196, 124, 0.18), transparent 26%);
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 -90px 90px rgba(7, 11, 15, 0.38);
}

.hero-caption {
  position: absolute;
  left: 24px;
  bottom: 20px;
  z-index: 1;
}

.hero-caption strong,
.hero-caption span {
  display: block;
}

.hero-caption strong {
  font-size: 1.6rem;
}

.hero-caption span {
  margin-top: 0.3rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.78rem;
}

.content-band {
  margin-top: 1.5%;
}

.content-headings {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1%;
  margin-bottom: 0.65rem;
}

.content-heading {
  font-size: 0.94rem;
  font-weight: 600;
}

.content-heading.subtle {
  color: rgba(255, 255, 255, 0.84);
}

.card-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1%;
  align-items: start;
}

.card-slot {
  position: relative;
  min-width: 0;
}

.content-card {
  position: relative;
  transition: transform var(--focus-duration) ease;
}

.content-card.is-focused {
  transform: scale(var(--focus-scale));
  z-index: 2;
}

.card-surface {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--card-radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.16)),
    var(--reference-image);
  background-size: 220% auto;
  box-shadow: var(--shadow-soft);
  transition:
    transform var(--focus-duration) ease,
    box-shadow var(--focus-duration) ease,
    border-color var(--focus-duration) ease;
}

.content-card.is-focused .card-surface {
  border-color: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-strong);
}

.content-card.is-focused .card-surface::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid rgba(255, 255, 255, 0.98);
  border-radius: inherit;
}

.card-surface::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 42%, rgba(5, 8, 12, 0.62)),
    radial-gradient(circle at 25% 25%, rgba(255, 220, 164, 0.12), transparent 18%);
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.68rem;
}

.card-title-inline {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 13px;
  z-index: 1;
  margin: 0;
  font-size: 1rem;
  line-height: 1.22;
}

.card-info {
  min-height: 1.35rem;
  padding: 0.45rem 0.2rem 0;
}

.info-title {
  opacity: 0;
  transform: translateY(-6px);
  font-size: 0.88rem;
  font-weight: 600;
  transition: opacity 120ms ease, transform 120ms ease;
}

.content-card.is-focused.show-title .info-title {
  opacity: 1;
  transform: translateY(0);
}

.apps-band {
  margin-top: 1.6%;
}

.apps-label {
  margin-bottom: 0.65rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.app-row {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 0.8%;
}

.app-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  min-width: 0;
  padding: 12px 10px 10px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: var(--shadow-soft);
  transition:
    transform var(--focus-duration) ease,
    box-shadow var(--focus-duration) ease,
    border-color var(--focus-duration) ease;
}

.app-tile.is-focused {
  transform: scale(var(--focus-scale));
  border-color: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-strong);
}

.app-tile.is-focused::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid rgba(255, 255, 255, 0.98);
  border-radius: inherit;
}

.app-monogram {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.82rem;
  font-weight: 700;
}

.app-name {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  font-size: 0.68rem;
  line-height: 1.18;
}

.overlay {
  z-index: 10;
}

.overlay-dim {
  position: absolute;
  inset: 0;
  background: rgba(2, 5, 8, 0.72);
  backdrop-filter: blur(10px);
}

.overlay-panel {
  position: absolute;
  top: 10%;
  right: 5.2%;
  width: min(36%, 460px);
  padding: 28px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(17, 23, 29, 0.96), rgba(10, 14, 18, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-strong);
  transform: translateX(24px);
  opacity: 0;
  transition:
    transform var(--overlay-duration) ease,
    opacity var(--overlay-duration) ease;
}

.overlay:not(.hidden) .overlay-panel {
  transform: translateX(0);
  opacity: 1;
}

.overlay-kicker {
  margin: 0 0 8px;
  color: #8be4ff;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.76rem;
}

.overlay-panel h2 {
  margin: 0;
  font-size: 2rem;
}

.overlay-panel p {
  line-height: 1.65;
}

.overlay-footer {
  color: var(--muted);
}

.debug-panel {
  z-index: 11;
  top: auto;
  left: auto;
  right: 18px;
  bottom: 18px;
  width: min(340px, 32%);
  padding: 16px;
  border-radius: 22px;
  background: rgba(8, 12, 16, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-soft);
  color: #dff1ff;
  font-size: 0.78rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

@media (max-width: 1200px) {
  body {
    overflow: auto;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .prototype-stage {
    order: -1;
  }

  .tv-screen {
    width: min(100vw - 32px, calc((100vh - 160px) * 16 / 9));
    height: min(calc((100vw - 32px) * 9 / 16), 100vh - 160px);
  }
}

@media (max-width: 980px) {
  .hero-band {
    grid-template-columns: 1fr;
    height: auto;
  }

  .content-headings,
  .card-row,
  .app-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .menu-strip {
    flex-wrap: wrap;
    gap: 10px 4px;
  }

  .menu-item {
    flex: 0 0 calc(16.66% - 4px);
  }
}
