@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css');

:root {
  --primary-color: #BD57E7;
  --accent-primary: #8E4FF8;
  --bg-primary: #FFFFFF;
  --bg-secondary: #F5F5F7;
  --bg-tertiary: #FAFAFA;
  --text-primary: #1D1D1F;
  --text-secondary: #86868B;
  --text-tertiary: #6E6E73;
  --border-color: #D2D2D7;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --radius: 12px;
  --radius-lg: 20px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Navbar */
.navbar {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
}

.navbar .logo img {
  height: 40px;
}

.navbar-menu {
  display: flex;
  gap: 32px;
  list-style: none;
}

.navbar-menu li a {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.navbar-menu li a:hover {
  color: var(--accent-primary);
}

.navbar .auth-buttons {
  display: flex;
  gap: 12px;
}

.btn-login {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s;
}

.btn-register {
  background: var(--accent-primary);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
}

.btn-login:hover {
  background: var(--bg-secondary);
}

.btn-register:hover {
  background: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Main Container */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  background: var(--bg-primary);
}

/* App Header */
.app-header {
  display: flex;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border-color);
}

.app-icon-container {
  flex-shrink: 0;
}

.app-icon {
  width: 120px;
  height: 120px;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  object-fit: cover;
}

.app-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.app-name {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.app-developer {
  font-size: 16px;
  color: var(--accent-primary);
  font-weight: 500;
  margin: 0;
}

.app-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.stars {
  color: #FFD700;
  font-size: 16px;
  letter-spacing: -2px;
}

.rating-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.rating-count {
  font-size: 14px;
  color: var(--text-secondary);
}

.app-badges {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.badge {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.app-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
}

.btn-download {
  background: var(--accent-primary);
  color: white;
  border: none;
  padding: 12px 32px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-md);
}

.btn-download:hover {
  background: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-download.btn-primary {
  min-width: 120px;
  justify-content: center;
}

.btn-share {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-primary);
}

.btn-share:hover {
  background: var(--bg-tertiary);
}

/* Screenshots Section */
.screenshots-section {
  padding: 32px 0;
  border-bottom: 1px solid var(--border-color);
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.screenshots-container {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  scrollbar-width: thin;
}

.screenshots-container::-webkit-scrollbar {
  height: 8px;
}

.screenshots-container::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 4px;
}

.screenshots-container::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.screenshot-item {
  flex-shrink: 0;
  width: 200px;
  height: 400px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.screenshot-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: var(--bg-secondary);
}

.screenshot-item img[src=""],
.screenshot-item img:not([src]) {
  background: linear-gradient(135deg, var(--accent-primary), var(--primary-color));
  display: flex;
  align-items: center;
  justify-content: center;
}

.screenshot-item img[src=""]::before,
.screenshot-item img:not([src])::before {
  content: "Image";
  color: white;
  font-size: 14px;
}

/* App Description */
.app-description {
  padding: 32px 0;
  border-bottom: 1px solid var(--border-color);
}

.description-text {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.description-expanded {
  margin-top: 16px;
}

.description-expanded p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.read-more-btn {
  background: none;
  border: none;
  color: var(--accent-primary);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
}

/* What's New */
.whats-new {
  padding: 32px 0;
  border-bottom: 1px solid var(--border-color);
}

.whats-new h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
}

.version-info {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--text-secondary);
}

.version-number {
  font-weight: 600;
  color: var(--text-primary);
}

.update-content ul {
  list-style: none;
  padding-left: 0;
}

.update-content li {
  padding: 8px 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
}

/* Features Section */
.features-section {
  padding: 32px 0;
  border-bottom: 1px solid var(--border-color);
}

.features-section h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

.feature-item {
  text-align: center;
  padding: 24px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
}

.feature-item i {
  font-size: 40px;
  color: var(--accent-primary);
  margin-bottom: 12px;
}

.feature-item h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-item p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* App Information */
.app-information {
  padding: 32px 0;
  border-bottom: 1px solid var(--border-color);
}

.app-information h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.info-label {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.info-value {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 400;
}

/* Download Guide */
.download-guide {
  padding: 32px 0;
}

.download-guide h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
}

.download-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.download-option {
  background: var(--bg-secondary);
  padding: 32px;
  border-radius: var(--radius-lg);
  text-align: center;
  border: 1px solid var(--border-color);
}

.download-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: var(--accent-primary);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 32px;
}

