/* ==========================================================================
   miApps Store — Material 3 Flat Design System
   Official Android Marketplace for the miCommunity Ecosystem
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200');

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --surface-container: #f1f3f4;
  --surface-high: #e8eaed;
  --surface-highest: #dfe1e5;
  --text-primary: #1f1f1f;
  --text-secondary: #5f6368;
  --text-muted: #80868b;
  --border-color: rgba(0, 0, 0, 0.08);
  --border-subtle: rgba(0, 0, 0, 0.04);

  /* miCommunity Brand Violet Accent (#7c3aed - Uniform Unified Accent) */
  --accent-solid: #7c3aed;
  --accent-solid-hover: #6d28d9;
  --accent-solid-active: #5b21b6;
  --accent-solid-text: #ffffff;
  --accent-solid-light: #ede9fe;
  --accent-solid-light-text: #5b21b6;

  /* Secondary & Store Tokens */
  --accent-secondary: #7c3aed;
  --accent-secondary-light: rgba(124, 58, 237, 0.12);
  --store-install: #10b981;
  --store-install-hover: #059669;
  --store-install-container: rgba(16, 185, 129, 0.14);

  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.12);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.12);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.12);

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-2xl: 28px;
  --radius-full: 9999px;

  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --header-height: 64px;
  --safe-top: env(safe-area-inset-top, 0px);
  --bottom-nav-height: 60px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 14px 40px rgba(0, 0, 0, 0.14);
}

/* ── System / Device Theme Media Query (Auto Device Synchronization) ── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-primary: #121212;
    --bg-secondary: #181818;
    --surface-container: #222222;
    --surface-high: #2c2c2c;
    --surface-highest: #363636;
    --text-primary: #f2f2f2;
    --text-secondary: #9aa0a6;
    --text-muted: #70757a;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-subtle: rgba(255, 255, 255, 0.04);

    --accent-solid: #8b5cf6;
    --accent-solid-hover: #a78bfa;
    --accent-solid-active: #7c3aed;
    --accent-solid-text: #ffffff;
    --accent-solid-light: rgba(124, 58, 237, 0.22);
    --accent-solid-light-text: #ddd6fe;

    --accent-secondary: #8b5cf6;
    --accent-secondary-light: rgba(124, 58, 237, 0.22);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 14px 40px rgba(0, 0, 0, 0.6);
  }
}

[data-theme="dark"] {
  --bg-primary: #121212;
  --bg-secondary: #181818;
  --surface-container: #222222;
  --surface-high: #2c2c2c;
  --surface-highest: #363636;
  --text-primary: #f2f2f2;
  --text-secondary: #9aa0a6;
  --text-muted: #70757a;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.04);

  --accent-solid: #8b5cf6;
  --accent-solid-hover: #a78bfa;
  --accent-solid-active: #7c3aed;
  --accent-solid-text: #ffffff;
  --accent-solid-light: rgba(124, 58, 237, 0.22);
  --accent-solid-light-text: #ddd6fe;

  --accent-secondary: #8b5cf6;
  --accent-secondary-light: rgba(124, 58, 237, 0.22);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 14px 40px rgba(0, 0, 0, 0.6);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

/* ── Custom miCommunity Accent Scrollbars ── */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 58, 237, 0.35) transparent;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(124, 58, 237, 0.3);
  border-radius: 9999px;
  transition: background-color 0.15s ease;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--accent-solid);
}

html, body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  /* Extra bottom padding on mobile so fixed bottom navbar doesn't cover content */
  padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 16px));
}

@media (min-width: 841px) {
  body {
    padding-bottom: 0;
  }
}

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

/* ── Top Header Navigation ── */
.store-header {
  box-sizing: border-box;
  /* iPhone notch / Dynamic Island safe area (status bar is black-translucent in PWA) */
  min-height: calc(var(--header-height) + var(--safe-top));
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: max(8px, var(--safe-top));
  padding-bottom: 8px;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
  position: sticky;
  top: 0;
  z-index: 100;
}

.store-header-left {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}

.store-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.store-logo-img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.store-nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
}

.store-nav-link {
  padding: 8px 16px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  transition: all 0.15s ease;
  position: relative;
}

.store-nav-link:hover {
  color: var(--text-primary);
  background: var(--surface-container);
}

.store-nav-link.active {
  color: var(--accent-solid);
  font-weight: 800;
}

