/* ========================================
   Asset Manager — Modern Design System
   Premium UI · Glassmorphism · Micro-Animations
   ======================================== */

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

/* ---- CSS Variables (Light Mode) ---- */
:root {
  --bg: 210 20% 98%;
  --fg: 222 47% 11%;
  --card: 0 0% 100%;
  --card-fg: 222 47% 11%;
  --popover: 0 0% 100%;
  --popover-fg: 222 47% 11%;
  --primary: 152 76% 36%;
  --primary-fg: 0 0% 100%;
  --secondary: 214 20% 95%;
  --secondary-fg: 222 47% 11%;
  --muted: 214 20% 95%;
  --muted-fg: 215 16% 47%;
  --accent: 214 20% 95%;
  --accent-fg: 222 47% 11%;
  --destructive: 0 84% 60%;
  --destructive-fg: 0 0% 98%;
  --border: 214 20% 91%;
  --input: 214 20% 91%;
  --ring: 152 76% 36%;
  --radius: 0.75rem;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.04), 0 1px 3px rgb(0 0 0 / 0.03);
  --shadow: 0 2px 8px rgb(0 0 0 / 0.06), 0 1px 2px rgb(0 0 0 / 0.04);
  --shadow-md: 0 4px 16px rgb(0 0 0 / 0.08), 0 2px 4px rgb(0 0 0 / 0.04);
  --shadow-lg: 0 8px 32px rgb(0 0 0 / 0.1), 0 4px 8px rgb(0 0 0 / 0.05);
  --spring: cubic-bezier(0.16, 1, 0.3, 1);
  --glass: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.4);
}

/* ---- Dark Mode (Premium Navy) ---- */
.dark {
  --bg: 224 30% 7%;
  --fg: 210 40% 96%;
  --card: 224 25% 10%;
  --card-fg: 210 40% 96%;
  --popover: 224 25% 10%;
  --popover-fg: 210 40% 96%;
  --primary: 152 70% 48%;
  --primary-fg: 0 0% 100%;
  --secondary: 224 20% 14%;
  --secondary-fg: 210 40% 96%;
  --muted: 224 20% 14%;
  --muted-fg: 215 16% 57%;
  --accent: 224 20% 16%;
  --accent-fg: 210 40% 96%;
  --destructive: 0 63% 31%;
  --destructive-fg: 0 0% 98%;
  --border: 224 15% 16%;
  --input: 224 15% 16%;
  --ring: 152 72% 40%;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.2);
  --shadow: 0 2px 8px rgb(0 0 0 / 0.25);
  --shadow-md: 0 4px 16px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 8px 32px rgb(0 0 0 / 0.35);
  --glass: rgba(15, 20, 35, 0.7);
  --glass-border: rgba(255, 255, 255, 0.06);
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: hsl(var(--bg));
  color: hsl(var(--fg));
  line-height: 1.65;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.3s var(--spring), color 0.3s var(--spring);
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  cursor: pointer;
  font-family: inherit;
}

input,
select,
textarea {
  font-family: inherit;
}

/* ---- Scrollbar Hiding ---- */
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

