:root {
  --bg-base: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-hover: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --accent: #2563eb;

  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg-base: #0f172a;
  --bg-surface: #1e293b;
  --bg-surface-hover: #334155;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --accent: #3b82f6;
  --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.5);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-base);
  color: var(--text-main);
  line-height: 1.6;
  transition:
    background-color 0.3s,
    color 0.3s;
}

a {
  color: inherit;
  text-decoration: none;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg-surface) 80%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  z-index: 100;
}
.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand {
  font-size: 1.25rem;
  font-weight: 700;
}
.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

/* Hero */
.hero {
  text-align: center;
  max-width: 800px;
  padding-top: 2rem;
  padding-bottom: 1.5rem;
}
.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  margin-bottom: 0.4rem;
  letter-spacing: -1px;
}
.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Buttons & Filters */
.btn {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  background: var(--bg-surface);
  color: var(--text-main);
}
.category-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.filter-chip {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
}
.filter-chip.active,
.filter-chip:hover {
  background: var(--text-main);
  color: var(--bg-base);
}

/* App Grid */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.app-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;

  /* Vertical card */
  min-height: 380px;

  transition: var(--transition);
}

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

.app-card-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.app-icon {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 4px 10px rgb(0 0 0 / 0.12);
}

.app-title {
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.3;
}

.app-platforms {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.app-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.app-card-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
  margin-top: auto;
}

/* App Detail Page */
.app-detail-header {
  display: flex;
  gap: 2rem;
  padding: 4rem 0;
  align-items: flex-start;
}
.app-detail-icon {
  width: 128px;
  height: 128px;
  border-radius: 28px;
  box-shadow: var(--shadow-md);
}
.app-detail-info h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}
.app-detail-tagline {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.store-buttons-container {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.store-btn {
  background: var(--text-main);
  color: var(--bg-base);
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  display: inline-block;
  transition: var(--transition);
}
.store-btn:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

.app-detail-body {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}
.screenshots-gallery {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 1rem 0;
}
.screenshot {
  height: 400px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}
.feature-list {
  color: var(--text-muted);
  padding-left: 1.5rem;
  line-height: 2;
}

.app-sidebar {
  background: var(--bg-surface);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  height: fit-content;
}
.sidebar-info .label {
  color: var(--text-muted);
  display: block;
  margin-top: 1rem;
  font-size: 0.875rem;
}

/* Small scroll-to-top button */
.scroll-top {
  position: fixed;
  right: 20px;
  bottom: 20px;

  width: 38px;
  height: 38px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid var(--border-color);
  border-radius: 50%;

  background: var(--bg-surface);
  color: var(--text-main);

  cursor: pointer;
  z-index: 99;

  box-shadow: var(--shadow-md);

  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);

  transition:
    opacity 0.2s ease,
    visibility 0.2s ease,
    transform 0.2s ease,
    background-color 0.2s ease;
}

.scroll-top:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top i {
  font-size: 16px;
}

/* =========================
   Footer
   ========================= */

.footer {
  margin-top: 5rem;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
}

.footer-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: 3rem;
  padding-top: 4rem;
  padding-bottom: 3rem;
}

.footer-column h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-brand p,
.footer-column p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 320px;
}

/* Logo */

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-logo img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
}

.footer-logo span {
  display: flex;
  flex-direction: column;
}

.footer-logo strong {
  font-size: 1.05rem;
}

.footer-logo small {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 2px;
}

/* Links */

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.7rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
  transform: translateX(2px);
}

.footer-links i {
  width: 16px;
  text-align: center;
}

/* Bottom */

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
  margin: 0;
}

/* Footer clickable content */

.footer a {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.footer-logo {
  user-select: none;
  -webkit-user-select: none;
}

.footer-logo strong,
.footer-logo small {
  cursor: pointer;
}

.footer-company-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.footer-company-link:hover {
  color: var(--accent);
}

/* Category Filters */
.filter-chip {
  color: var(--text-main);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.filter-chip:hover {
  color: var(--text-main);
  background: var(--bg-surface-hover);
  border-color: var(--accent);
}

.filter-chip.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

[data-theme="dark"] .filter-chip {
  color: var(--text-main);
  background: var(--bg-surface);
}

[data-theme="dark"] .filter-chip:hover {
  color: #fff;
  background: var(--bg-surface-hover);
  border-color: var(--accent);
}

[data-theme="dark"] .filter-chip.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}
/* Mobile */

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-top: 3rem;
    padding-bottom: 2rem;
  }

  .footer-brand p,
  .footer-column p {
    max-width: none;
  }
}

@media (max-width: 480px) {
  .scroll-top {
    right: 14px;
    bottom: 14px;
    width: 34px;
    height: 34px;
  }

  .scroll-top i {
    font-size: 14px;
  }
}

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

@media (max-width: 768px) {
  .app-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .app-card {
    min-height: 350px;
    padding: 1rem;
  }

  .app-icon {
    width: 80px;
    height: 80px;
    border-radius: 18px;
  }
}