.store-nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 16px;
  right: 16px;
  height: 3px;
  background: var(--accent-solid);
  border-radius: var(--radius-full);
}

.store-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ── Search Bar ── */
.store-search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--surface-container);
  border-radius: var(--radius-full);
  padding: 0 14px;
  height: 40px;
  width: 260px;
  transition: width 0.2s ease, background 0.15s ease;
}

.store-search-box:focus-within {
  width: 320px;
  background: var(--surface-high);
}

.store-search-box input {
  border: none;
  background: transparent;
  width: 100%;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text-primary);
  outline: none;
  padding-left: 8px;
}

/* Mobile full-width expandable search bar */
.mobile-search-bar {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  box-sizing: border-box;
  height: calc(var(--header-height) + var(--safe-top));
  background: var(--bg-primary);
  align-items: center;
  padding: var(--safe-top) 16px 0;
  gap: 12px;
  z-index: 105;
  box-shadow: var(--shadow-sm);
}

.mobile-search-bar.active {
  display: flex;
}

.mobile-search-input {
  flex: 1;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--surface-container);
  border: none;
  outline: none;
  padding: 0 16px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-primary);
}

.store-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.store-icon-btn:hover {
  background: var(--surface-container);
  color: var(--text-primary);
}

/* ── Avatar Trigger Button (Top Right) ── */
.m3-avatar-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-container);
  border: 1px solid var(--border-color);
  padding: 3px 12px 3px 4px;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.m3-avatar-btn:hover {
  background: var(--surface-high);
}

.m3-avatar-circle {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  background: var(--accent-solid);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12.5px;
  overflow: hidden;
}

.m3-avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.m3-btn-solid {
  background-color: var(--accent-solid);
  color: var(--accent-solid-text) !important;
  font-weight: 700;
  font-size: 13.5px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
  font-family: inherit;
  white-space: nowrap;
}

.m3-btn-solid:hover {
  background-color: var(--accent-solid-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* ── Google Play Style Account Popover Dialog (from screenshot) ── */
:root {
  --play-dialog-bg: #ecefe6;
  --play-card-bg: #ffffff;
  --play-border: rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] {
  --play-dialog-bg: #282a27;
  --play-card-bg: #1f211e;
  --play-border: rgba(255, 255, 255, 0.08);
}

.play-account-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  z-index: 1200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.play-account-backdrop.active {
  display: flex;
}

.play-account-dialog {
  background: var(--play-dialog-bg);
  width: 100%;
  max-width: 395px;
  border-radius: 28px;
  padding: 20px 18px 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--play-border);
  position: relative;
  margin: 20px auto 40px;
  animation: playDialogIn 0.22s cubic-bezier(0.1, 0.9, 0.2, 1);
}

@keyframes playDialogIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (min-width: 900px) {
  .play-account-backdrop {
    background: rgba(0, 0, 0, 0.2);
    justify-content: flex-end;
    padding: 0;
  }
  .play-account-dialog {
    position: absolute;
    top: 64px;
    right: 24px;
    margin: 0;
    max-width: 380px;
  }
}

.play-account-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: background 0.15s ease;
}

.play-account-close-btn:hover {
  background: var(--surface-high);
  color: var(--text-primary);
}

