/* ===== App Page - Reusable Template ===== */
/* Override these per-app for theming */
:root {
  --app-primary: var(--accent-red);
  --app-secondary: var(--accent-cyan);
}

/* ===== App Hero ===== */
.app-hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  padding-bottom: 60px;
  position: relative;
  overflow: hidden;
}

.app-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(233, 69, 96, 0.1) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 50%, rgba(0, 212, 255, 0.1) 0%, transparent 60%);
  pointer-events: none;
}

.app-hero .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  position: relative;
  z-index: 1;
}

.app-hero-text {
  flex: 1;
}

.app-hero-text .app-label {
  display: inline-block;
  background: rgba(233, 69, 96, 0.15);
  color: var(--app-primary);
  padding: 6px 16px;
  border-radius: var(--radius-xl);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 20px;
  border: 1px solid rgba(233, 69, 96, 0.3);
}

.app-hero-text h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.app-hero-text h1 .word-colored {
  color: var(--app-primary);
}

.app-hero-text .app-description {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 480px;
  line-height: 1.7;
}

.app-hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.app-hero-visual {
  position: relative;
}

/* ===== Screenshots Section ===== */
.screenshots-section {
  background: var(--bg-medium);
}

.screenshots-carousel {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}

.screenshot-item {
  width: 220px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.screenshot-item:hover {
  transform: scale(1.05);
}

.screenshot-item img {
  border-radius: var(--radius-lg);
  border: 3px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.screenshot-item:hover img {
  border-color: var(--app-primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(233, 69, 96, 0.2);
}

.screenshot-label {
  text-align: center;
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
}

/* Screenshot lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-height: 90vh;
  max-width: 90vw;
  border-radius: var(--radius-lg);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
}

/* ===== Features Section ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 30px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 212, 255, 0.2);
}

.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 16px;
  background: rgba(0, 212, 255, 0.1);
}

.feature-card h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ===== Power-ups Section ===== */
.powerups-section {
  background: var(--bg-medium);
}

.powerups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 20px;
}

.powerup-item {
  text-align: center;
  padding: 24px 16px;
  border-radius: var(--radius-lg);
  background: var(--bg-dark);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.powerup-item:hover {
  transform: translateY(-5px);
}

.powerup-orb {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.powerup-item h4 {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.powerup-item p {
  color: var(--text-dim);
  font-size: 0.75rem;
}

/* ===== Skins Section ===== */
.skins-showcase {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.skin-item {
  text-align: center;
  transition: transform 0.3s ease;
}

.skin-item:hover {
  transform: scale(1.1);
}

.skin-ball {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 8px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  transition: box-shadow 0.3s ease;
}

.skin-item:hover .skin-ball {
  box-shadow: 0 0 20px currentColor;
}

.skin-name {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.skin-price {
  font-size: 0.7rem;
  color: var(--accent-gold);
}

/* ===== CTA Section ===== */
.cta-section {
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(233, 69, 96, 0.1), rgba(0, 212, 255, 0.1));
  pointer-events: none;
}

.cta-section .container {
  position: relative;
  z-index: 1;
}

.cta-section h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.cta-section p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .app-hero .container {
    flex-direction: column-reverse;
    text-align: center;
  }

  .app-hero-text h1 {
    font-size: 2.5rem;
  }

  .app-hero-text .app-description {
    margin-left: auto;
    margin-right: auto;
  }

  .app-hero-buttons {
    justify-content: center;
  }

  .phone-mockup {
    width: 200px;
  }

  .screenshots-carousel {
    gap: 16px;
  }

  .screenshot-item {
    width: 160px;
  }

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

  .powerups-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .app-hero-text h1 {
    font-size: 2rem;
  }

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

  .powerups-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .screenshot-item {
    width: 130px;
  }
}