/* ---- Typography ---- */
h1 {
  font-size: 1.875rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.text-sm {
  font-size: 0.875rem;
}

.text-xs {
  font-size: 0.75rem;
}

.text-lg {
  font-size: 1.125rem;
}

.text-2xl {
  font-size: 1.5rem;
}

.text-muted {
  color: hsl(var(--muted-fg));
}

.font-medium {
  font-weight: 500;
}

.font-semibold {
  font-weight: 600;
}

.font-bold {
  font-weight: 700;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- Layout ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-1 {
  gap: 0.25rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 0.75rem;
}

.gap-4 {
  gap: 1rem;
}

.gap-6 {
  gap: 1.5rem;
}

.grid {
  display: grid;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.w-full {
  width: 100%;
}

.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.fixed {
  position: fixed;
}

.overflow-hidden {
  overflow: hidden;
}

/* ---- Spacing ---- */
.p-2 {
  padding: 0.5rem;
}

.p-3 {
  padding: 0.75rem;
}

.p-4 {
  padding: 1rem;
}

.p-6 {
  padding: 1.5rem;
}

.px-3 {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.py-6 {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-3 {
  margin-bottom: 0.75rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

/* ---- Card ---- */
.card {
  background: hsl(var(--card));
  color: hsl(var(--card-fg));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.35s var(--spring), transform 0.35s var(--spring), border-color 0.3s;
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: hsl(var(--border) / 0.6);
}

/* ---- App Card (Top Charts Style) ---- */
.app-card-chart {
  display: flex;
  align-items: center;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  gap: 1rem;
  transition: transform 0.2s var(--spring), box-shadow 0.2s var(--spring), border-color 0.2s;
  text-decoration: none;
  color: inherit;
}

.app-card-chart:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: hsl(var(--border) / 0.8);
}

.app-card-chart-rank {
  font-size: 1rem;
  font-weight: 700;
  color: hsl(var(--muted-fg));
  min-width: 1.5rem;
  text-align: center;
}

.app-card-chart-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.875rem;
  background: hsl(var(--muted) / 0.5);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.app-card-chart-icon img,
.app-card-chart-icon svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.app-card-chart-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.app-card-chart-title {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: hsl(var(--fg));
}

.app-card-chart-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: hsl(var(--muted-fg));
}

.app-card-chart-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 1rem;
  background: hsl(152 76% 36%);
  color: white;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: none;
  transition: opacity 0.2s, transform 0.1s;
}

.app-card-chart-btn:hover {
  opacity: 0.9;
}

.app-card-chart-btn:active {
  transform: scale(0.96);
}

/* ---- Original App Card specific interior elements ---- */

.dark .card {
  border-color: hsl(var(--border));
  background: hsl(var(--card) / 0.8);
  box-shadow: var(--shadow-sm), inset 0 1px 0 var(--glass-border);
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
}

.card-header {
  padding: 1rem 1.25rem 0.5rem;
}

.card-content {
  padding: 0 1.25rem 1.25rem;
}

/* ---- Button ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.5rem 1.125rem;
  border-radius: var(--radius);
  border: none;
  transition: all 0.25s var(--spring);
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn:active:not(:disabled) {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--primary) / 0.85));
  color: hsl(var(--primary-fg));
  box-shadow: 0 2px 8px hsl(var(--primary) / 0.25);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 4px 16px hsl(var(--primary) / 0.35);
  filter: brightness(1.05);
}

.btn-secondary {
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-fg));
}

.btn-secondary:hover:not(:disabled) {
  background: hsl(var(--muted));
}

.btn-destructive {
  background: hsl(var(--destructive));
  color: hsl(var(--destructive-fg));
}

.btn-destructive:hover:not(:disabled) {
  filter: brightness(0.9);
}

.btn-ghost {
  background: transparent;
  color: hsl(var(--fg));
}

.btn-ghost:hover:not(:disabled) {
  background: hsl(var(--accent));
}

.btn-outline {
  background: transparent;
  color: hsl(var(--fg));
  border: 1px solid hsl(var(--border));
}

.btn-outline:hover:not(:disabled) {
  background: hsl(var(--accent));
}

.btn-sm {
  height: 2rem;
  padding: 0 0.75rem;
  font-size: 0.75rem;
}

.btn-lg {
  height: 2.75rem;
  padding: 0 1.5rem;
  font-size: 1rem;
}

.btn-icon {
  padding: 0.5rem;
  width: 2.25rem;
  height: 2.25rem;
}

.btn-rounded {
  border-radius: 9999px;
}

/* ---- Input ---- */
.input {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  background: hsl(var(--bg));
  color: hsl(var(--fg));
  border: 1px solid hsl(var(--input));
  border-radius: var(--radius);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.input:focus {
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 3px hsl(var(--ring) / 0.12), 0 1px 6px hsl(var(--ring) / 0.08);
}

.input::placeholder {
  color: hsl(var(--muted-fg));
}

textarea.input {
  min-height: 80px;
  resize: vertical;
}

select.input {
  appearance: auto;
}

.label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

/* ---- Badge ---- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
  border: 1px solid transparent;
}

.badge-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-fg));
}

.badge-secondary {
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-fg));
}

.badge-success {
  background: hsl(142 76% 36% / 0.1);
  color: hsl(142 76% 36%);
  border-color: hsl(142 76% 36% / 0.2);
}

.badge-warning {
  background: hsl(38 92% 50% / 0.1);
  color: hsl(38 92% 50%);
  border-color: hsl(38 92% 50% / 0.2);
}

.badge-destructive {
  background: hsl(var(--destructive) / 0.1);
  color: hsl(var(--destructive));
}

.badge-outline {
  border: 1px solid hsl(var(--border));
  background: transparent;
}

/* ---- Navbar (Glassmorphism) ---- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  padding: 0.875rem 0;
  transition: background 0.3s, border-color 0.3s;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}

.navbar-brand .icon {
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar-brand .icon>svg {
  width: 100%;
  height: 100%;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.navbar-nav a {
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: hsl(var(--muted-fg));
  transition: all 0.25s var(--spring);
}

.navbar-nav a:hover {
  color: hsl(var(--fg));
  background: hsl(var(--accent));
}

.navbar-nav a.active {
  color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.08);
  font-weight: 600;
}

/* ---- Search (Modern Glow) ---- */
.search-wrap {
  position: relative;
  max-width: 400px;
  width: 100%;
}

.search-wrap .search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: hsl(var(--muted-fg));
  width: 1.125rem;
  height: 1.125rem;
  pointer-events: none;
  transition: color 0.25s;
}

.search-wrap input {
  padding-left: 2.5rem;
  height: 2.5rem;
  font-size: 0.8125rem;
  border-radius: 9999px;
  background: hsl(var(--muted));
  border: 1.5px solid transparent;
  width: 100%;
  transition: all 0.3s var(--spring);
}

.search-wrap input:focus {
  background: hsl(var(--bg));
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 3px hsl(var(--ring) / 0.15), 0 2px 12px hsl(var(--ring) / 0.1);
}

.search-wrap:focus-within .search-icon {
  color: hsl(var(--primary));
}

/* ---- App Card ---- */
.app-card {
  display: flex;
  gap: 0.75rem;
  padding: 0.875rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.25s var(--spring);
}

.app-card:hover {
  background: hsl(var(--accent));
  transform: translateY(-1px);
}

.app-card-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.75rem;
  background: hsl(var(--muted));
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

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

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

.app-card-info h3 {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.app-card-info .meta {
  font-size: 0.75rem;
  color: hsl(var(--muted-fg));
  margin-top: 0.125rem;
}

.app-card-info .desc {
  font-size: 0.75rem;
  color: hsl(var(--muted-fg));
  margin-top: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- Featured Banner ---- */
.featured-banner {
  background: linear-gradient(135deg, hsl(var(--primary) / 0.12), hsl(var(--primary) / 0.04), hsl(var(--accent)));
  border: 1px solid hsl(var(--primary) / 0.15);
  border-radius: 1.25rem;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  display: flex;
  gap: 1.25rem;
  align-items: center;
  cursor: pointer;
  transition: all 0.4s var(--spring);
  position: relative;
  overflow: hidden;
}

.featured-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 200%;
  background: radial-gradient(circle, hsl(var(--primary) / 0.08), transparent 60%);
  pointer-events: none;
}

.featured-banner:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px hsl(var(--primary) / 0.15);
  border-color: hsl(var(--primary) / 0.25);
}

.featured-banner .app-icon {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 1.5rem;
  background: hsl(var(--muted));
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 4px 16px rgb(0 0 0 / 0.1);
}

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

.featured-banner .info {
  flex: 1;
}

.featured-banner .info h2 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.featured-banner .info p {
  font-size: 0.875rem;
  color: hsl(var(--muted-fg));
}

/* ---- Section ---- */
.section {
  margin-bottom: 2rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  padding: 0 0.25rem;
}

.section-header h2 {
  font-size: 1.125rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-header .see-all {
  font-size: 0.8125rem;
  font-weight: 600;
  color: hsl(var(--primary));
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.section-header .see-all:hover {
  text-decoration: underline;
}

/* ---- Horizontal Scroll ---- */
.scroll-row {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
  padding: 0.25rem 0;
}

.scroll-row::-webkit-scrollbar {
  display: none;
}

.scroll-row>* {
  scroll-snap-align: start;
  flex-shrink: 0;
}

/* ---- App Detail Page ---- */
.app-detail-header {
  display: flex;
  gap: 1.5rem;
  padding: 1.75rem 0;
}

.app-detail-icon {
  width: 6.5rem;
  height: 6.5rem;
  border-radius: 1.75rem;
  overflow: hidden;
  flex-shrink: 0;
  background: hsl(var(--muted));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  box-shadow: 0 4px 20px rgb(0 0 0 / 0.1);
}

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

.app-detail-info {
  flex: 1;
}

.app-detail-info h1 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.app-detail-info .developer {
  color: hsl(var(--primary));
  font-size: 0.875rem;
  font-weight: 500;
}

/* ---- Info Cards Grid ---- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.5rem;
  margin: 1rem 0;
}

.info-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.875rem 0.75rem;
  border-radius: var(--radius);
  background: hsl(var(--muted));
  border: 1px solid hsl(var(--border) / 0.5);
  text-align: center;
  transition: all 0.25s var(--spring);
}

.info-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.info-card .value {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.info-card .label-text {
  font-size: 0.6875rem;
  color: hsl(var(--muted-fg));
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 500;
}

/* ---- App Info Table ---- */
.app-info-table {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.app-info-row {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 1rem;
  background: hsl(var(--muted) / 0.5);
  border-radius: 0.75rem;
  border: 1px solid hsl(var(--border) / 0.3);
  transition: background 0.2s, transform 0.2s;
}

.app-info-row:hover {
  background: hsl(var(--muted));
  transform: translateY(-2px);
}

.app-info-label {
  font-size: 0.75rem;
  color: hsl(var(--muted-fg));
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.app-info-value {
  font-size: 0.9375rem;
  font-weight: 600;
  color: hsl(var(--fg));
  word-break: break-word;
}

/* ---- App Hero Background ---- */
.app-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 320px;
  overflow: hidden;
  z-index: 0;
  opacity: 0.15;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

.dark .app-hero-bg {
  opacity: 0.25;
}

.app-hero-bg img {
  width: 120%;
  height: 120%;
  object-fit: cover;
  position: absolute;
  top: -10%;
  left: -10%;
  filter: blur(60px) saturate(150%);
  transform: scale(1.1);
}

.app-detail-container {
  position: relative;
  z-index: 10;
}

/* ---- Screenshot Gallery ---- */
.screenshot-container {
  position: relative;
}

.screenshot-container::before,
.screenshot-container::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2.5rem;
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.3s;
}

.screenshot-container::before {
  left: 0;
  background: linear-gradient(to right, hsl(var(--bg)), transparent);
}

.screenshot-container::after {
  right: 0;
  background: linear-gradient(to left, hsl(var(--bg)), transparent);
}

.ss-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card) / 0.9);
  backdrop-filter: blur(8px);
  color: hsl(var(--fg));
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: all 0.25s var(--spring);
  box-shadow: var(--shadow-md);
}

.screenshot-container:hover .ss-arrow {
  opacity: 1;
}

.ss-arrow:hover {
  background: hsl(var(--card));
  box-shadow: var(--shadow-lg);
  transform: translateY(-50%) scale(1.1);
}

.ss-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

.ss-left {
  left: 0.5rem;
}

.ss-right {
  right: 0.5rem;
}

.screenshot-gallery {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.5rem 0;
  -ms-overflow-style: none;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}

.screenshot-gallery::-webkit-scrollbar {
  display: none;
}

.screenshot-gallery img {
  height: 280px;
  width: auto;
  border-radius: 0.75rem;
  flex-shrink: 0;
  cursor: pointer;
  border: 1px solid hsl(var(--border));
  transition: transform 0.25s var(--spring), box-shadow 0.25s;
  scroll-snap-align: center;
}

.screenshot-gallery img:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}

@media (max-width: 640px) {
  .ss-arrow {
    display: none;
  }

  .screenshot-container::before,
  .screenshot-container::after {
    display: none;
  }

  .screenshot-gallery img {
    height: 220px;
  }
}

/* ---- App Detail Header (Responsive) ---- */
.app-detail-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 0 2rem;
  border-bottom: 1px solid hsl(var(--border) / 0.5);
  margin-bottom: 1.5rem;
}

.adh-icon {
  width: 8rem;
  height: 8rem;
  border-radius: 1.75rem;
  overflow: hidden;
  flex-shrink: 0;
  background: hsl(var(--muted));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgb(0 0 0 / 0.12);
  transition: transform 0.3s var(--spring);
}

.adh-icon:hover {
  transform: scale(1.04);
}

.adh-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.adh-info h1 {
  text-align: left;
}

.adh-meta {
  flex-wrap: wrap;
}

.adh-actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

@media (max-width: 640px) {
  .app-detail-header {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  .adh-icon {
    margin: 0 auto;
  }

  .adh-info h1 {
    text-align: center;
  }

  .adh-meta {
    justify-content: center;
  }

  .adh-actions {
    align-items: center;
    width: 100%;
  }
}

/* ---- Install Button (Play Store style) ---- */
.install-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(152 76% 30%));
  color: hsl(var(--primary-fg));
  border: none;
  border-radius: 9999px;
  padding: 0.5rem 1.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s var(--spring);
  position: relative;
  overflow: hidden;
  min-width: 100px;
  box-shadow: 0 2px 10px hsl(var(--primary) / 0.3);
}