.play-account-email {
  text-align: center;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 16px;
  padding: 0 36px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.play-account-avatar-wrap {
  position: relative;
  width: 78px;
  height: 78px;
  margin: 0 auto 10px;
}

.play-account-large-avatar {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: var(--accent-solid);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 800;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.play-account-large-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-account-camera-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: #1f1f1f;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  transition: transform 0.15s ease;
}

.play-account-camera-badge:hover {
  transform: scale(1.08);
}

.play-account-camera-badge .material-symbols-outlined {
  font-size: 14px;
}

.play-account-greeting {
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  margin-bottom: 12px;
}

.play-account-manage-btn {
  display: inline-block;
  padding: 7px 22px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(120, 120, 120, 0.4);
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.play-account-manage-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: var(--accent-solid);
}

[data-theme="dark"] .play-account-manage-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Switch Account Card (Matching Google Play pill container) */
.play-account-switch-card {
  background: var(--play-card-bg);
  border: 1px solid var(--play-border);
  border-radius: 22px;
  padding: 12px 18px;
  margin-bottom: 16px;
  transition: background 0.15s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.play-account-switch-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.play-account-other-list {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.play-account-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 10px;
  transition: background 0.15s ease;
}

.play-account-row:hover {
  background: var(--surface-container);
}

/* Section label (Matching screenshot 'More from Google Play') */
.play-account-section-heading {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 14px 0 8px 8px;
}

/* Card Block Containers (Matching Google Play grouped cards) */
.play-account-card-block {
  background: var(--play-card-bg);
  border: 1px solid var(--play-border);
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.play-account-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
  text-decoration: none;
  color: var(--text-primary);
  transition: background 0.15s ease;
  border-bottom: 1px solid var(--play-border);
}

.play-account-item:last-child {
  border-bottom: none;
}

.play-account-item:hover {
  background: var(--surface-container);
}

.play-item-icon {
  font-size: 21px;
  color: var(--text-secondary);
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.play-item-content {
  flex: 1;
  min-width: 0;
}

.play-item-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.play-item-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* ── Material 3 Toggle Switch for Dark Theme ── */
.m3-switch {
  width: 44px;
  height: 24px;
  border-radius: var(--radius-full);
  background: var(--surface-high);
  border: 1.5px solid var(--border-color);
  position: relative;
  transition: background 0.2s ease, border-color 0.2s ease;
  margin-left: auto;
  flex-shrink: 0;
  pointer-events: none;
}

.m3-switch-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-secondary);
  position: absolute;
  top: 2.5px;
  left: 3px;
  transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), background 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .m3-switch {
  background: var(--accent-solid);
  border-color: var(--accent-solid);
}

[data-theme="dark"] .m3-switch-thumb {
  transform: translateX(18px);
  background: #ffffff;
}

.play-item-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 2px 7px;
  border-radius: 9999px;
  background: var(--surface-high);
  margin-left: auto;
}

.play-account-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 16px;
}

.play-account-footer a {
  color: var(--text-muted);
}

.play-account-footer a:hover {
  text-decoration: underline;
  color: var(--text-secondary);
}

/* ── Mobile Bottom Navigation Bar (Play Store Style from screenshot) ── */
.store-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--bottom-nav-height) + max(8px, env(safe-area-inset-bottom, 0px)));
  padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 990;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.04);
}

/* ── iPhone Notch & Dynamic Island Safe Area Support ── */
@supports (-webkit-touch-callout: none) {
  .store-header {
    padding-top: max(12px, env(safe-area-inset-top));
  }
  .store-bottom-nav {
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }
  .play-app-hero-wrap {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  .store-catalog-main {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
}

@media (min-width: 841px) {
  .store-bottom-nav {
    display: none !important;
  }
}

.bottom-nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  gap: 3px;
}

.bottom-nav-tab .nav-icon-pill {
  width: 52px;
  height: 28px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}

.bottom-nav-tab .material-symbols-outlined {
  font-size: 22px;
}

.bottom-nav-tab .nav-label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1px;
}

.bottom-nav-tab.active {
  color: var(--accent-solid);
}

.bottom-nav-tab.active .nav-icon-pill {
  background: var(--accent-solid-light);
  color: var(--accent-solid);
}

.bottom-nav-tab.active .nav-label {
  font-weight: 800;
  color: var(--text-primary);
}

/* ── Device Filter Chips Bar ── */
.device-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-primary);
  scrollbar-width: none;
}

.device-filter-bar::-webkit-scrollbar {
  display: none;
}

.device-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  background: var(--surface-container);
  border: 1px solid var(--border-color);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.device-chip:hover {
  background: var(--surface-high);
  color: var(--text-primary);
}

.device-chip.active {
  background: var(--accent-solid-light);
  border-color: var(--accent-solid);
  color: var(--accent-solid);
  font-weight: 700;
}

.device-chip .material-symbols-outlined {
  font-size: 17px;
}

/* ── Unauthenticated Welcome / Sign In Hero Gate ── */
.auth-gate-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 160px);
  min-height: calc(100dvh - 160px);
  padding: 32px 20px;
}

.auth-hero-card {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  background: transparent;
  border: none;
  border-radius: var(--radius-xl);
  padding: 44px 32px;
  text-align: center;
  position: relative;
  animation: fadeIn 0.3s ease;
}

.auth-hero-logo {
  width: 92px;
  height: 92px;
  margin: 0 auto 24px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
}

.auth-hero-logo img {
  width: 68px;
  height: 68px;
  object-fit: contain;
}

