@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #000000;
  /* Pure Black Request */
  --bg-app: radial-gradient(1200px 500px at 70% -10%, #111 20%, transparent 60%);
  --panel: #242426;
  /* Dark Grey (Less Black) */
  --glass: rgba(255, 255, 255, .06);
  --text: #e7ebf3;
  --muted: #a2a8b7;
  --primary: #4da3ff;
  --accent: #7c4dff;
  --green: #46d387;
  --red: #ff5d5d;
  --radius: 22px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
}

* {
  box-sizing: border-box
}

html,
body {
  height: 100%
}

body {
  margin: 0;
  font-family: Inter, system-ui, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  background-image: var(--bg-app);
  background-repeat: no-repeat;
  background-attachment: fixed;
  overflow-y: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px
}

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: saturate(140%) blur(12px);
  background: linear-gradient(180deg, rgba(12, 14, 19, .85), rgba(12, 14, 19, .65));
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 0
}

.featured-heading {
  margin: 26px 0 24px;
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1.5px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 10px
}

.logo {
  height: 32px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
}

.brand-name {
  font-weight: 800;
  letter-spacing: .2px
}

.tabs {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1
}

.tab {
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
}

.tab.active {
  color: var(--text);
  background: var(--glass)
}

.tab:hover {
  color: var(--text);
  background: var(--glass)
}

.search {
  flex: 1;
  display: flex;
  justify-content: flex-end
}

.search input {
  width: 100%;
  max-width: 360px;
  border: 0;
  color: var(--text);
  background: rgba(255, 255, 255, .06);
  padding: 10px 14px;
  border-radius: 12px;
  outline: none;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(180deg, #283048, #1c2234);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700
}

.profile-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  margin-left: 12px;
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, border-color 0.2s;
}

.profile-btn:hover {
  transform: scale(1.05);
  border-color: var(--primary);
}

.profile-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 7px 14px;
  color: var(--text);
  background: rgba(255, 255, 255, .08);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .4)
}

.btn.primary {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  box-shadow: 0 8px 24px rgba(76, 163, 255, .45);
}

.btn.ghost {
  background: rgba(255, 255, 255, .06)
}

.main {
  padding-bottom: 80px
}

.featured-section {
  padding: 26px 0
}

.featured-heading {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
  margin: 6px 0 18px;
}

.apps-heading {
  font-size: clamp(24px, 3.2vw, 36px);
  font-weight: 800;
  margin: 10px 0 16px;
}

.featured-grid {
  display: grid;
  grid-template-columns: 2fr 1.1fr;
  gap: 24px;
  align-items: stretch
}

#bundlesGrid {
  grid-template-columns: 1.1fr 2fr;
}

.featured-card {
  position: relative;
  border-radius: 28px;
  min-height: 400px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--panel);
}

.featured-card.mini {
  min-height: 300px
}

.featured-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--bg);
  background-size: cover;
  background-position: center;
  opacity: .7;
  filter: saturate(120%);
}

.card-banner {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background-image: var(--banner);
  background-size: cover;
  background-position: center;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
}

.card-banner::after {
  content: "";
  display: none
}

.featured-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, .25) 0%, rgba(0, 0, 0, .12) 40%, rgba(0, 0, 0, 0) 65%),
    linear-gradient(90deg, rgba(0, 0, 0, .15), rgba(0, 0, 0, 0) 60%);
  z-index: 0;
}

.featured-content {
  position: relative;
  z-index: 1;
  padding: 40px;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 10px
}

.hero-banner {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .06));
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: saturate(140%) blur(10px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
}

.hero-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1
}

.label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18);
  color: #fff;
  font-weight: 700;
  font-size: .9rem
}

.banner {
  display: none
}

.banner-accent {
  display: none
}

.eyebrow {
  color: var(--muted);
  font-weight: 600;
  letter-spacing: .3px
}

.title {
  font-size: clamp(24px, 3.2vw, 36px);
  line-height: 1.15;
  margin: 0
}

.title.small {
  font-size: 22px
}

.sub {
  color: var(--muted);
  margin: 0 0 10px
}