@media (max-width: 480px) {
  .app-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .app-card {
    min-height: 320px;
    padding: 0.85rem;
  }

  .app-icon {
    width: 72px;
    height: 72px;
  }

  .app-title {
    font-size: 1rem;
  }

  .app-desc {
    font-size: 0.82rem;
  }
}
.hero-title {
  font-size: clamp(1.08rem, 2.4vw, 1.5rem);
}
.hero p {
  font-size: clamp(0.9rem, 1.68vw, 1.08rem);
}
/* =====================================================
   DYNAMIC NAVBAR
   ===================================================== */

.navbar {
  position: relative;
  z-index: 1000;

  width: 100%;

  border-bottom: 1px solid var(--border-color);

  background: color-mix(in srgb, var(--bg-surface) 92%, transparent);

  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav-content {
  position: relative;

  display: flex;

  align-items: center;
  justify-content: space-between;

  min-height: 70px;
}

.brand {
  color: var(--text-main);

  text-decoration: none;

  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;

  transition: var(--transition);
}

.brand:hover {
  color: var(--accent);
}

/* =====================================================
   DESKTOP LINKS
   ===================================================== */

.nav-links {
  display: flex;

  align-items: center;

  gap: 5px;
}

.nav-links a {
  position: relative;

  padding: 9px 12px;

  border-radius: 8px;

  color: var(--text-muted);

  text-decoration: none;

  font-size: 13px;
  font-weight: 600;

  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--text-main);

  background: var(--bg-surface-hover);
}

.nav-links a.active {
  color: var(--accent);

  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.nav-links a.active::after {
  content: "";

  position: absolute;

  left: 50%;
  bottom: 3px;

  width: 4px;
  height: 4px;

  border-radius: 50%;

  background: var(--accent);

  transform: translateX(-50%);
}

/* =====================================================
   THEME BUTTON
   ===================================================== */

.theme-toggle {
  display: flex;

  align-items: center;
  justify-content: center;

  width: 38px;
  height: 36px;

  margin-left: 5px;

  border: 1px solid var(--border-color);

  border-radius: 9px;

  cursor: pointer;

  font-size: 15px;

  transition: var(--transition);
}

.theme-toggle:hover {
  transform: translateY(-1px);

  border-color: var(--accent);
}

/* =====================================================
   HAMBURGER
   Hidden on desktop
   ===================================================== */

.mobile-menu-button {
  display: none;

  align-items: center;
  justify-content: center;
  flex-direction: column;

  gap: 4px;

  width: 42px;
  height: 42px;

  padding: 0;

  border: 1px solid var(--border-color);
  border-radius: 10px;

  color: var(--text-main);
  background: var(--bg-surface);

  cursor: pointer;

  transition: var(--transition);
}

.mobile-menu-button:hover {
  border-color: var(--accent);
}

.mobile-menu-button span {
  display: block;

  width: 17px;
  height: 2px;

  border-radius: 2px;

  background: currentColor;

  transition:
    transform 0.25s ease,
    opacity 0.2s ease;
}

/* =====================================================
   HAMBURGER → X
   ===================================================== */

.navbar.menu-open .mobile-menu-button span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.navbar.menu-open .mobile-menu-button span:nth-child(2) {
  opacity: 0;
}

.navbar.menu-open .mobile-menu-button span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* =====================================================
   MOBILE / NARROW
   ===================================================== */

@media (max-width: 700px) {
  .nav-content {
    min-height: 62px;
  }

  .mobile-menu-button {
    display: flex;
  }

  .nav-links {
    position: absolute;

    top: calc(100% + 8px);
    right: 0;

    width: min(260px, calc(100vw - 24px));

    display: flex;

    flex-direction: column;

    align-items: stretch;

    gap: 4px;

    padding: 8px;

    border: 1px solid var(--border-color);

    border-radius: 14px;

    background: var(--bg-surface);

    box-shadow: 0 18px 50px rgb(0 0 0 / 0.14);

    opacity: 0;

    visibility: hidden;

    transform: translateY(-8px) scale(0.97);

    transform-origin: top right;

    transition:
      opacity 0.2s ease,
      visibility 0.2s ease,
      transform 0.2s ease;
  }

  .navbar.menu-open .nav-links {
    opacity: 1;

    visibility: visible;

    transform: translateY(0) scale(1);
  }

  .nav-links a {
    display: flex;

    align-items: center;

    min-height: 44px;

    padding: 0 13px;

    border-radius: 9px;

    font-size: 13px;
  }

  .nav-links a.active::after {
    left: auto;
    right: 13px;
    bottom: auto;

    width: 6px;
    height: 6px;

    transform: none;
  }

  .theme-toggle {
    width: 100%;
    height: 44px;

    margin: 4px 0 0;

    justify-content: flex-start;

    padding: 0 13px;

    border-radius: 9px;
  }
  .custom-divider {
    
    margin-left: 10px;
    margin-right: 10px;
  }
}
.custom-divider {
  border: none;
  height: 1px;
  background-color: var(--border-color, #0066cc);
  margin: 24px 0;
  border-radius: 99px;
  margin-left: 200px;
  margin-right: 200px;
}
