:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-alt: #eef3f8;
  --text: #202124;
  --muted: #5f6368;
  --green: #01875f;
  --green-soft: #d7f0e7;
  --line: #dde3ea;
  --shadow: 0 8px 24px rgba(60, 64, 67, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Inter", sans-serif;
  background:
    radial-gradient(circle at 5% 10%, #ffffff 0%, #f5f7fb 42%),
    radial-gradient(circle at 95% 0%, #e9f7f2 0%, #f5f7fb 45%);
  color: var(--text);
}

h1,
h2,
h3,
p {
  margin: 0;
}

.play-shell {
  width: min(980px, 96vw);
  margin: 24px auto 40px;
}

.top-bar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.08);
  display: grid;
  gap: 14px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.play-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background:
    linear-gradient(45deg, #00d36f, #00a7f7),
    linear-gradient(135deg, #ffb400, #ff4d4f);
  clip-path: polygon(20% 10%, 90% 50%, 20% 90%, 20% 10%);
}

.brand-eyebrow {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-wrap h1 {
  font-size: 1.1rem;
  font-weight: 600;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-alt);
  border-radius: 999px;
  padding: 0 16px;
  min-height: 52px;
}

.search-icon {
  color: var(--muted);
}

.search-wrap input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.96rem;
}

.chip-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.chip {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  min-height: 36px;
  padding: 0 14px;
  white-space: nowrap;
  font-size: 0.86rem;
  cursor: pointer;
}

.chip.active {
  border-color: #9ed6c3;
  background: var(--green-soft);
  color: #005b40;
}

.apps-section {
  margin-top: 22px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-head h2 {
  font-size: 1.2rem;
  font-weight: 600;
}

.see-all {
  border: 0;
  background: transparent;
  color: var(--green);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.apps-grid {
  display: grid;
  gap: 12px;
}

.app-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: transform 130ms ease, box-shadow 130ms ease;
}

.app-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.app-icon,
.modal-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: #e8edf3;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-weight: 700;
  color: #3c4043;
}

.app-icon img,
.modal-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-meta {
  min-width: 0;
}

.app-card h3 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.app-card p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.84rem;
}

.app-rating {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.btn-primary,
.btn-ghost {
  border: 0;
  border-radius: 999px;
  min-height: 36px;
  padding: 0 16px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  background: var(--green);
  color: #fff;
}

.btn-ghost {
  background: #e8f1ed;
  color: #005b40;
}

.btn-primary:hover,
.btn-ghost:hover,
.chip:hover,
.see-all:hover {
  filter: brightness(0.97);
}

.placeholder {
  background: var(--surface);
  border: 1px dashed #bcc7d3;
  border-radius: 14px;
  padding: 18px;
  color: var(--muted);
}

.modal {
  padding: 0 !important;
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(32, 33, 36, 0.46);
}

.modal.show {
  display: grid;
}

.modal-card {
  width: min(720px, 96vw);
  background: var(--surface);
  border-radius: 24px;
  border: 1px solid var(--line);
  padding: 20px;
  box-shadow: 0 24px 50px rgba(32, 33, 36, 0.28);
  position: relative;
}

.close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: #edf1f5;
  color: #3c4043;
  font-size: 1rem;
  cursor: pointer;
}

.modal-header {
  display: flex;
  gap: 12px;
  align-items: center;
}

.modal-header h3 {
  font-size: clamp(1.2rem, 3.6vw, 1.8rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.modal-header p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.9rem;
}

.modal-stats {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-stats > div {
  border-radius: 999px;
  background: var(--surface-alt);
  color: #3c4043;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 12px;
}

.modal-description {
  margin-top: 14px;
  color: #3c4043;
  line-height: 1.55;
}

.modal-details {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  background: var(--surface-alt);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 0.85rem;
}

.modal-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-primary:focus-visible,
.btn-ghost:focus-visible,
.close-btn:focus-visible,
.search-wrap input:focus-visible,
.chip:focus-visible,
.see-all:focus-visible {
  outline: 3px solid #8ad7bb;
  outline-offset: 2px;
}

@media (max-width: 700px) {
  .play-shell {
    margin: 14px auto 22px;
  }

  .top-bar {
    border-radius: 18px;
    padding: 14px;
  }

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

  .app-card .btn-primary {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .modal-actions {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
