.mobile-wallpapers-page {
  overflow: hidden;
}

.mobile-hero {
  position: relative;
  min-height: 470px;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 78% 45%, rgba(124, 58, 237, 0.2), transparent 38%),
    linear-gradient(135deg, rgba(11, 14, 38, 0.82), rgba(19, 13, 42, 0.5));
  border-bottom: 1px solid var(--border-glass);
}

.mobile-hero .container {
  position: relative;
  z-index: 1;
  padding-top: 76px;
  padding-bottom: 76px;
}

.mobile-hero__content {
  position: relative;
  z-index: 2;
  max-width: 710px;
}

.mobile-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  margin-bottom: 22px;
  color: var(--primary-light);
  border: 1px solid rgba(129, 140, 248, 0.35);
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.1);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mobile-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.6rem, 7vw, 5.8rem);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.055em;
}

.mobile-hero p {
  max-width: 600px;
  margin-bottom: 28px;
  color: var(--text-secondary);
  font-size: clamp(1rem, 2vw, 1.14rem);
  line-height: 1.8;
}

.mobile-hero__orb {
  position: absolute;
  z-index: -1;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(167, 139, 250, 0.16);
  border-radius: 50%;
  box-shadow: 0 0 100px rgba(99, 102, 241, 0.1), inset 0 0 50px rgba(168, 85, 247, 0.08);
  animation: mobile-orbit 18s linear infinite;
}

.mobile-hero__orb--one {
  top: 16%;
  right: 14%;
}

.mobile-hero__orb--two {
  top: 23%;
  right: 10%;
  width: 420px;
  height: 420px;
  animation-duration: 26s;
  animation-direction: reverse;
}

.mobile-hero__phone {
  position: absolute;
  top: 50%;
  right: 8%;
  display: grid;
  width: 180px;
  height: 290px;
  place-items: center;
  color: rgba(199, 183, 255, 0.24);
  font-size: 7rem;
  filter: drop-shadow(0 0 42px rgba(129, 140, 248, 0.35));
  transform: translateY(-50%) rotate(10deg);
  animation: mobile-float 5s ease-in-out infinite;
  pointer-events: none;
}

.mobile-gallery-section {
  padding-top: 68px;
}

.mobile-gallery-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.mobile-gallery-heading .section-title {
  margin-top: 12px;
}

.mobile-wallpaper-count {
  flex: 0 0 auto;
  padding: 9px 14px;
  color: var(--text-secondary);
  border: 1px solid var(--border-glass);
  border-radius: 999px;
  background: var(--bg-card);
  font-size: 0.84rem;
}

.mobile-search {
  position: relative;
  display: block;
  max-width: 540px;
  margin: 0 0 30px;
}

.mobile-search > i {
  position: absolute;
  top: 50%;
  left: 17px;
  z-index: 1;
  color: var(--text-muted);
  transform: translateY(-50%);
}

.mobile-search input {
  width: 100%;
  min-height: 52px;
  padding-left: 46px;
}

.mobile-wallpaper-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(225px, 100%), 1fr));
  gap: 22px;
}

.mobile-gallery-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 24px;
}

.mobile-gallery-pagination[hidden] {
  display: none;
}

.mobile-gallery-page-button {
  min-width: 96px;
  padding: 9px 14px;
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
  border-radius: 999px;
  background: var(--bg-card);
  cursor: pointer;
}

.mobile-gallery-page-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mobile-gallery-page-status {
  min-width: 90px;
  color: var(--text-secondary);
  text-align: center;
  font-size: 0.88rem;
}

.mobile-wallpaper-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.16);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
  animation: mobile-card-in 0.55s both;
}

.mobile-wallpaper-card:hover {
  transform: translateY(-7px);
  border-color: rgba(129, 140, 248, 0.55);
  box-shadow: 0 18px 44px rgba(62, 44, 132, 0.3);
}

.mobile-wallpaper-card__image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 9 / 15;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.16), rgba(168, 85, 247, 0.1));
  cursor: pointer;
}

.mobile-wallpaper-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.35s ease, transform 0.55s ease;
}