.cta {
  display: flex;
  gap: 10px;
  margin-left: auto
}

.cta.small .btn {
  padding: 6px 12px
}

.featured-card .cta {
  display: none
}

.panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px
}

.panels>.apps-heading {
  grid-column: 1 / -1;
  font-size: 42px;
  font-weight: 800;
  margin: 0 0 24px;
  letter-spacing: -1.5px;
}

.panel {
  background: linear-gradient(180deg, rgba(28, 29, 32, 0.9), rgba(20, 24, 34, .9));
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  min-width: 0
}

.panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 8px
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px
}

.list-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .03);
}

.icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, #2c344b, #1b2133);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800
}

.icon img,
.app-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.name {
  font-weight: 700
}

.meta {
  color: var(--muted);
  font-size: .95rem
}

.cloud {
  color: var(--primary);
  font-size: 18px;
  margin-left: 14px
}

.section-title {
  margin: 36px 0 24px;
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1.5px;
}

.events-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px
}

.promo-card {
  position: relative;
  display: block;
  border-radius: 24px;
  overflow: hidden;
  min-height: 260px;
  box-shadow: var(--shadow);
  background: var(--panel);
  transition: transform .24s ease, box-shadow .24s ease, filter .24s ease
}

.promo-card {
  text-decoration: none
}

.promo-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--img);
  background-size: cover;
  background-position: center;
  opacity: .9;
  filter: saturate(110%)
}

.promo-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .25) 40%, rgba(0, 0, 0, 0) 70%),
    radial-gradient(120% 100% at 30% 30%, rgba(0, 0, 0, .08), rgba(0, 0, 0, .5) 70%)
}

.promo-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 24px 64px rgba(0, 0, 0, .55)
}

.promo-content {
  position: relative;
  z-index: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 460px
}

.promo-content h3 {
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 800;
  color: #fff;
  margin: 0
}

.promo-content p {
  font-size: clamp(13px, 1.8vw, 16px);
  color: #fff;
  opacity: .9;
  margin: 4px 0 8px
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-weight: 700
}

.badge.green {
  background: rgba(70, 211, 135, .2);
  color: #b9ffde
}

.promo-card .btn {
  display: none
}

.footer {
  border-top: 1px solid rgba(255, 255, 255, .06);
  padding: 26px 0;
  margin-top: 30px;
  background: rgba(8, 10, 14, .6);
  backdrop-filter: blur(6px)
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center
}

.footer a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 14px
}

.search-overlay {
  position: fixed;
  inset: 64px 0 0;
  background: rgba(10, 12, 17, .9);
  backdrop-filter: blur(8px);
  overflow: auto
}

.hidden {
  display: none !important;
}

.glass-overlay {
  /* Utility for glassmorphism constraints without full screen */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.tilt {
  transform-style: preserve-3d;
  transition: transform .18s ease, box-shadow .2s ease
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s ease, transform .6s ease
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: none
}

.modal {
  border: none;
  border-radius: 20px;
  padding: 0;
  background: var(--panel);
  color: var(--text);
  max-width: 520px;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.modal[open] {
  opacity: 1;
  transform: scale(1);
  animation: modal-in 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

.modal.closing {
  animation: modal-out 0.2s cubic-bezier(0.6, -0.28, 0.74, 0.05) forwards;
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0);
  transition: background 0.3s ease;
}

.modal[open]::backdrop {
  background: rgba(0, 0, 0, 0.6);
  animation: backdrop-in 0.3s ease forwards;
}

.modal.closing::backdrop {
  animation: backdrop-out 0.2s ease forwards;
}

@keyframes modal-in {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes modal-out {
  0% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }

  100% {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
}

@keyframes backdrop-in {
  0% {
    background: rgba(0, 0, 0, 0);
  }

  100% {
    background: rgba(0, 0, 0, 0.6);
  }
}

@keyframes backdrop-out {
  0% {
    background: rgba(0, 0, 0, 0.6);
  }

  100% {
    background: rgba(0, 0, 0, 0);
  }
}

.upload-form {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px
}

.field input,
.field select {
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, .08);
  color: var(--text);
  outline: none
}

.actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px
}

@keyframes float {
  0% {
    transform: translateY(0)
  }

  50% {
    transform: translateY(-6px)
  }

  100% {
    transform: translateY(0)
  }
}

.featured-card .btn.primary {
  animation: float 3s ease-in-out infinite
}

/* Bottom info bar in featured cards */
.bottom-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: saturate(140%) blur(12px);
  background: rgba(255, 255, 255, .10);
  border-top: 1px solid rgba(255, 255, 255, .18);
  z-index: 2;
}