.auth-hero-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.auth-hero-desc {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 380px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

@media (max-width: 600px) {
  .auth-gate-wrapper {
    min-height: calc(100vh - 120px);
    min-height: calc(100dvh - 120px);
    padding: 24px 16px;
  }
  .auth-hero-card {
    padding: 36px 20px;
    border-radius: var(--radius-lg);
  }
  .auth-hero-logo {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    margin-bottom: 20px;
  }
  .auth-hero-logo img {
    width: 58px;
    height: 58px;
  }
  .auth-hero-title {
    font-size: 21px;
  }
}

/* ── Empty State Card ── */
.store-empty-card {
  background: var(--surface-container);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 56px 24px;
  text-align: center;
  max-width: 680px;
  margin: 40px auto;
}

.store-empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent-solid-light);
  color: var(--accent-solid);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 32px;
}

/* ── Spotlight Featured Banners Carousel ── */
#spotlight-section {
  max-width: 1400px;
  margin: 18px auto 6px;
  padding: 0 20px;
}

.spotlight-carousel-container {
  position: relative;
  width: 100%;
}

.spotlight-carousel {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 4px 16px 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.spotlight-carousel::-webkit-scrollbar {
  display: none;
}

/* If single spotlight app, center it cleanly on desktop */
.spotlight-carousel.single-item {
  justify-content: center;
}

/* ── DEFINED SPOTLIGHT CARD DIMENSIONS (Constant across all screens) ── */
.spotlight-card {
  position: relative;
  flex: 0 0 clamp(480px, 60vw, 840px);
  width: clamp(480px, 60vw, 840px);
  aspect-ratio: 2.05 / 1; /* Exactly matches 1024x500 Feature Graphic (1024/500 = 2.048) */
  border-radius: 24px;
  overflow: hidden;
  cursor: pointer;
  scroll-snap-align: center;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--border-color);
  background: #0d0d10;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  user-select: none;
}

.spotlight-carousel.single-item .spotlight-card {
  flex: 0 1 840px;
  width: 100%;
  max-width: 840px;
  aspect-ratio: 2.05 / 1;
}

/* 1. Ambient Blurred Backdrop Layer */
.spotlight-ambient-blur {
  position: absolute;
  inset: -24px;
  background-size: cover;
  background-position: center;
  filter: blur(32px) brightness(0.42) saturate(1.4);
  transform: scale(1.1);
  z-index: 1;
  pointer-events: none;
}

/* 2. Foreground Feature Graphic (object-fit: contain ensures 100% of user image is shown without truncation) */
.spotlight-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  z-index: 2;
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.spotlight-card:hover .spotlight-bg-img {
  transform: scale(1.02);
}

/* 3. Scrim Gradient for text legibility without obscuring the artwork */
.spotlight-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0) 30%,
    rgba(0, 0, 0, 0) 55%,
    rgba(0, 0, 0, 0.65) 82%,
    rgba(0, 0, 0, 0.92) 100%
  );
  z-index: 3;
  pointer-events: none;
}

/* 4. Top Subtle Spotlight Chip Badge */
.spotlight-top-badge {
  position: relative;
  z-index: 4;
  padding: 16px 20px 0;
  display: flex;
  align-items: center;
}

.spotlight-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.spotlight-badge .material-symbols-outlined {
  font-size: 14px;
  color: #fbbf24;
}