.install-btn:hover:not(:disabled):not(.is-active) {
  box-shadow: 0 4px 20px hsl(var(--primary) / 0.4);
  transform: translateY(-1px);
}

.install-btn:active:not(:disabled):not(.is-active) {
  transform: scale(0.97) translateY(0);
}

.install-btn:disabled {
  cursor: not-allowed;
}

.install-btn .progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: hsl(var(--primary-fg) / 0.4);
  transition: width 80ms ease-out;
  border-radius: 0 2px 2px 0;
}

.install-btn .btn-label {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  transition: all 0.2s;
}

.install-btn .spinner {
  width: 14px;
  height: 14px;
  border: 2px solid hsl(var(--primary-fg) / 0.3);
  border-top-color: hsl(var(--primary-fg));
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ---- Install States ---- */
.install-btn.state-pending {
  background: hsl(var(--primary) / 0.15);
  color: hsl(var(--primary));
  transform: scale(0.95);
}

.install-btn.state-downloading {
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
}

.install-btn.state-installing {
  background: hsl(var(--primary) / 0.2);
  color: hsl(var(--primary));
  transform: scale(0.97);
}

.install-btn.state-done {
  background: hsl(var(--primary));
  color: hsl(var(--primary-fg));
  transform: scale(1.05);
}

/* ---- Circular Progress Ring ---- */
.install-progress-ring {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.install-progress-ring svg {
  transform: rotate(-90deg);
}

.install-progress-ring .ring-bg {
  stroke: hsl(var(--primary) / 0.15);
}

.install-progress-ring .ring-fg {
  stroke: hsl(var(--primary));
  transition: stroke-dashoffset 80ms ease-out;
  stroke-linecap: round;
}

.install-progress-ring .ring-text {
  position: absolute;
  font-size: 0.5rem;
  font-weight: 700;
  color: hsl(var(--primary));
}

/* ---- Download Progress Wrapper (shows next to button) ---- */
.install-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.install-wrapper .install-progress-text {
  font-size: 0.6875rem;
  font-weight: 600;
  color: hsl(var(--primary));
  min-width: 2rem;
  text-align: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.install-wrapper .install-progress-text.visible {
  opacity: 1;
}

/* ---- Success Checkmark Animation ---- */
@keyframes installSuccess {
  0% {
    transform: scale(0.9);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.15);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes checkDraw {
  0% {
    stroke-dashoffset: 24;
  }

  100% {
    stroke-dashoffset: 0;
  }
}

.install-btn.state-done .check-icon {
  animation: checkDraw 0.4s ease-out forwards;
}

.install-btn.state-done {
  animation: installSuccess 0.4s ease-out;
}

/* ---- Reviews ---- */
.review-card {
  padding: 1rem;
  border-bottom: 1px solid hsl(var(--border));
}

.review-card:last-child {
  border-bottom: none;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.review-stars {
  display: flex;
  gap: 2px;
}

.review-stars .star {
  color: hsl(var(--muted-fg) / 0.3);
  font-size: 1rem;
}

.review-stars .star.filled {
  color: #facc15;
}

.review-body {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: hsl(var(--muted-fg));
}

/* ---- Security Info ---- */
.security-card {
  background: hsl(142 76% 36% / 0.05);
  border: 1px solid hsl(142 76% 36% / 0.15);
  border-radius: var(--radius);
  padding: 1rem;
}

.security-card.warning {
  background: hsl(0 84% 60% / 0.05);
  border-color: hsl(0 84% 60% / 0.15);
}

/* ---- Top Charts ---- */
.top-chart-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.25rem;
  transition: background 0.15s;
  cursor: pointer;
  border-radius: var(--radius);
}

.top-chart-item:hover {
  background: hsl(var(--accent));
}

.top-chart-rank {
  width: 1.5rem;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 700;
  color: hsl(var(--muted-fg));
}

/* ---- Share Buttons ---- */
.share-btns {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  color: hsl(var(--fg));
  transition: all 0.15s;
  cursor: pointer;
}

.share-btn:hover {
  background: hsl(var(--accent));
}

/* ---- Modal / Dialog ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: hsl(var(--card));
  border-radius: 0.75rem;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: fadeIn 0.2s;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid hsl(var(--border));
}

.modal-body {
  padding: 1.25rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid hsl(var(--border));
}

/* ---- Fullscreen Viewer ---- */
.fullscreen-viewer {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.fullscreen-viewer.active {
  display: flex;
}

.fullscreen-viewer img {
  max-width: 95%;
  max-height: 95vh;
  object-fit: contain;
  cursor: default;
}

.fullscreen-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- Toast ---- */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 0.875rem 1.125rem;
  box-shadow: var(--shadow-lg), 0 0 0 1px hsl(var(--border) / 0.5);
  min-width: 300px;
  animation: toastSlideIn 0.5s var(--spring);
  pointer-events: auto;
  display: flex;
  align-items: start;
  gap: 0.625rem;
  transition: all 0.3s var(--spring);
}

.toast.success {
  border-left: 3px solid hsl(var(--primary));
}

.toast.error {
  border-left: 3px solid hsl(var(--destructive));
}

.toast-title {
  font-weight: 600;
  font-size: 0.875rem;
}

.toast-message {
  font-size: 0.8125rem;
  color: hsl(var(--muted-fg));
}

/* ---- Skeleton ---- */
.skeleton {
  background: linear-gradient(90deg, hsl(var(--muted)) 25%, hsl(var(--muted-fg) / 0.05) 50%, hsl(var(--muted)) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}

/* ---- Theme Toggle ---- */
.theme-toggle {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: hsl(var(--fg));
  cursor: pointer;
  transition: all 0.3s var(--spring);
}

.theme-toggle:hover {
  background: hsl(var(--accent));
  transform: rotate(15deg);
}

.theme-toggle:active {
  transform: rotate(-15deg) scale(0.9);
}

/* Swap moon/sun icons based on dark mode */
.dark .theme-icon-moon {
  display: none !important;
}

.dark .theme-icon-sun {
  display: block !important;
}

html:not(.dark) .theme-icon-moon {
  display: block;
}

html:not(.dark) .theme-icon-sun {
  display: none !important;
}

/* ---- Tabs ---- */
.tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid hsl(var(--border));
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: hsl(var(--muted-fg));
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  transition: all 0.15s;
}

.tab:hover {
  color: hsl(var(--fg));
}

.tab.active {
  color: hsl(var(--primary));
  border-bottom-color: hsl(var(--primary));
}

/* ---- Animations ---- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.97);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

@keyframes press {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(0.95);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes ripple {
  to {
    transform: scale(3);
    opacity: 0;
  }
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes staggerFadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Stagger Animation Helper ---- */
.stagger-in>* {
  animation: staggerFadeIn 0.5s var(--spring) backwards;
}

.stagger-in>*:nth-child(1) {
  animation-delay: 0.05s;
}

.stagger-in>*:nth-child(2) {
  animation-delay: 0.1s;
}

.stagger-in>*:nth-child(3) {
  animation-delay: 0.15s;
}

.stagger-in>*:nth-child(4) {
  animation-delay: 0.2s;
}

.stagger-in>*:nth-child(5) {
  animation-delay: 0.25s;
}

.stagger-in>*:nth-child(6) {
  animation-delay: 0.3s;
}

.stagger-in>*:nth-child(n+7) {
  animation-delay: 0.35s;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  h1 {
    font-size: 1.375rem;
  }

  h2 {
    font-size: 1.125rem;
  }

  .container {
    padding: 0 0.75rem;
  }

  .grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .app-detail-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .app-detail-icon {
    width: 5rem;
    height: 5rem;
  }

  .featured-banner {
    padding: 1rem;
  }

  .featured-banner .app-icon {
    width: 4rem;
    height: 4rem;
  }

  .navbar-nav {
    gap: 0;
  }

  .navbar-nav a {
    padding: 0.375rem 0.5rem;
    font-size: 0.8125rem;
  }

  .screenshot-gallery img {
    height: 200px;
  }

  .hide-mobile {
    display: none !important;
  }
}

@media (max-width: 480px) {

  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: 1fr;
  }

  .info-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---- Admin Sidebar ---- */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 240px;
  background: hsl(var(--card));
  border-right: 1px solid hsl(var(--border));
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 40;
  transition: transform 0.3s;
}

.admin-sidebar .logo {
  padding: 1rem 1.25rem;
  font-weight: 700;
  font-size: 1rem;
  border-bottom: 1px solid hsl(var(--border));
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-sidebar .logo .icon {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-sidebar .logo .icon>svg {
  width: 100%;
  height: 100%;
}

.admin-sidebar nav {
  flex: 1;
  padding: 0.5rem;
  overflow-y: auto;
}

.admin-sidebar nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--muted-fg));
  transition: all 0.15s;
  margin-bottom: 2px;
}

.admin-sidebar nav a:hover {
  background: hsl(var(--accent));
  color: hsl(var(--fg));
}

.admin-sidebar nav a.active {
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  font-weight: 600;
}

.admin-sidebar nav a svg,
.admin-sidebar nav a .nav-icon {
  width: 1.125rem;
  height: 1.125rem;
}

.admin-sidebar .sidebar-footer {
  padding: 0.75rem;
  border-top: 1px solid hsl(var(--border));
}

.admin-main {
  flex: 1;
  margin-left: 240px;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: hsl(var(--bg) / 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid hsl(var(--border));
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ---- Admin Stats ---- */
.stat-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  padding: 1.25rem;
}

.stat-card .stat-value {
  font-size: 1.5rem;
  font-weight: 700;
}

.stat-card .stat-label {
  font-size: 0.8125rem;
  color: hsl(var(--muted-fg));
}

.stat-card .stat-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

/* ---- Admin Table ---- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.8125rem;
  color: hsl(var(--muted-fg));
  border-bottom: 1px solid hsl(var(--border));
}

.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid hsl(var(--border));
  vertical-align: middle;
}

.data-table tr:hover td {
  background: hsl(var(--accent) / 0.5);
}

/* ---- Admin responsive ---- */
@media (max-width: 768px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }

  .admin-sidebar.open {
    transform: translateX(0);
  }

  .admin-main {
    margin-left: 0;
  }

  .sidebar-toggle {
    display: flex !important;
  }
}

/* ---- Empty state ---- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  text-align: center;
}

.empty-state .icon {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: hsl(var(--muted));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: hsl(var(--muted-fg));
}

.empty-state h3 {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.empty-state p {
  color: hsl(var(--muted-fg));
  font-size: 0.875rem;
}

/* ==== PLAY STORE COMPONENTS ==== */

/* ---- Play Store App Cards (Square Icon Grid) ---- */
.play-card {
  display: flex;
  flex-direction: column;
  width: 130px;
  flex-shrink: 0;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.play-card-icon {
  width: 130px;
  height: 130px;
  border-radius: 1.25rem;
  overflow: hidden;
  background: hsl(var(--muted));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s var(--spring), transform 0.3s var(--spring);
}

.play-card:hover .play-card-icon {
  box-shadow: var(--shadow-md);
  transform: scale(1.03);
}

.play-card-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--spring);
}

.play-card:hover .play-card-icon img {
  transform: scale(1.05);
}

.play-card-name {
  font-size: 0.8125rem;
  font-weight: 500;
  margin-top: 0.5rem;
  padding: 0 0.125rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.play-card-meta {
  font-size: 0.6875rem;
  color: hsl(var(--muted-fg));
  padding: 0 0.125rem;
  margin-top: 0.125rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ---- App Carousel ---- */
.app-carousel-wrapper {
  position: relative;
}

.app-carousel {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.25rem 0 0.75rem;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

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

.app-carousel>* {
  scroll-snap-align: start;
}

/* ---- Top Charts Grid ---- */
.top-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.top-chart-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  cursor: pointer;
  transition: box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
}

.top-chart-card:hover {
  box-shadow: var(--shadow-sm);
}

.top-chart-rank {
  width: 1.5rem;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: hsl(var(--muted-fg));
  flex-shrink: 0;
}

.top-chart-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  overflow: hidden;
  flex-shrink: 0;
  background: hsl(var(--muted));
  display: flex;
  align-items: center;
  justify-content: center;
}

.top-chart-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top-chart-info {
  flex: 1;
  min-width: 0;
}

.top-chart-name {
  font-size: 0.8125rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-chart-meta {
  font-size: 0.6875rem;
  color: hsl(var(--muted-fg));
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.125rem;
}

.install-btn-sm {
  padding: 0.25rem 0.75rem;
  font-size: 0.6875rem;
  flex-shrink: 0;
}

/* ---- Featured Banner Dots ---- */
.featured-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: hsl(var(--muted-fg) / 0.3);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s;
}

.featured-dot.active {
  background: hsl(var(--primary));
  width: 1.25rem;
}

/* ---- Share Icon Buttons (Round) ---- */
.share-icon-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  color: hsl(var(--muted-fg));
  cursor: pointer;
  transition: all 0.25s var(--spring);
}

.share-icon-btn:hover {
  background: hsl(var(--accent));
  color: hsl(var(--fg));
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* ---- Security Cards (Colored) ---- */
.security-clean {
  background: hsl(142 76% 36% / 0.08);
  border: 1px solid hsl(142 76% 36% / 0.25);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
}

.security-warning {
  background: hsl(38 92% 50% / 0.08);
  border: 1px solid hsl(38 92% 50% / 0.25);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
}

.security-none {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
}

/* ---- Back Button ---- */
.back-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: hsl(var(--fg));
  cursor: pointer;
  transition: background 0.15s;
  margin-left: -0.25rem;
}

.back-btn:hover {
  background: hsl(var(--secondary));
}

/* ---- Footer ---- */
.site-footer {
  border-top: 2px solid transparent;
  border-image: linear-gradient(90deg, transparent, hsl(var(--primary) / 0.3), transparent) 1;
  padding: 2rem 0;
  text-align: center;
  font-size: 0.8125rem;
  color: hsl(var(--muted-fg));
  margin-top: 3rem;
  letter-spacing: -0.01em;
}

/* ---- Responsive Updates ---- */
@media (max-width: 768px) {
  .play-card {
    width: 110px;
  }

  .play-card-icon {
    width: 110px;
    height: 110px;
    border-radius: 1rem;
  }

  .top-charts-grid {
    grid-template-columns: 1fr;
  }

  .featured-banner {
    padding: 1rem;
    gap: 0.75rem;
  }

  .featured-banner .app-icon {
    width: 4.5rem;
    height: 4.5rem;
  }

  .featured-banner .info h2 {
    font-size: 1.125rem;
  }
}

@media (min-width: 769px) {
  .play-card {
    width: 150px;
  }

  .play-card-icon {
    width: 150px;
    height: 150px;
  }
}

/* ---- Review Action Buttons ---- */
.review-action-btn:hover {
  color: hsl(var(--primary)) !important;
  background: hsl(var(--primary) / 0.08) !important;
}

.review-action-btn[data-action="delete"]:hover {
  color: hsl(0 84% 60%) !important;
  background: hsl(0 84% 60% / 0.08) !important;
}

.review-card {
  transition: all 0.3s ease-out;
  overflow: hidden;
}