.app-modal {
  max-width: min(96vw, 1100px);
  width: 100%
}

/* App Modal Redesign */
.app-hero {
  position: relative;
  height: 240px;
  min-height: auto;
  border-radius: 20px 20px 0 0;
  overflow: hidden;
  background: var(--panel)
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, #242426 100%);
  /* Match panel color at bottom */
}

.app-header-row {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  padding: 0 24px;
  margin-top: -50px;
  position: relative;
  z-index: 10;
}

.app-logo-large {
  width: 110px;
  height: 110px;
  flex-shrink: 0;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
  background: linear-gradient(180deg, #2c344b, #1b2133);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  color: #fff;
}

.app-logo-large img {
  width: 100%;
  height: 100%;
  object-fit: cover
}

.app-header-info {
  flex: 1;
  padding-bottom: 10px
}

.app-header-info .app-name {
  font-size: 28px;
  line-height: 1.1;
  margin-bottom: 4px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, .5);
}

.app-header-info .app-desc {
  font-size: 15px;
  color: rgba(255, 255, 255, .8);
  margin-bottom: 12px;
}

.app-actions {
  display: flex;
  align-items: center;
  gap: 12px
}

.custom-get {
  padding: 8px 28px;
  font-weight: 700;
  font-size: 15px;
  background: rgba(255, 255, 255, .15);
  /* Glass White */
  color: #fff;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .2);
  backdrop-filter: blur(10px);
}

.in-app-text {
  font-size: 10px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: .5px
}

.stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  margin: 10px 0 20px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  overflow-x: auto;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 80px;
  border-right: 1px solid rgba(255, 255, 255, .06);
}

.stat-item:last-child {
  border-right: none
}

.stat-top {
  font-weight: 700;
  color: var(--text);
  font-size: 15px
}

.stat-bot {
  font-size: 11px;
  color: #888;
  font-weight: 600
}

/* Mobile Smaller Screenshots */
.gallery img {
  width: auto;
  height: 400px;
  /* Fixed height, variable width */
  border-radius: 12px;
  object-fit: contain;
  /* Ensure full visibility if constrained, though auto width should handle it. */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
  max-width: none;
}

.app-modal-content {
  padding: 20px
}

.modal-section-title {
  font-size: 22px;
  font-weight: 700;
  margin: 32px 0 16px;
  color: #fff;
  letter-spacing: -0.5px;
}

dialog::backdrop {
  background: rgba(0, 0, 0, .6)
}

.close-x {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: rgba(255, 255, 255, .15);
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .35);
  z-index: 10;
  border: 1px solid rgba(255, 255, 255, .32)
}

.app-info {
  display: flex;
  flex-direction: column;
  gap: 18px
}

.stats {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px
}

.stat {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  padding: 10px
}

.stat-label {
  color: #c9cfdb;
  font-size: .85rem
}

.stat-value {
  font-weight: 700
}

.gallery-wrap {
  position: relative
}

.gallery {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory
}

.gallery::-webkit-scrollbar {
  height: 8px
}

.gallery::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .18);
  border-radius: 999px
}

.gallery-next {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .35)
}

@media (max-width:639px) {
  .gallery-next {
    display: none
  }
}

.description {
  color: #d1d5db;
  font-size: 1.05rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

.description.collapsed {
  max-height: 96px;
  overflow: hidden;
  position: relative
}

.description.collapsed::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(180deg, rgba(36, 36, 38, 0), #242426);
}

.description-toggle {
  margin-top: 6px
}

@media (max-width:900px) {
  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr))
  }
}

