/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }


html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  line-height: 1.6;
  display: flex;
  min-height: 100vh;
}

a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Sidebar ─────────────────────────────────────────────────── */
#sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--nav-w);
  height: 100vh;
  background: var(--bg3);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 0 0 24px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 2px 0 12px rgba(0,0,0,0.06);
}

#sidebar .brand {
  padding: 28px 20px 20px;
  border-bottom: 1px solid var(--border);
}

#sidebar .brand h1 {
  font-size: 1.15rem;
  font-weight: 700;
  background: linear-gradient(120deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#sidebar .brand p {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 4px;
}

#sidenav {
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
}

#sidenav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

#sidenav a:hover,
#sidenav a.active {
  background: var(--bg2);
  color: var(--text);
  text-decoration: none;
}

#sidenav a.active {
  color: var(--accent);
  font-weight: 600;
}

#sidenav .icon { font-size: 1rem; width: 20px; text-align: center; }

.nav-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 6px 12px;
}

.nav-group-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 12px 12px 4px;
}

#sidenav a.nav-sub {
  padding-left: 2.2rem;
  font-size: 0.83rem;
}

/* ── Main content ────────────────────────────────────────────── */
#main {
  margin-left: var(--nav-w);
  flex: 1;
  min-width: 0;
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(90,61,232,0.1) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 80%, rgba(0,153,204,0.08) 0%, transparent 60%),
    var(--bg);
}

.hero-badge {
  display: inline-block;
  background: rgba(90,61,232,0.1);
  border: 1px solid rgba(90,61,232,0.3);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text) 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.4rem;
}

.hero p {
  max-width: 580px;
  color: var(--muted);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}


/* ── Sections ───────────────────────────────────────────────── */
section { padding: 5rem 2rem; }

.section-title {
  text-align: center;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.section-sub {
  text-align: center;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 3rem;
  font-size: 1rem;
}

/* ── Features ───────────────────────────────────────────────── */
#features { background: var(--bg2); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.feature-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.feature-card:hover {
  border-color: rgba(90,61,232,0.35);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(90,61,232,0.1);
}

.feature-icon { font-size: 2rem; margin-bottom: 0.9rem; }
.feature-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.5rem; }
.feature-card p  { font-size: 0.9rem; color: var(--muted); }

/* ── Apps Section ───────────────────────────────────────────── */
#apps { background: var(--bg); }

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.app-card {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  text-decoration: none;
  color: var(--text);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.app-card:hover {
  border-color: rgba(90,61,232,0.35);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(90,61,232,0.1);
  text-decoration: none;
}

.app-card-icon { font-size: 2rem; flex-shrink: 0; line-height: 1; }
.app-card-body { flex: 1; }
.app-card-body h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.4rem; }
.app-card-body p  { font-size: 0.88rem; color: var(--muted); line-height: 1.55; }
.app-card-arrow   { font-size: 1.2rem; color: var(--accent); align-self: center; flex-shrink: 0; }

/* ── App Detail Pages ───────────────────────────────────────── */
.app-hero {
  padding: 5rem 2rem 4rem;
  text-align: center;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(90,61,232,0.1) 0%, transparent 70%),
    var(--bg);
}

.back-link {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  transition: color var(--transition);
}
.back-link:hover { color: var(--text); text-decoration: none; }

.app-title {
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text) 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.2rem;
}

.app-subtitle {
  max-width: 620px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.1rem;
}

.app-about-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 780px;
  margin: 0 auto;
}

.app-desc p {
  margin-bottom: 1rem;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.7;
}
.app-desc p strong { color: var(--text); }

.feature-list {
  list-style: none;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.feature-list li {
  font-size: 0.9rem;
  color: var(--text);
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.feature-list li:last-child { border-bottom: none; }
.feature-list li::before {
  content: '✓';
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.screenshot-item {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg3);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}
.screenshot-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}
.screenshot-item img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
}
.screenshot-item p {
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.screenshot-placeholder {
  aspect-ratio: 16/10;
  background: var(--bg2);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.placeholder-icon { font-size: 2rem; }

/* ── Individual App Sections ────────────────────────────────── */
.app-section {
  background: var(--bg3);
  border-top: 1px solid var(--border);
  padding: 3rem 3rem;
  max-width: 100%;
}

.app-section:nth-child(even) { background: var(--bg2); }

.app-section-header {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.app-section-icon {
  font-size: 2.2rem;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(90,61,232,0.08);
  border-radius: 12px;
  flex-shrink: 0;
}

.app-section-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.app-section-header p {
  font-size: 0.93rem;
  color: var(--muted);
  line-height: 1.6;
}

.app-feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.app-feature-list li {
  font-size: 0.88rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.app-feature-list li::before {
  content: '✓';
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

.app-section-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: gap var(--transition);
}
.app-section-link:hover { gap: 0.6rem; text-decoration: none; }

/* ── Gallery ────────────────────────────────────────────────── */
#gallery { background: var(--bg); }

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
}

.filter-btn {
  padding: 0.45rem 1.2rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--muted);
  transition: all var(--transition);
}
.filter-btn:hover { color: var(--text); border-color: rgba(0,0,0,0.2); }
.filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg3);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}
.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.gallery-item-info { padding: 0.75rem 1rem; }
.gallery-item-info .caption      { font-size: 0.85rem; color: var(--text); font-weight: 500; }
.gallery-item-info .category-tag { font-size: 0.75rem; color: var(--accent2); margin-top: 0.2rem; }

.gallery-status {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.gallery-status.error { color: #cc3333; }

/* ── Lightbox ───────────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }

.lightbox-inner {
  position: relative;
  max-width: min(90vw, 1100px);
  max-height: 90vh;
}

.lightbox-inner img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: var(--radius);
  display: block;
}

.lightbox-caption {
  text-align: center;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

.lightbox-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  transition: background var(--transition);
}
.lightbox-nav:hover { background: rgba(255,255,255,0.3); }
.lightbox-nav.prev  { left: -3.5rem; }
.lightbox-nav.next  { right: -3.5rem; }

/* ── Footer ─────────────────────────────────────────────────── */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 2.5rem 2rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-logo {
  font-size: 1.1rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.6rem;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  #sidebar { display: none; }
  #main { margin-left: 0; }
  .lightbox-nav.prev { left: -2rem; }
  .lightbox-nav.next { right: -2rem; }
}