/* 5. Bottom Frosted Glass Dock */
.spotlight-dock {
  position: relative;
  z-index: 4;
  margin-top: auto;
  width: 100%;
  box-sizing: border-box;
  padding: 14px 20px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(10, 10, 12, 0.72) 40%, rgba(10, 10, 12, 0.94) 100%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.spotlight-app-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.spotlight-app-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.spotlight-meta-info {
  min-width: 0;
}

.spotlight-app-title {
  font-size: 15.5px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.spotlight-app-extra {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.82);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.spotlight-rating-pill {
  background: rgba(255, 255, 255, 0.16);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 600;
}

.btn-install {
  padding: 9px 24px;
  border-radius: var(--radius-full);
  background: var(--accent-solid);
  color: #ffffff;
  font-weight: 700;
  font-size: 13.5px;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-install:hover {
  background: var(--accent-solid-hover);
  transform: translateY(-1px);
}

/* Nav Buttons for Desktop Carousel */
.spotlight-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease, background 0.15s ease;
}

.spotlight-nav-btn:hover {
  transform: translateY(-50%) scale(1.08);
  background: var(--surface-high);
}

.spotlight-nav-btn.prev {
  left: -14px;
}

.spotlight-nav-btn.next {
  right: -14px;
}

/* ── Mobile Responsive Refinements ── */
@media (max-width: 768px) {
  #spotlight-section {
    padding: 8px 16px 0;
  }

  .spotlight-carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 20px;
  }

  .spotlight-carousel {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 0;
    margin: 0;
    scrollbar-width: none;
  }

  .spotlight-card,
  .spotlight-carousel.single-item .spotlight-card {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 200px;
    border-radius: 20px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    box-sizing: border-box;
    overflow: hidden;
  }

  .spotlight-dock {
    margin-top: auto;
    padding: 10px 14px 12px;
    gap: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    background: linear-gradient(180deg, transparent 0%, rgba(13, 15, 23, 0.65) 25%, rgba(13, 15, 23, 0.95) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
  }

  .spotlight-app-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
  }

  .spotlight-meta-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
  }

  .spotlight-app-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    flex-shrink: 0;
    object-fit: cover;
  }

  .spotlight-app-title {
    font-size: 13.5px;
    font-weight: 800;
    line-height: 1.25;
    color: #ffffff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
    word-break: break-word;
  }

  .spotlight-app-extra {
    font-size: 11px;
    color: var(--text-secondary, #94a3b8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    margin-top: 2px;
  }

  .spotlight-rating-pill {
    display: none !important;
  }

  .btn-install {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
  }

  .spotlight-nav-btn {
    display: none !important;
  }
}

/* ── Section Rows & App Cards ── */
.store-section {
  padding: 24px 20px;
  max-width: 1400px;
  margin: 0 auto;
}

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

.section-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.4px;
}

.section-sub {
  font-size: 13px;
  color: var(--text-secondary);
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.app-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.app-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: var(--accent-solid);
}

.app-card-icon {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  background: var(--surface-container);
  flex-shrink: 0;
}

.app-card-info {
  flex: 1;
  min-width: 0;
}

.app-card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-card-dev {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.app-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.app-card-rating {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ── App Card "Get" Button & Secondary Buttons (Dark Mode & Light Mode Harmonized) ── */
.app-card-get-btn,
.app-card .btn-secondary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  border: 1px solid rgba(124, 58, 237, 0.2);
  background: rgba(124, 58, 237, 0.08);
  color: var(--accent-solid);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.2px;
  outline: none;
  text-decoration: none;
}

.app-card-get-btn:hover,
.app-card .btn-secondary:hover,
.btn-secondary:hover {
  background: var(--accent-solid);
  color: #ffffff;
  border-color: var(--accent-solid);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
}

.app-card-get-btn:active,
.app-card .btn-secondary:active,
.btn-secondary:active {
  transform: scale(0.96);
}

/* Dark Mode Harmonization */
[data-theme="dark"] .app-card-get-btn,
[data-theme="dark"] .app-card .btn-secondary,
[data-theme="dark"] .btn-secondary {
  background: rgba(139, 92, 246, 0.16) !important;
  color: #c4b5fd !important;
  border: 1px solid rgba(139, 92, 246, 0.35) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .app-card-get-btn:hover,
[data-theme="dark"] .app-card .btn-secondary:hover,
[data-theme="dark"] .btn-secondary:hover {
  background: var(--accent-solid) !important;
  color: #ffffff !important;
  border-color: var(--accent-solid) !important;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.45);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .app-card-get-btn,
  :root:not([data-theme="light"]) .app-card .btn-secondary,
  :root:not([data-theme="light"]) .btn-secondary {
    background: rgba(139, 92, 246, 0.16) !important;
    color: #c4b5fd !important;
    border: 1px solid rgba(139, 92, 246, 0.35) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  }

  :root:not([data-theme="light"]) .app-card-get-btn:hover,
  :root:not([data-theme="light"]) .app-card .btn-secondary:hover,
  :root:not([data-theme="light"]) .btn-secondary:hover {
    background: var(--accent-solid) !important;
    color: #ffffff !important;
    border-color: var(--accent-solid) !important;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.45);
  }
}

/* ══════════════════════════════════════════════════════════════════════
   GOOGLE PLAY STYLE APP DETAILS PAGE (FULL PAGE — NO MODAL BACKDROP)
   ══════════════════════════════════════════════════════════════════════ */

.store-page-view {
  animation: fadeIn 0.22s cubic-bezier(0.1, 0.9, 0.2, 1);
  width: 100%;
}

