/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #007aff;
  --primary-dark: #0051d5;
  --secondary-color: #5856d6;
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f7;
  --border-color: #d2d2d7;
  --success-color: #34c759;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styles */
.header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 24px;
  font-weight: 700;
  transition: var(--transition);
}

.logo:hover {
  transform: translateY(-2px);
}

.logo-icon {
  font-size: 28px;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 32px;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: var(--transition);
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--primary-color);
}

.nav-link:hover::after {
  width: 100%;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 120px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.8s ease-out;
}

.hero-title {
  font-size: 56px;
  font-weight: 800;
  color: white;
  margin-bottom: 20px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-button {
  display: inline-block;
  background: white;
  color: var(--primary-color);
  padding: 16px 40px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: var(--transition);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Stats Section */
.stats-section {
  padding: 60px 0;
  background: var(--bg-secondary);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  text-align: center;
}

.stat-card {
  animation: fadeInUp 0.8s ease-out;
}

.stat-number {
  font-size: 48px;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.stat-label {
  font-size: 16px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Apps Section */
.apps-section {
  padding: 80px 0;
}

.section-title {
  font-size: 42px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 60px;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.app-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--border-color);
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
}

.app-card:nth-child(1) {
  animation-delay: 0.05s;
}
.app-card:nth-child(2) {
  animation-delay: 0.1s;
}
.app-card:nth-child(3) {
  animation-delay: 0.15s;
}
.app-card:nth-child(4) {
  animation-delay: 0.2s;
}
.app-card:nth-child(5) {
  animation-delay: 0.25s;
}
.app-card:nth-child(6) {
  animation-delay: 0.3s;
}

.app-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.app-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.app-icon {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.app-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

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

.app-info {
  padding: 24px;
}

.app-name {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.app-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.5;
}

.app-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.app-category {
  display: inline-block;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}

.app-commission {
  color: var(--success-color);
  font-weight: 600;
  font-size: 13px;
}

/* Features Section */
.features-section {
  padding: 80px 0;
  background: var(--bg-secondary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 32px;
  margin-top: 60px;
}

.feature-card {
  text-align: center;
  padding: 32px;
  background: white;
  border-radius: 16px;
  transition: var(--transition);
  animation: fadeInUp 0.8s ease-out;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.feature-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.feature-description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Footer Styles */
.footer {
  background: var(--text-primary);
  color: rgba(255, 255, 255, 0.8);
  padding: 60px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-title {
  font-size: 24px;
  font-weight: 700;
  color: white;
  margin-bottom: 16px;
}

.footer-description {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.social-links {
  display: flex;
  gap: 16px;
}

.social-link {
  color: rgba(255, 255, 255, 0.6);
  transition: var(--transition);
}

.social-link:hover {
  color: white;
  transform: translateY(-2px);
}

.footer-section-title {
  font-size: 16px;
  font-weight: 600;
  color: white;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
}

.footer-links a:hover {
  color: white;
  padding-left: 4px;
}

.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 14px;
}

.footer-legal {
  display: flex;
  gap: 24px;
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: var(--transition);
}

.footer-legal a:hover {
  color: white;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 20px;
    box-shadow: var(--shadow-md);
    display: none;
    gap: 16px;
  }

  .nav-menu.active {
    display: flex;
  }

  .hero-title {
    font-size: 36px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .section-title {
    font-size: 32px;
  }

  .apps-grid {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 80px 0 60px;
  }

  .hero-title {
    font-size: 28px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .stat-number {
    font-size: 36px;
  }
}

/* App Detail Page Styles */
.app-detail-hero {
  padding: 60px 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.app-detail-container {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  align-items: start;
}

.app-detail-icon {
  width: 200px;
  height: 200px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: white;
}

.app-detail-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-detail-info {
  color: white;
}

.app-detail-title {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 16px;
}

.app-detail-subtitle {
  font-size: 20px;
  margin-bottom: 24px;
  opacity: 0.9;
}

.app-detail-cta {
  display: inline-block;
  background: white;
  color: var(--primary-color);
  padding: 16px 40px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: var(--transition);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.app-detail-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.app-detail-content {
  padding: 80px 0;
}

.content-section {
  margin-bottom: 60px;
}

.content-section h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 24px;
}

.content-section p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.features-list {
  list-style: none;
  display: grid;
  gap: 16px;
}

.features-list li {
  padding: 20px;
  background: var(--bg-secondary);
  border-radius: 12px;
  display: flex;
  align-items: start;
  gap: 12px;
}

.features-list li::before {
  content: "✓";
  color: var(--success-color);
  font-weight: 700;
  font-size: 20px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.pricing-card {
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  transition: var(--transition);
}

.pricing-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.pricing-card h3 {
  font-size: 24px;
  margin-bottom: 16px;
}

.pricing-card .price {
  font-size: 36px;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .app-detail-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .app-detail-icon {
    margin: 0 auto;
  }

  .app-detail-title {
    font-size: 32px;
  }
}
