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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  background: #f5f7fa;
  color: #1a1a2e;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

.header {
  text-align: center;
  margin-bottom: 40px;
}

.app-icon {
  margin-bottom: 16px;
  display: inline-block;
}

.app-icon img {
  border-radius: 18px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.app-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.app-desc {
  font-size: 15px;
  color: #6b7280;
}

/* Card */
.card {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* About description */
.app-about {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.8;
}

/* Version info row */
.version-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #6b7280;
}

.version-badge strong {
  color: #1a1a2e;
  font-size: 18px;
}

.version-meta {
  font-size: 13px;
  color: #9ca3af;
}

/* Download button */
.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #4CAF50;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px 36px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  text-decoration: none;
}

.btn-download:hover {
  background: #43a047;
}

.btn-download:active {
  transform: scale(0.97);
}

.btn-download svg {
  width: 22px;
  height: 22px;
}

/* Changelog */
.changelog-list {
  list-style: none;
  padding: 0;
}

.changelog-list li {
  padding: 8px 0;
  font-size: 14px;
  color: #4b5563;
  border-bottom: 1px solid #f3f4f6;
}

.changelog-list li:last-child {
  border-bottom: none;
}

.changelog-list li::before {
  content: "•";
  color: #4CAF50;
  font-weight: bold;
  margin-right: 10px;
}

/* Version history */
.version-history-item {
  padding: 16px 0;
  border-bottom: 1px solid #f3f4f6;
}

.version-history-item:last-child {
  border-bottom: none;
}

.version-history-item .vh-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.version-history-item .vh-version {
  font-weight: 600;
  font-size: 15px;
}

.version-history-item .vh-date {
  font-size: 13px;
  color: #9ca3af;
}

.version-history-item .vh-changelog {
  font-size: 13px;
  color: #6b7280;
  padding-left: 16px;
}

.version-history-item .vh-changelog li {
  margin: 3px 0;
}

/* Screenshots */
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.screenshots-grid img {
  width: 100%;
  border-radius: 12px;
  aspect-ratio: 9 / 19;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.2s;
  cursor: pointer;
}

.screenshots-grid img:hover {
  transform: scale(1.03);
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #9ca3af;
  font-size: 14px;
}

.empty-state svg {
  margin-bottom: 12px;
  opacity: 0.4;
}

/* Loading */
.loading {
  text-align: center;
  padding: 60px 0;
  color: #9ca3af;
  font-size: 15px;
}

/* Footer */
.footer {
  text-align: center;
  padding: 40px 0 0;
  font-size: 13px;
  color: #d1d5db;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  user-select: none;
}

.lightbox.active {
  display: flex;
}

.lightbox-close {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  z-index: 1002;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.lightbox-close:hover {
  background: rgba(255,255,255,0.3);
}

.lightbox-img {
  max-width: 90%;
  max-height: 85%;
  border-radius: 8px;
  object-fit: contain;
  transition: opacity 0.2s;
}

.lightbox-counter {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  z-index: 1001;
}

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: none;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  z-index: 1002;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.lightbox-nav:hover {
  background: rgba(255,255,255,0.25);
}

.lightbox-nav.prev {
  left: 16px;
}

.lightbox-nav.next {
  right: 16px;
}

@media (max-width: 480px) {
  .lightbox-nav {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
  .lightbox-nav.prev {
    left: 8px;
  }
  .lightbox-nav.next {
    right: 8px;
  }
  .lightbox-close {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
}

/* Responsive */
@media (max-width: 480px) {
  .container {
    padding: 24px 16px 40px;
  }

  .card {
    padding: 20px;
  }

  .app-title {
    font-size: 24px;
  }

  .btn-download {
    width: 100%;
    justify-content: center;
  }

  .version-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .screenshots-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
}