/* ── Top Back Navigation Bar ── */
.app-details-top-nav {
  position: sticky;
  top: calc(64px + var(--safe-top));
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 40;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.app-details-nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-details-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 12px 6px 6px;
  border-radius: var(--radius-full);
  transition: background 0.15s ease, color 0.15s ease;
}

.app-details-back-btn:hover {
  background: var(--surface-container);
  color: var(--accent-solid);
}

.app-details-nav-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 50%;
  display: none;
}

.app-details-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface-container);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.app-details-icon-btn:hover {
  background: var(--surface-high);
  color: var(--accent-solid);
}

/* ── 1. Full-Bleed Dark Hero Header (Matching Screenshot 1) ── */
.play-app-hero-wrap {
  position: relative;
  overflow: hidden;
  background: #111114;
  color: #ffffff;
  padding: 44px 24px 38px;
  border-bottom: 1px solid var(--border-color);
}

.play-app-hero-ambient {
  position: absolute;
  inset: -30px;
  background-size: cover;
  background-position: center;
  filter: blur(48px) brightness(0.28) saturate(1.5);
  transform: scale(1.15);
  z-index: 1;
  pointer-events: none;
}

.play-app-hero-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  position: relative;
  z-index: 2;
}

.play-app-hero-left {
  flex: 1;
  min-width: 0;
}

.play-app-hero-title {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.15;
  color: #ffffff;
  margin-bottom: 6px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.play-app-hero-dev {
  font-size: 15px;
  font-weight: 700;
  color: #a78bfa;
  margin-bottom: 4px;
}

.play-app-hero-dev a {
  color: inherit;
  text-decoration: none;
}
.play-app-hero-dev a:hover {
  text-decoration: underline;
}

.play-app-hero-subtags {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 26px;
}

/* Hero Metrics Row (Icon + Rating + Downloads + Rating Badge) */
.play-app-metrics-row {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.play-app-hero-icon {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.play-metric-divider {
  width: 1px;
  height: 32px;
  background: rgba(255, 255, 255, 0.2);
}

.play-metric-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.play-metric-val {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 4px;
  line-height: 1.2;
}

.play-metric-lbl {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 500;
}

.play-age-badge {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
}

/* Action Buttons (Install, Share, Wishlist) */
.play-app-hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.btn-play-install {
  background: var(--accent-solid);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  padding: 12px 38px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
  transition: all 0.15s ease;
}

.btn-play-install:hover {
  background: var(--accent-solid-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.45);
}

.btn-play-outline {
  background: transparent;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  padding: 11px 22px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.btn-play-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
}

.play-hero-compat-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 10px;
}

/* Hero Right: Feature Graphic / Trailer Artwork */
.play-app-hero-right {
  width: 480px;
  max-width: 46%;
  flex-shrink: 0;
}

.play-app-banner-card {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #000;
}

.play-app-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.play-app-trailer-btn {
  position: absolute;
  bottom: 14px;
  right: 14px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-full);
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.play-app-trailer-btn:hover {
  background: rgba(0, 0, 0, 0.85);
  transform: scale(1.04);
}

/* ── 2. Screenshots Carousel Section (Matching Screenshot 1) ── */
.play-screenshots-section {
  max-width: 1400px;
  margin: 36px auto 16px;
  padding: 0 24px;
  position: relative;
}

.play-screenshots-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.play-screenshots-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 4px 18px 4px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.play-screenshots-track::-webkit-scrollbar {
  display: none;
}

.play-screenshot-item {
  flex: 0 0 auto;
  height: 340px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
  background: var(--surface-container);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  scroll-snap-align: start;
}

.play-screenshot-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.play-screenshot-img {
  height: 100%;
  width: auto;
  object-fit: cover;
  display: block;
}

.play-screenshots-arrow-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  position: absolute;
  top: 55%;
  transform: translateY(-50%);
  right: 12px;
  z-index: 10;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease;
}

.play-screenshots-arrow-btn:hover {
  transform: translateY(-50%) scale(1.08);
  background: var(--surface-high);
}

/* ── 3. Main Content & Sidebar 2-Column Section (Screenshots 2, 3, 4) ── */
.play-details-layout {
  max-width: 1400px;
  margin: 24px auto 60px;
  padding: 0 24px;
}

.play-details-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 54px;
  align-items: flex-start;
}

.play-details-main-col {
  min-width: 0;
}