.mobile-wallpaper-card__preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.mobile-wallpaper-card__actions {
  z-index: 1;
}

.mobile-wallpaper-card__image img:not(.is-loaded) {
  opacity: 0;
}

.mobile-wallpaper-card:hover .mobile-wallpaper-card__image img {
  transform: scale(1.055);
}

.mobile-wallpaper-card__actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
}

.mobile-wallpaper-action {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(10, 10, 26, 0.72);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.mobile-wallpaper-action:hover {
  transform: scale(1.08);
  background: var(--primary);
}

.mobile-wallpaper-action.is-active {
  color: #fff;
  background: var(--accent-pink);
}

.mobile-wallpaper-card__body {
  padding: 14px 15px 15px;
}

.mobile-wallpaper-card__title {
  overflow: hidden;
  margin: 0 0 8px;
  color: var(--text-primary);
  font-size: 0.94rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-wallpaper-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.76rem;
}

.mobile-wallpaper-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 13px;
}

.mobile-wallpaper-card__footer .btn-galaxy {
  padding: 7px 11px;
  font-size: 0.78rem;
}

.mobile-loading {
  display: flex;
  grid-column: 1 / -1;
  min-height: 260px;
  align-items: center;
  justify-content: center;
  gap: 13px;
  color: var(--text-secondary);
}

.mobile-loading__spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(129, 140, 248, 0.2);
  border-top-color: var(--primary-light);
  border-radius: 50%;
  animation: mobile-spin 0.8s linear infinite;
}

.mobile-gallery-message {
  grid-column: 1 / -1;
  padding: 56px 20px;
  color: var(--text-secondary);
  text-align: center;
}

.mobile-gallery-message i {
  display: block;
  margin-bottom: 14px;
  color: var(--primary-light);
  font-size: 2.2rem;
}

.mobile-detail-image {
  display: block;
  width: min(100%, 360px);
  max-height: 68vh;
  margin: 0 auto 20px;
  border-radius: var(--radius-md);
  object-fit: contain;
  background: rgba(0, 0, 0, 0.2);
}

.mobile-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mobile-detail-actions > * {
  flex: 1 1 140px;
}

@keyframes mobile-spin {
  to { transform: rotate(360deg); }
}

@keyframes mobile-card-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes mobile-float {
  0%, 100% { transform: translateY(-50%) rotate(10deg); }
  50% { transform: translateY(calc(-50% - 16px)) rotate(10deg); }
}

@keyframes mobile-orbit {
  to { transform: rotate(360deg); }
}

@media (max-width: 767.98px) {
  .mobile-hero {
    min-height: 440px;
  }

  .mobile-hero .container {
    padding-top: 62px;
    padding-bottom: 62px;
  }

  .mobile-hero__content {
    max-width: 570px;
  }

  .mobile-hero__orb--one {
    top: 12%;
    right: -34%;
  }

  .mobile-hero__orb--two {
    top: 15%;
    right: -48%;
  }

  .mobile-hero__phone {
    top: 54%;
    right: 5%;
    opacity: 0.12;
  }

  .mobile-gallery-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .mobile-gallery-pagination {
    gap: 8px;
  }

  .mobile-gallery-page-button {
    min-width: 80px;
    padding: 8px 10px;
  }

  .mobile-gallery-page-status {
    min-width: 80px;
    font-size: 0.82rem;
  }

  .mobile-wallpaper-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
  }

  .mobile-wallpaper-card__image {
    aspect-ratio: 0.67;
  }

  .mobile-wallpaper-card__body {
    padding: 11px;
  }

  .mobile-wallpaper-card__actions {
    top: 8px;
    right: 8px;
    gap: 5px;
  }

  .mobile-wallpaper-action {
    width: 33px;
    height: 33px;
    font-size: 0.78rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-hero__orb,
  .mobile-hero__phone,
  .mobile-loading__spinner,
  .mobile-wallpaper-card {
    animation: none;
  }

  .mobile-wallpaper-card,
  .mobile-wallpaper-card__image img,
  .mobile-wallpaper-action {
    transition: none;
  }
}
