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

:root {
  --play-bg: #eff3f8;
  --play-surface: #ffffff;
  --play-border: rgba(15, 23, 42, 0.08);
  --play-text: #0f172a;
  --play-muted: rgba(15, 23, 42, 0.65);
  --play-accent: #1a73e8;
  --appstore-bg: #f5f5f7;
  --appstore-surface: #ffffff;
  --appstore-border: rgba(0, 0, 0, 0.08);
  --appstore-text: #1d1d1f;
  --appstore-muted: rgba(29, 29, 31, 0.65);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow-soft: 0 12px 45px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

img {
  display: block;
  max-width: 100%;
  border-radius: 16px;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
}

.play-body {
  background: var(--play-bg);
  color: var(--play-text);
  font-family: 'Roboto', 'Inter', sans-serif;
}

.appstore-body {
  background: var(--appstore-bg);
  color: var(--appstore-text);
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.store-topbar {
  padding: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  opacity: 0.7;
}

.play-body .store-topbar {
  color: var(--play-muted);
}

.appstore-body .store-topbar {
  color: var(--appstore-muted);
}

.store-container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 24px 16px 96px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.store-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(0, 0, 0, 0.02);
  padding: 24px;
}

.section-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.5rem;
}

.section-heading p {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(15, 23, 42, 0.7);
}

.play-app-card {
  display: grid;
  grid-template-columns: minmax(120px, 160px) 1fr;
  gap: 24px;
  align-items: flex-start;
}

.play-app-card img {
  border-radius: 24px;
}

.play-info h1 {
  margin: 0 0 4px;
  font-size: 1.8rem;
}

.play-developer {
  margin: 0;
  color: var(--play-muted);
}

.play-stats {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.play-stats li {
  min-width: 120px;
  display: flex;
  flex-direction: column;
}

.play-stats strong {
  font-size: 1.4rem;
}

.play-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.play-install {
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--play-accent);
  color: #fff;
  border: none;
  font-weight: 600;
}

.play-secondary {
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid var(--play-border);
  background: transparent;
  color: var(--play-text);
  font-weight: 600;
  cursor: pointer;
}

.play-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.store-chip {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 0.85rem;
  color: var(--play-muted);
}

.play-screen-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.play-highlights {
  padding-left: 20px;
  margin: 8px 0 0;
  color: var(--play-muted);
}

.agent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.agent-card {
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-md);
  padding: 16px;
}

.agent-card h3 {
  margin: 8px 0 4px;
  font-size: 1.1rem;
}

.agent-card p {
  margin: 0;
  color: var(--play-muted);
  font-size: 0.95rem;
}

.badge {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--play-accent);
}

.table-wrapper {
  overflow-x: auto;
}

.store-table {
  width: 100%;
  border-collapse: collapse;
}

.store-table th,
.store-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 0.9rem;
}

.store-table th {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--play-muted);
}

.store-table code {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  color: var(--play-accent);
}

.muted {
  color: var(--play-muted);
}

.appstore-hero {
  display: grid;
  grid-template-columns: minmax(120px, 160px) 1fr;
  gap: 24px;
}

.appstore-hero img {
  border-radius: 32px;
}

.appstore-info h1 {
  margin: 0;
  font-size: 2rem;
}

.appstore-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.appstore-meta span {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  color: var(--appstore-muted);
}

.appstore-meta strong {
  font-size: 1.5rem;
  color: var(--appstore-text);
}

.appstore-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.appstore-get {
  border-radius: 999px;
  padding: 10px 32px;
  background: var(--appstore-text);
  color: #fff;
  border: none;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.appstore-secondary {
  border-radius: 999px;
  padding: 10px 24px;
  border: 1px solid var(--appstore-border);
  background: transparent;
  color: var(--appstore-text);
}

.appstore-screen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
}

.appstore-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.review-card {
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-md);
  padding: 16px;
}

.review-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.review-card blockquote {
  margin: 0;
  color: rgba(0, 0, 0, 0.7);
  font-size: 0.95rem;
}

.review-card footer {
  margin-top: 12px;
  font-size: 0.85rem;
  color: rgba(0, 0, 0, 0.6);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.6);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 90;
}

.modal-overlay.is-visible {
  opacity: 1;
  pointer-events: all;
}

.modal-panel {
  position: fixed;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -40%) scale(0.96);
  background: #fff;
  border-radius: 32px;
  width: min(540px, calc(100% - 32px));
  padding: 28px;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
  z-index: 100;
}

.modal-panel.is-visible {
  opacity: 1;
  pointer-events: all;
  transform: translate(-50%, -50%) scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.modal-header button {
  border: none;
  background: transparent;
  font-size: 1.2rem;
  cursor: pointer;
}

.plan-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.plan-option {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-md);
  padding: 16px;
  position: relative;
  cursor: pointer;
}

.plan-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.plan-option.is-selected {
  border-color: var(--play-accent);
  box-shadow: 0 12px 30px rgba(26, 115, 232, 0.15);
}

.plan-option h4 {
  margin: 8px 0 4px;
}

.trial-toggle {
  margin-top: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.switch {
  position: relative;
  width: 42px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 999px;
  cursor: pointer;
}

.slider:before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

input:checked + .slider {
  background: var(--play-accent);
}

input:checked + .slider:before {
  transform: translateX(18px);
}

.form-field {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field input {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 0, 0, 0.15);
  padding: 12px;
  font-size: 1rem;
}

.modal-actions {
  margin-top: 18px;
  display: flex;
  gap: 12px;
}

.modal-actions .btn-primary,
.modal-actions .btn-outline {
  border-radius: 999px;
  padding: 10px 22px;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

.modal-actions .btn-primary {
  background: var(--play-accent);
  color: #fff;
}

.modal-actions .btn-outline {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #fff;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateY(12px);
  z-index: 120;
}

.toast.is-visible {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

[data-expandable] .expandable-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

[data-expandable].is-expanded .expandable-content {
  max-height: 800px;
}

[data-expandable] button {
  border-radius: 999px;
  padding: 8px 16px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: transparent;
  cursor: pointer;
  font-weight: 500;
}

@media (max-width: 720px) {
  .play-app-card,
  .appstore-hero {
    grid-template-columns: 1fr;
  }

  .play-app-card img,
  .appstore-hero img {
    max-width: 140px;
  }

  .store-card {
    padding: 20px;
  }
}