.play-details-sidebar-col {
  min-width: 0;
}

.play-section-block {
  padding-bottom: 36px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--border-subtle);
}

.play-section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 800;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
  margin-bottom: 16px;
  letter-spacing: -0.3px;
}

.play-section-heading:hover {
  color: var(--accent-solid);
}

.play-section-arrow {
  font-size: 20px;
  color: var(--text-secondary);
  transition: transform 0.15s ease;
}

.play-section-heading:hover .play-section-arrow {
  transform: translateX(4px);
  color: var(--accent-solid);
}

.play-desc-text {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.7;
  white-space: pre-wrap;
}

.play-updated-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 14px;
}

.play-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.play-tag-pill {
  padding: 7px 16px;
  border-radius: var(--radius-full);
  background: var(--surface-container);
  border: 1px solid var(--border-color);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.play-tag-pill:hover {
  background: var(--surface-high);
  border-color: var(--accent-solid);
  color: var(--accent-solid);
}

/* Data Safety Card (Matching Screenshot 2) */
.play-data-safety-card {
  background: var(--surface-container);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 24px;
  margin-top: 16px;
}

.play-safety-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.play-safety-row:last-of-type {
  border-bottom: none;
}

.play-safety-icon {
  font-size: 22px;
  color: var(--text-secondary);
  flex-shrink: 0;
  margin-top: 2px;
}

.play-safety-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.play-safety-sub {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.5;
}

.play-safety-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-solid);
  text-decoration: none;
  display: inline-block;
  margin-top: 14px;
}

.play-safety-link:hover {
  text-decoration: underline;
}

/* Ratings and Reviews Section (Matching Screenshot 3) */
.play-rev-chips {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  overflow-x: auto;
  scrollbar-width: none;
}

.play-rev-chip {
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: var(--surface-container);
  border: 1px solid var(--border-color);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.play-rev-chip.active {
  background: var(--accent-solid-light);
  border-color: var(--accent-solid);
  color: var(--accent-solid);
  font-weight: 700;
}

.play-rating-summary {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-bottom: 28px;
}

.play-rating-big {
  text-align: center;
}

.play-rating-num {
  font-size: 56px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -1px;
}

.play-rating-stars {
  display: flex;
  gap: 2px;
  justify-content: center;
  margin: 6px 0;
  color: #f59e0b;
}

.play-rating-count {
  font-size: 12px;
  color: var(--text-muted);
}

.play-rating-bars {
  flex: 1;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.play-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.play-bar-track {
  flex: 1;
  height: 10px;
  border-radius: 9999px;
  background: var(--surface-high);
  overflow: hidden;
}

.play-bar-fill {
  height: 100%;
  border-radius: 9999px;
  background: #01875f;
  transition: width 0.3s ease;
}

/* User Review Cards */
.play-review-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.play-review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.play-review-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #6366f1;
  color: #ffffff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.play-review-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.play-review-stars-date {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.play-review-text {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 10px;
}

.play-review-helpful {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

.btn-helpful {
  padding: 4px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-primary);
  transition: all 0.15s ease;
}

.btn-helpful:hover {
  background: var(--surface-container);
  border-color: var(--accent-solid);
}

/* Compose Review Form Card */
.play-review-compose-card {
  background: var(--surface-container);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 24px;
  margin: 20px 0;
}

.play-star-picker {
  display: flex;
  gap: 8px;
  margin: 12px 0 18px;
  cursor: pointer;
}

.play-star-picker span {
  font-size: 28px;
  color: #d1d5db;
  transition: color 0.15s ease, transform 0.15s ease;
}

.play-star-picker span.selected,
.play-star-picker span:hover {
  color: #f59e0b;
  transform: scale(1.15);
}

/* What's New Box (Matching Screenshot 4) */
.play-whats-new-box {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
}

.play-flag-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  margin-top: 18px;
}

.play-flag-btn:hover {
  color: var(--danger);
}

/* ── Right Sidebar Components ── */
.play-sidebar-card {
  background: var(--surface-container);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 24px;
}

.play-sidebar-section {
  margin-bottom: 32px;
}

.play-sidebar-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.play-sidebar-title:hover {
  color: var(--accent-solid);
}

.play-sidebar-app-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 8px;
  border-radius: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease;
}

.play-sidebar-app-item:hover {
  background: var(--surface-container);
}

.play-sidebar-app-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-subtle);
}

.play-support-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13px;
}

