/* app-detail.css — Shared styles for app detail pages */

body {
  background: var(--bg);
  color: var(--text);
  padding: 40px 20px;
  min-height: 100vh;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.back-link {
  display: inline-block;
  color: var(--brand);
  text-decoration: none;
  margin-bottom: 30px;
  font-size: 14px;
}

.back-link:hover {
  color: var(--brand-hover);
  text-decoration: underline;
}

.app-header {
  text-align: center;
  margin-bottom: 50px;
}

.app-logo {
  max-width: 300px;
  height: auto;
  margin-bottom: 20px;
}

h1 {
  font-size: 2.5rem;
  margin: 20px 0;
  color: var(--brand);
}

.subtitle {
  font-size: 1.2rem;
  color: var(--muted);
  margin-bottom: 40px;
}

.content-section {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 40px;
  margin-bottom: 30px;
}

h2 {
  color: var(--brand);
  margin-top: 0;
}

ul {
  line-height: 1.8;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 30px;
}

.feature-item {
  padding: 20px;
  background: var(--brand-bg);
  border-left: 3px solid var(--brand);
}

.feature-item h3 {
  margin-top: 0;
  color: var(--brand);
}

.manual-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--brand);
  border: 2px solid var(--brand);
  padding: 12px 28px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
  transition: background 0.2s, color 0.2s;
}

.manual-btn:hover {
  background: var(--brand);
  color: #ffffff;
}

/* Screenshot Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.gallery-grid.narrow-cols {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.gallery-item {
  text-align: center;
}

.gallery-item img {
  width: 100%;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: opacity 0.2s;
}

.gallery-item img:hover {
  opacity: 0.85;
}

.gallery-caption {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 10px;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  cursor: zoom-out;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 92vw;
  max-height: 90vh;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  z-index: 1001;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 48px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
  z-index: 1001;
  user-select: none;
  padding: 20px;
}

.lightbox-arrow:hover {
  opacity: 1;
}

.lightbox-arrow.prev {
  left: 20px;
}

.lightbox-arrow.next {
  right: 20px;
}

/* Bottom CTA area */
.cta-area {
  text-align: center;
  margin-top: 50px;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.cta-label {
  display: inline-block;
  background: var(--brand-bg);
  color: var(--muted);
  padding: 15px 40px;
  font-weight: bold;
}

/* System Requirements */
.sys-req {
  background: var(--brand-bg);
  border-left: 3px solid var(--brand);
}

.sys-req ul {
  list-style: none;
  padding: 0;
  margin: 0;
  line-height: 2.2;
}

/* Responsive */
@media (max-width: 768px) {
  .content-section {
    padding: 24px 16px;
  }
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-grid,
  .gallery-grid.narrow-cols {
    grid-template-columns: 1fr;
  }
  h1 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  body {
    padding: 20px 12px;
  }
  .content-section {
    padding: 20px 12px;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  h1 {
    font-size: 1.75rem;
  }
}

/* App-to-app navigation arrows */
.app-nav-arrows {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 48px 0 0;
  padding: 20px 0;
  border-top: 1px solid var(--border);
}

.app-nav-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 0;
  transition: color 0.2s;
}

.app-nav-arrow:hover {
  color: var(--brand);
}

.app-nav-arrow svg {
  flex-shrink: 0;
  transition: transform 0.2s;
}

.app-nav-prev:hover svg { transform: translateX(-3px); }
.app-nav-next:hover svg { transform: translateX(3px); }

/* Mobile Bottom Navigation for App Detail Pages */
.app-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  z-index: 998;
  justify-content: space-around;
  align-items: center;
  padding: 6px 0;
}

.app-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 16px;
  font-size: 0.7rem;
  font-weight: 400;
  min-height: 44px;
  min-width: 44px;
  transition: color 0.2s;
}

.app-bottom-nav a i {
  font-size: 1.2rem;
  color: var(--brand);
}

.app-bottom-nav a:active {
  color: var(--brand);
}

@media (max-width: 900px) {
  .app-bottom-nav {
    display: flex;
  }
  body {
    padding-bottom: 70px;
  }
}
