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

html {
  scroll-behavior: smooth;
  min-height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #333;
  min-height: 100vh;
  line-height: 1.6;
  background: #14161a;
  position: relative;
}

#content {
  position: relative;
  z-index: 1;
}

/* ─── Header ─── */
header {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 2rem 1.5rem;
  text-align: left;
  position: relative;
  z-index: 2;
}

header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: #e8ecf0;
  letter-spacing: -0.03em;
  margin-bottom: 0.15rem;
}

header p {
  color: #9ca3af;
  font-size: 1rem;
  font-weight: 500;
}

/* ─── Container ─── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 2rem;
  position: relative;
  z-index: 2;
}

/* ─── Section Title ─── */
.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: #e8ecf0;
}

/* ─── App Cards Grid ─── */
.app-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

/* ─── App Card ─── */
.app-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
}

.app-card:hover {
  border-color: #d1d5db;
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

/* ─── Main Screenshot (clickable) ─── */
.app-card .main-shot {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
  background: #e5e7eb;
  cursor: pointer;
  transition: filter 0.2s;
}

.app-card .main-shot:hover {
  filter: brightness(1.05);
}

/* ─── Card Body ─── */
.app-card .card-body {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.app-card .icon-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.app-card .icon-row img {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.app-card .icon-row h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #111;
  margin: 0;
}

.app-card .tagline {
  font-size: 0.8rem;
  color: #6b7280;
  font-weight: 500;
  margin-bottom: 0.6rem;
}

.app-card .description {
  font-size: 0.85rem;
  color: #4b5563;
  line-height: 1.65;
  margin-bottom: 1rem;
  flex: 1;
}

.app-card .cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 1.1rem;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s ease;
  align-self: flex-start;
  margin-top: auto;
}

.app-card .cta:hover {
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

/* ─── Lightbox ─── */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 2rem;
}

.lightbox.open {
  display: flex;
}

.lightbox .lb-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  transition: background 0.2s;
  border: none;
  z-index: 10;
}

.lightbox .lb-close:hover {
  background: rgba(255,255,255,0.2);
}

.lightbox .lb-img {
  max-width: 95vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox .lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: background 0.2s;
  z-index: 10;
}

.lightbox .lb-nav:hover {
  background: rgba(255,255,255,0.25);
}

.lightbox .lb-prev {
  left: 1rem;
}

.lightbox .lb-next {
  right: 1rem;
}

.lightbox .lb-counter {
  position: absolute;
  bottom: 1.5rem;
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  font-weight: 500;
}

/* ─── Footer ─── */
footer {
  text-align: center;
  padding: 3rem 2rem 4rem;
  color: #6b7280;
  font-size: 0.82rem;
  margin-top: 4rem;
  border-top: 1px solid #2a2d35;
}

footer a {
  color: #2563eb;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* ─── Responsive ─── */
@media (max-width: 700px) {
  header { padding: 1.5rem 1.25rem 1rem; text-align: left; }
  header h1 { font-size: 2rem; }
  .container { padding: 0 1rem 1rem; }
  .app-card .main-shot { height: 200px; }
  .app-list { grid-template-columns: 1fr; }
  .lightbox .lb-nav { width: 40px; height: 40px; font-size: 1.2rem; }
  .lightbox .lb-prev { left: 0.5rem; }
  .lightbox .lb-next { right: 0.5rem; }
}

/* ─── Settings Button ─── */
#settingsBtn {
  position: fixed;
  top: 1.25rem;
  left: 1.25rem;
  z-index: 10000;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.35);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.05rem;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  backdrop-filter: blur(2px);
  line-height: 1;
}
#settingsBtn.visible {
  display: flex;
}
#settingsBtn:hover,
#settingsBtn.active {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.65);
  border-color: rgba(255,255,255,0.3);
}

/* ─── Settings Panel ─── */
#settingsPanel {
  display: none;
  position: fixed;
  top: 4rem;
  left: 1.25rem;
  z-index: 9999;
  background: rgba(20,22,26,0.95);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  width: 320px;
  max-height: calc(100vh - 6rem);
  overflow: hidden;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
#settingsPanel.open {
  display: flex;
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 0.82rem;
  font-weight: 600;
  color: #c8ccd0;
  flex-shrink: 0;
}

.settings-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.35);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.settings-close:hover {
  color: rgba(255,255,255,0.7);
}

.settings-body {
  overflow-y: auto;
  padding: 0.25rem 0 0.5rem;
}

.settings-body::-webkit-scrollbar {
  width: 4px;
}
.settings-body::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
}

.settings-section {
  padding: 0.6rem 1rem 0.15rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: #6688cc;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.settings-row {
  display: flex;
  align-items: center;
  padding: 0.25rem 1rem;
  gap: 0.5rem;
}

.settings-label {
  font-size: 0.75rem;
  color: #9ca3af;
  width: 85px;
  flex-shrink: 0;
}

.settings-slider {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255,255,255,0.12);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.settings-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #6688cc;
  cursor: pointer;
  border: none;
}
.settings-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #6688cc;
  cursor: pointer;
  border: none;
}

.settings-val {
  font-size: 0.72rem;
  color: #c8ccd0;
  width: 38px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.settings-color-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.settings-color {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  padding: 0;
  cursor: pointer;
  background: none;
}
.settings-color::-webkit-color-swatch-wrapper {
  padding: 2px;
}
.settings-color::-webkit-color-swatch {
  border: none;
  border-radius: 3px;
}
.settings-color::-moz-color-swatch {
  border: none;
  border-radius: 3px;
}

.settings-hex {
  font-size: 0.72rem;
  color: #9ca3af;
  font-family: monospace;
}

/* ─── Hide Button ─── */
#hideBtn {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: 9999;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.35);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  backdrop-filter: blur(2px);
  line-height: 1;
}
#hideBtn:hover {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.65);
  border-color: rgba(255,255,255,0.25);
}

#content.hidden { display: none !important; }