.play-support-item:last-of-type {
  border-bottom: none;
}

.play-support-icon {
  font-size: 20px;
  color: var(--text-secondary);
}

.play-support-link {
  color: var(--accent-solid);
  font-weight: 600;
  text-decoration: none;
  word-break: break-all;
}

.play-support-link:hover {
  text-decoration: underline;
}

/* ── Responsive Rules (Full Screen & Mobile Stack) ── */
@media (max-width: 900px) {
  .play-app-hero-wrap {
    padding: 24px 16px 28px;
  }

  .play-app-hero-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .play-app-hero-title {
    font-size: 28px;
  }

  .play-app-hero-right {
    width: 100%;
    max-width: 100%;
  }

  .play-screenshots-section {
    padding: 0 16px;
    margin: 24px auto 12px;
  }

  .play-screenshot-item {
    height: 240px;
  }

  .play-details-layout {
    padding: 0 16px;
  }

  .play-details-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .play-rating-summary {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .app-details-nav-title {
    display: block;
  }
}

@media (max-width: 768px) {
  .store-header {
    padding: var(--safe-top) 14px 0;
    height: calc(58px + var(--safe-top));
  }
  .mobile-search-bar {
    height: calc(58px + var(--safe-top));
  }
  .store-nav-links {
    display: none !important;
  }
  .store-search-box {
    display: none !important;
  }
  .mobile-search-trigger {
    display: flex !important;
  }
  .store-brand span {
    font-size: 17px;
  }
  .store-brand img {
    width: 28px;
    height: 28px;
  }
  .device-filter-bar {
    display: none !important;
  }
  .store-section {
    padding: 16px 14px;
  }
  .apps-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 769px) {
  .mobile-search-trigger {
    display: none !important;
  }
}

@keyframes modalScaleIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes mobilePageSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ── Hide the website footer on Mobile devices / PWAs (clean native app experience) ── */
@media (max-width: 900px),
       (display-mode: standalone),
       (display-mode: fullscreen),
       (display-mode: minimal-ui) {
  .store-site-footer {
    display: none !important;
  }
}

/* ── Material 3 Google Play Style Theme Selection Dialog ── */
.play-theme-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: m3FadeIn 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.play-theme-dialog {
  background: var(--bg-primary);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 380px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: m3ScaleIn 0.22s cubic-bezier(0.2, 0, 0, 1);
}

.play-theme-dialog-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.2px;
  padding: 0 4px;
}

.play-theme-options-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.play-theme-radio-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  user-select: none;
  border: 1.5px solid transparent;
}

.play-theme-radio-item:hover {
  background: var(--surface-container);
}

.play-theme-radio-item.active {
  background: var(--accent-solid-light);
  border-color: rgba(124, 58, 237, 0.35);
}

.play-theme-radio {
  width: 20px;
  height: 20px;
  accent-color: var(--accent-solid);
  cursor: pointer;
  flex-shrink: 0;
}

.play-theme-radio-info {
  flex: 1;
  min-width: 0;
}

.play-theme-radio-label {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.play-theme-radio-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.play-theme-radio-icon {
  font-size: 22px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.play-theme-radio-item.active .play-theme-radio-icon {
  color: var(--accent-solid);
}

.play-theme-dialog-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
}

.play-theme-dialog-actions button {
  background: transparent;
  border: none;
  color: var(--accent-solid);
  font-weight: 700;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.15s ease;
}

.play-theme-dialog-actions button:hover {
  background: var(--surface-container);
}

@keyframes m3FadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes m3ScaleIn {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ── eBooks Store Grid & Mobile-First Cards ── */
.ebooks-store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 20px;
  margin-top: 14px;
}

@media (max-width: 600px) {
  .ebooks-store-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

.ebook-store-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
}

.ebook-store-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(124, 58, 237, 0.35);
}

.ebook-cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-container);
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.ebook-cover-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.ebook-store-card:hover .ebook-cover-thumb {
  transform: scale(1.03);
}

.ebook-price-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(16, 185, 129, 0.95);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(4px);
}

.ebook-price-badge.free {
  background: rgba(100, 116, 139, 0.9);
}

.ebook-card-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.ebook-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ebook-card-author {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ebook-card-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-buy-ebook {
  margin-top: auto;
  width: 100%;
  padding: 8px 14px;
  background: var(--accent-solid);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn-buy-ebook:hover {
  background: var(--accent-solid-hover);
  transform: translateY(-1px);
}
