/* App Download Page Styles */
.app-download-page {
  padding: 1rem;
  max-width: 1000px;
  margin: 0 auto;
  color: #CFCDE4;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 1. Header Section */
.app-header-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: fadeInDown 0.8s ease-out;
  padding-top: 1rem;
}

@media (min-width: 768px) {
  .app-header-section {
    flex-direction: row;
    text-align: left;
    align-items: flex-start;
    justify-content: center;
    gap: 2.5rem;
  }
}

.app-icon-large {
  width: 120px;
  height: 120px;
  border-radius: 22px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  margin-bottom: 1.2rem;
  transition: transform 0.3s ease;
  /* Fallback */
  padding: 5px;
}

.app-icon-large:hover {
  transform: scale(1.05);
}

.app-title-box h1 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.8rem;
  letter-spacing: 0.5px;
}

.app-badges {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  .app-badges {
    justify-content: flex-start;
  }
}

.badge {
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  color: #a7a7a7;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
}

.app-rating {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: #9191A8;
}

@media (min-width: 768px) {
  .app-rating {
    justify-content: flex-start;
  }
}

.stars {
  color: #FFD700;
  letter-spacing: 2px;
}

.score {
  font-weight: bold;
  color: #fff;
  font-size: 1.1rem;
}

/* 2. Download Section */
.app-download-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 3.5rem;
  align-items: center;
  background: rgba(33, 37, 54, 0.5);
  padding: 2rem;
  border-radius: 16px;
}

@media (min-width: 768px) {
  .app-download-section {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 4rem;
  }
}

.download-buttons {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  width: 100%;
  max-width: 340px;
}

.btn-download {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  height: 64px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-download:active {
  transform: scale(0.98);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.btn-download.android {
  background: -webkit-linear-gradient(left, #8533ED, #008EFE);
  color: #fff;
}

.btn-download.android:hover {
  box-shadow: 0 6px 16px rgba(250, 51, 77, 0.4);
}

.btn-download.ios {
  background: -webkit-linear-gradient(left, #008EFE, #008EFE);
  color: #fff;
}

.btn-download.ios:hover {
  box-shadow: 0 6px 16px rgba(250, 51, 77, 0.4);
}

.btn-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-text {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.btn-icon-svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.size-info {
  font-size: 0.8rem;
  opacity: 0.85;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.2);
  padding: 4px 8px;
  border-radius: 4px;
}

.qrcode-box {
  background: rgba(255, 255, 255, 0.05);
  padding: 1rem;
  border-radius: 12px;
  text-align: center;
  color: #CFCDE4;
  width: 160px;
  display: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transform: translateY(0);
  transition: transform 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.qrcode-box:hover {
  transform: translateY(-5px);
  border-color: rgba(250, 51, 77, 0.3);
}

@media (min-width: 768px) {
  .qrcode-box {
    display: block;
  }
}

.qrcode-box img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 0.8rem;
  border-radius: 8px;
  background: #fff !important;
  /* Ensure QR code is scannable */
  padding: 8px !important;
  box-sizing: border-box;
}

.qrcode-box p {
  font-size: 0.85rem;
  margin: 0;
  font-weight: 600;
  color: #CFCDE4;
}

/* 3. Gallery Section */
.app-gallery-section {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 1.5rem;
  border-left: 4px solid #078AFE;
  padding-left: 12px;
  color: #fff;
  display: flex;
  align-items: center;
}

.gallery-scroll {
  display: flex;
  gap: 1.2rem;
  overflow-x: auto;
  padding: 0.5rem 0 1.5rem 0;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: #334856 transparent;
}

.gallery-scroll::-webkit-scrollbar {
  height: 6px;
}

.gallery-scroll::-webkit-scrollbar-thumb {
  background: #334856;
  border-radius: 3px;
}

.screenshot {
  flex: 0 0 220px;
  height: 390px;
  border-radius: 12px;
  object-fit: cover;
  scroll-snap-align: start;
  cursor: zoom-in;
  transition: all 0.3s ease;
  background: #000;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.screenshot:hover {
  opacity: 1;
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

/* 4. Info Section */
.app-info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .app-info-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.info-card {
  background: rgba(33, 37, 54, 0.6);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.changelog-list {
  list-style: none;
  padding: 0;
  font-size: 14px;
  line-height: 1.5rem;
  white-space: pre-line;
}

.changelog-list li {
  margin-bottom: 0.8rem;
  position: relative;
  padding-left: 1.4rem;
  font-size: 14px;
  line-height: 1.6;
  color: #CFCDE4;
}

.changelog-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  background: #078AFE;
  border-radius: 50%;
}

.version-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #9191A8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.8rem;
}

.version-tag {
  background: #334856;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
  margin-right: 5px;
}

/* 5. Comments Preview */
.comment-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.2rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.comment-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.comment-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.comment-content {
  flex: 1;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.3rem;
}

.comment-content h4 {
  color: #fff;
  font-size: 14px;
  margin: 0;
  font-weight: 600;
}

.comment-date {
  font-size: 0.8rem;
  color: #5d6c7b;
}

.comment-content p {
  font-size: 13px;
  color: #a7a7a7;
  margin: 0;
  line-height: 1.5;
}

/* Modal for Image Zoom */
.image-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s;
  backdrop-filter: blur(5px);
}

.image-modal.show {
  display: flex;
  opacity: 1;
}

.image-modal img {
  max-width: 95%;
  max-height: 95%;
  border-radius: 8px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 20px;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.5);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  text-align: center;
  line-height: 40px;
}

/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

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

/* Download Progress Overlay */
.download-overlay {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  width: 0%;
  transition: width 0.1s linear;
}

.downloading {
  pointer-events: none;
  opacity: 0.9;
}

/* Responsive Adjustments */
@media (max-width: 480px) {
  .app-icon-large {
    width: 100px;
    height: 100px;
  }

  .btn-download {
    padding: 0 16px;
  }

  .btn-text {
    font-size: 1rem;
  }
}