@media (max-width:640px) {
  .app-hero {
    min-height: 260px
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }
}

.premium-features {
  margin-top: 12px
}

.premium-features h4 {
  margin: 0 0 8px
}

.premium-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.premium-features li {
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 14px;
  padding: 14px;
  font-size: .95rem;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
  transition: transform 0.2s ease, background 0.2s ease;
  backdrop-filter: blur(10px);
}

.premium-features li:hover {
  background: rgba(255, 255, 255, .08);
  transform: translateY(-2px);
}

.premium-features li:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.premium-features li::before {
  content: "✓";
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--green);
  color: #000;
  border-radius: 50%;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}

body {
  user-select: none;
  -webkit-user-select: none
}

input,
textarea,
select,
button {
  user-select: text;
  -webkit-user-select: text
}

.app-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  /* Rounded square 12px/42px ~ 28% */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* Ensure image doesn't bleed */
  background: linear-gradient(180deg, #2c344b, #1b2133);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
}

.app-left {
  display: flex;
  align-items: center;
  gap: 12px
}

.app-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.1
}

.app-name {
  font-weight: 800;
  color: #eef2f8
}

.app-dev {
  font-size: .9rem;
  color: #c9cfdb
}

.app-desc {
  font-size: .9rem;
  color: #c9cfdb
}

.bottom-bar .btn {
  padding: 7px 14px
}

.btn.glass-white {
  background: rgba(255, 255, 255, .18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .32);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .35);
  backdrop-filter: saturate(140%) blur(8px);
}

@media (max-width:1024px) {
  .events-grid {
    grid-template-columns: 1fr
  }

  .featured-content {
    max-width: none
  }
}

@media (min-width:640px) and (max-width:1024px) {
  .container {
    padding: 0 32px
  }
}

@media (max-width:640px) {
  .title {
    font-size: 28px
  }

  .featured-heading,
  .apps-heading,
  .section-title {
    font-size: 32px;
    margin: 24px 0 16px
  }

  .header-inner {
    gap: 10px
  }

  .search input {
    max-width: none
  }

  .search {
    justify-content: center
  }

  .tabs .tab {
    display: none
  }

  .panels {
    grid-template-columns: 1fr
  }

  .featured-grid,
  #bundlesGrid {
    grid-template-columns: 1fr
  }

  .list-item {
    grid-template-columns: 40px 1fr auto
  }

  .card-banner {
    top: 0;
    bottom: 0
  }

  .hero-banner {
    left: 18px;
    right: 18px;
    bottom: 18px;
    padding: 12px 14px;
    border-radius: 16px
  }

  .featured-card,
  .featured-card.mini {
    width: 92%;
    margin: 0 auto;
    min-height: 420px
  }

  .featured-heading {
    padding-left: 10px
  }

  .bottom-bar {
    padding: 10px 14px
  }

  .app-logo {
    width: 38px;
    height: 38px;
    font-size: 20px
  }

  .featured-card.mini .title.small {
    font-size: 28px;
    line-height: 1.15;
    margin: 0
  }

  .feature-desc {
    left: 18px;
    right: 18px;
    bottom: 64px
  }
}

@media (max-width:640px) {
  .app-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-top: -40px
  }

  .app-logo-large {
    width: 80px;
    height: 80px;
    font-size: 32px
  }

  .app-header-info .app-name {
    font-size: 24px
  }

  .gallery img {
    height: 300px
  }

  .featured-card {
    min-height: 410px
  }

  .featured-card.mini {
    min-height: 410px
  }
}

.admin-wrap {
  width: 100%;
  max-width: 1200px;
  margin: 26px auto;
  padding: 0 16px
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px
}

.admin-wrap .panel {
  background: linear-gradient(180deg, rgba(30, 36, 51, .95), rgba(20, 24, 34, .95))
}

.admin-wrap .panel-head h3 {
  font-size: 20px
}

.admin-wrap .upload-form .field label {
  color: #c9cfdb;
  font-weight: 600
}