.download-option h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.download-option p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.btn-download-platform {
  background: var(--accent-primary);
  color: white;
  padding: 12px 24px;
  border-radius: 20px;
  font-weight: 600;
  display: inline-block;
  transition: all 0.2s;
  box-shadow: var(--shadow-md);
}

.btn-download-platform:hover {
  background: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.download-note {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 12px;
}

/* Game Categories */
.game-categories {
  padding: 32px 0;
  border-bottom: 1px solid var(--border-color);
}

.section-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.game-categories h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.category-card {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  transition: all 0.2s;
}

.category-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.category-card img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
}

.category-info {
  flex: 1;
}

.category-info h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.category-info p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.rtp-badge {
  display: inline-block;
  background: var(--accent-primary);
  color: white;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}

/* Download Steps */
.download-steps {
  margin-top: 20px;
  text-align: left;
}

.download-steps h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.download-steps ol {
  margin-left: 20px;
  color: var(--text-secondary);
}

.download-steps li {
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.5;
}

/* Reviews Section */
.reviews-section {
  padding: 32px 0;
  border-bottom: 1px solid var(--border-color);
}

.reviews-section h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
}

.reviews-summary {
  margin-bottom: 32px;
}

.rating-breakdown {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rating-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rating-stars {
  width: 40px;
  font-size: 14px;
  color: var(--text-secondary);
}

.rating-bar {
  flex: 1;
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
}

.rating-fill {
  height: 100%;
  background: var(--accent-primary);
  border-radius: 4px;
}

.rating-percent {
  width: 40px;
  text-align: right;
  font-size: 14px;
  color: var(--text-secondary);
}

.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.review-item {
  padding: 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.reviewer-info {
  display: flex;
  gap: 12px;
  align-items: center;
}

.reviewer-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

.reviewer-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.review-date {
  font-size: 12px;
  color: var(--text-secondary);
}

.review-rating {
  color: #FFD700;
  font-size: 14px;
}

.review-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
}

/* Featured Games Section */
.featured-games {
  padding: 32px 0;
  border-bottom: 1px solid var(--border-color);
}

.featured-games h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.featured-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.featured-game-card {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: all 0.3s;
}

.featured-game-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.featured-game-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}

.game-info {
  padding: 16px;
}

.game-info h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.game-info p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.btn-play-small {
  background: var(--accent-primary);
  color: white;
  padding: 8px 16px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  display: inline-block;
  transition: all 0.2s;
  width: 100%;
  text-align: center;
}

.btn-play-small:hover {
  background: var(--primary-color);
  transform: translateY(-2px);
}

/* Promo Banner Section */
.promo-banner-section {
  padding: 32px 0;
  border-bottom: 1px solid var(--border-color);
}

.promo-banner {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: all 0.3s;
  display: block;
}

.promo-banner:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* FAQ Section */
.faq {
  padding: 32px 0;
  border-top: 1px solid var(--border-color);
}

.faq h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
}

.faq-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.faq-item p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Footer */
.footer {
  background: var(--bg-primary);
  padding: 40px 20px;
  margin-top: 40px;
  border-top: 1px solid var(--border-color);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.footer-logo img {
  height: 40px;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 14px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent-primary);
}

.footer-copy {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
}

.footer-copy a {
  color: var(--accent-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
  .navbar {
    padding: 12px 16px;
  }

  .navbar-menu {
    display: none;
  }

  .app-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 0;
  }

  .app-icon {
    width: 100px;
    height: 100px;
  }

  .app-name {
    font-size: 28px;
  }

  .app-actions {
    width: 100%;
    flex-direction: row;
    justify-content: center;
  }

  .screenshot-item {
    width: 160px;
    height: 320px;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .download-options {
    grid-template-columns: 1fr;
  }

  .categories-grid {
    grid-template-columns: 1fr;
  }

  .rating-breakdown {
    gap: 8px;
  }
}

@media (max-width: 480px) {
  main {
    padding: 0 16px;
  }

  .app-icon {
    width: 80px;
    height: 80px;
  }

  .app-name {
    font-size: 24px;
  }

  .screenshot-item {
    width: 140px;
    height: 280px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .categories-grid {
    grid-template-columns: 1fr;
  }

  .category-card {
    flex-direction: column;
    text-align: center;
  }

  .category-card img {
    width: 100px;
    height: 100px;
  }
}