.admin-wrap .list .list-item {
  background: rgba(255, 255, 255, .06)
}

.lock-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 10, 14, .85);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999
}

.lock-card {
  background: linear-gradient(180deg, #232b3f, #141a27);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 16px;
  padding: 20px;
  min-width: 320px;
  box-shadow: var(--shadow)
}

/* Button Animations */
.btn.loading {
  color: transparent !important;
  pointer-events: none;
  position: relative;
}

.btn.loading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, .3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
  transform: translate(-50%, -50%);
}

.btn.success {
  background: var(--green) !important;
  border-color: var(--green) !important;
  color: #000 !important;
  pointer-events: none;
  transition: all 0.3s ease;
}

@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.lock-card h3 {
  margin: 0 0 10px
}

/* Profile Popup & Crop Modal */
.profile-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 320px;
  max-width: calc(100vw - 40px);
  background: rgba(28, 29, 32, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  padding: 24px;
  color: #fff;
  z-index: 1000;
  margin: 0;
  opacity: 0;
  transform: translate(-50%, -60%) scale(0.95);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

/* Ensure crop modal is visible on top of other elements if needed, 
   though z-index 1000 is high. If typical dialog behavior is used, 
   top-layer handles z-index. */

@media (max-width: 768px) {
  .header .container {
    padding-left: 24px;
    padding-right: 24px;
  }
}

.profile-popup[open] {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.profile-avatar-wrapper {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.profile-avatar-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-edit-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.2s;
}

.profile-avatar-wrapper:hover .avatar-edit-overlay {
  opacity: 1;
}

.profile-info h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.profile-info p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
  transition: filter 0.5s ease, opacity 0.3s ease;
}

.privacy-blur {
  filter: blur(5px);
  opacity: 0.7;
  cursor: pointer;
  user-select: none;
}

.privacy-blur:hover {
  filter: blur(3px);
  opacity: 0.9;
}

.privacy-blur.revealed {
  filter: blur(0);
  opacity: 1;
  cursor: text;
  user-select: auto;
}

/* Reply Quote Style */
.reply-quote {
  border-left: 3px solid var(--primary);
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 10px;
  border-radius: 0 4px 4px 0;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--muted);
}

/* Request Update Button */
.request-update-btn {
  background: linear-gradient(135deg, #4da3ff 0%, #3b82f6 100%);
  color: white;
  border: none;
  padding: 12px 32px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(77, 163, 255, 0.3);
}

.request-update-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(77, 163, 255, 0.4);
}

.request-update-btn:disabled {
  background: linear-gradient(135deg, #666 0%, #555 100%);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Glassmorphism Login Popup */
.login-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20000;
  /* Extremely high to be above dialog */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.login-popup-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.login-popup-overlay.active .login-popup {
  animation: popupReveal 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes popupReveal {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(30px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.login-popup {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 32px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.login-popup-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

.login-popup h3 {
  margin: 0 0 16px 0;
  color: #fff;
  font-size: 24px;
}

.login-popup p {
  margin: 0 0 24px 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

.login-popup-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.login-popup-buttons button {
  padding: 10px 24px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.login-popup-buttons .primary {
  background: var(--primary);
  color: white;
}

.login-popup-buttons .secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Login Popup Refinements */
.login-popup-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.benefits-list {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.benefits-list li {
  display: flex;
  align-items: center;
  gap: 16px;
}

.benefit-icon {
  font-size: 24px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.benefit-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.benefit-text strong {
  font-size: 15px;
  color: #fff;
}

.benefit-text span {
  font-size: 13px;
  color: var(--muted);
}

.trust-note {
  margin-top: 24px;
  font-size: 11px !important;
  color: var(--muted);
  opacity: 0.6;
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-form .field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}

.profile-form .hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.profile-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  gap: 10px;
}

.profile-actions .btn {
  font-size: 13px;
  padding: 8px 16px;
}

.btn.danger {
  color: var(--red);
  background: rgba(255, 93, 93, 0.1);
}

.btn.danger:hover {
  background: rgba(255, 93, 93, 0.2);
}