/* ===== Variables ===== */
:root {
  --bg: #050505;
  --bg-s: #0c0c0c;
  --bg-card: rgba(255,255,255,0.03);
  --bg-card-h: rgba(255,255,255,0.06);
  --glass: rgba(255,255,255,0.04);
  --text: #e8e8e8;
  --text-s: #777;
  --text-m: #999;
  --border: rgba(255,255,255,0.06);
  --border-h: rgba(255,255,255,0.12);
  --accent: #6C63FF;
  --accent2: #00D4AA;
  --accent3: #FF6B6B;
  --glow: rgba(108,99,255,0.08);
  --glow2: rgba(0,212,170,0.06);
  --r: 16px;
  --rs: 10px;
  --mw: 1100px;
}

[data-theme="light"] {
  --bg: #fafafa;
  --bg-s: #ffffff;
  --bg-card: rgba(0,0,0,0.02);
  --bg-card-h: rgba(0,0,0,0.04);
  --glass: rgba(255,255,255,0.7);
  --text: #111;
  --text-s: #888;
  --text-m: #666;
  --border: rgba(0,0,0,0.06);
  --border-h: rgba(0,0,0,0.12);
  --glow: rgba(108,99,255,0.06);
  --glow2: rgba(0,212,170,0.04);
}

/* ===== Base ===== */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.5s, color 0.5s;
  -webkit-font-smoothing: antialiased;
}

a{color:var(--accent);text-decoration:none;transition:color 0.2s}
a:hover{color:var(--accent2)}
img{max-width:100%;height:auto;display:block}

::selection { background: var(--accent); color: #fff; }

/* ===== Animations ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes orb1 {
  0%,100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(80px,-60px) scale(1.1); }
  66% { transform: translate(-40px,40px) scale(0.9); }
}
@keyframes orb2 {
  0%,100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(-60px,80px) scale(0.95); }
  66% { transform: translate(50px,-30px) scale(1.05); }
}

.anim { opacity: 0; transform: translateY(40px); transition: all 0.8s cubic-bezier(0.16,1,0.3,1); }
.anim.vis { opacity: 1; transform: none; }
.anim-d1 { transition-delay: 0.08s; }
.anim-d2 { transition-delay: 0.16s; }
.anim-d3 { transition-delay: 0.24s; }
.anim-d4 { transition-delay: 0.32s; }
.anim-d5 { transition-delay: 0.40s; }
.anim-d6 { transition-delay: 0.48s; }
.anim-d7 { transition-delay: 0.56s; }
.anim-d8 { transition-delay: 0.64s; }

/* ===== Ambient Background ===== */
.ambient {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
}

.orb-1 {
  width: 500px; height: 500px;
  background: var(--accent);
  top: -10%; left: -5%;
  animation: orb1 20s ease-in-out infinite;
}

.orb-2 {
  width: 400px; height: 400px;
  background: var(--accent2);
  bottom: -10%; right: -5%;
  animation: orb2 25s ease-in-out infinite;
}

.orb-3 {
  width: 300px; height: 300px;
  background: var(--accent3);
  top: 40%; left: 60%;
  animation: orb1 30s ease-in-out infinite reverse;
  opacity: 0.2;
}

/* ===== Nav ===== */
.nav {
  position: fixed;
  top: 16px; left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: min(calc(100% - 32px), var(--mw));
  animation: fadeIn 0.8s 0.2s both;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid var(--border);
  border-radius: 100px;
}

.nav-logo {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.02em;
}

.nav-logo:hover { color: var(--text); opacity: 0.7; }
.nav-logo svg { width: 22px; height: 22px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.nav-links a {
  color: var(--text-s);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 100px;
  transition: all 0.3s;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--bg-card-h);
}

.lang-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 14px;
  cursor: pointer;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 500;
  transition: all 0.3s;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23777'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 26px;
}

.lang-select:hover { border-color: var(--accent); background-color: var(--glow); }
.lang-select:focus { outline: none; border-color: var(--accent); }

.lang-select option {
  background: var(--bg-s);
  color: var(--text);
}

.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 12px;
  cursor: pointer;
  color: var(--text);
  font-size: 0.85rem;
  transition: all 0.3s;
}

.theme-toggle:hover { border-color: var(--accent); background: var(--glow); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
}

/* ===== Hero ===== */
.hero {
  text-align: center;
  padding: 180px 24px 100px;
  max-width: var(--mw);
  margin: 0 auto;
  position: relative;
}

.hero-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--glow);
  padding: 6px 16px;
  border-radius: 100px;
  border: 1px solid rgba(108,99,255,0.15);
  margin-bottom: 28px;
  animation: fadeUp 0.8s 0.3s both;
}

.hero h1 {
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 24px;
  color: var(--text);
  animation: fadeUp 0.8s 0.4s both;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: var(--text-s);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.7;
  animation: fadeUp 0.8s 0.5s both;
}

/* ===== Category Pills ===== */
.filters {
  max-width: var(--mw);
  margin: 0 auto;
  padding: 0 24px 64px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-s);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
}

.filter-btn:hover { color: var(--text); border-color: var(--border-h); }

.filter-btn.on {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

/* ===== App Grid ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: var(--mw);
  margin: 0 auto;
  padding: 0 24px 120px;
}

.card {
  background: transparent;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: all 0.5s cubic-bezier(0.16,1,0.3,1);
}

.card:hover {
  background: var(--bg-card-h);
  border-color: var(--border-h);
  color: inherit;
}

.card-icon {
  width: 64px;
  height: 64px;
  border-radius: 15px;
  margin-bottom: 20px;
  transition: transform 0.5s cubic-bezier(0.16,1,0.3,1);
}

.card:hover .card-icon {
  transform: scale(1.1) translateY(-4px);
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.card .sub {
  font-size: 0.8rem;
  color: var(--text-s);
  margin-bottom: 12px;
}

.card p {
  font-size: 0.85rem;
  color: var(--text-m);
  line-height: 1.6;
  flex-grow: 1;
}

.card-tags {
  display: flex;
  gap: 6px;
  margin-top: 16px;
}

.tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--glow);
  color: var(--accent);
}

.tag.mac {
  background: var(--glow2);
  color: var(--accent2);
}

/* ===== App Detail Page ===== */
.app-hero {
  text-align: center;
  padding: 180px 24px 60px;
  max-width: 720px;
  margin: 0 auto;
}

.app-hero .app-icon-large {
  width: 120px;
  height: 120px;
  border-radius: 28px;
  margin: 0 auto 32px;
  animation: float 5s ease-in-out infinite;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.app-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.app-hero .subtitle {
  font-size: 1.15rem;
  color: var(--text-s);
  margin-bottom: 32px;
}

.store-badges { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.88rem;
  transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
}

.store-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(108,99,255,0.3);
  color: #fff;
}

.store-badge svg { width: 18px; height: 18px; }

/* ===== Features ===== */
.features {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

.features h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 40px;
  text-align: center;
  letter-spacing: -0.02em;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.feature-item {
  background: transparent;
  padding: 24px 20px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: all 0.3s;
}

.feature-item:hover { background: var(--bg-card-h); border-color: var(--border-h); }

.feature-item .icon { font-size: 1.4rem; margin-bottom: 12px; }

.feature-item h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.feature-item p {
  font-size: 0.8rem;
  color: var(--text-s);
  line-height: 1.5;
}

/* ===== Description ===== */
.description {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.description h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.description p {
  color: var(--text-m);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 16px;
}

/* ===== Pricing ===== */
.pricing {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px 80px;
  text-align: center;
}

.pricing h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 32px;
}

.pricing-cards { display: flex; gap: 12px; justify-content: center; }

.pricing-card {
  background: transparent;
  padding: 32px 28px;
  flex: 1;
  max-width: 240px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: all 0.3s;
}

.pricing-card:hover { background: var(--bg-card-h); border-color: var(--border-h); }

.pricing-card.featured { background: var(--glow); border-color: rgba(108,99,255,0.2); }

.pricing-card h3 { font-size: 0.85rem; color: var(--text-s); margin-bottom: 8px; }
.pricing-card .price { font-size: 2rem; font-weight: 800; margin-bottom: 4px; }
.pricing-card .period { font-size: 0.78rem; color: var(--text-s); }

/* ===== Related ===== */
.related-apps {
  max-width: var(--mw);
  margin: 0 auto;
  padding: 60px 24px 120px;
}

.related-apps h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 32px;
  text-align: center;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

/* Reuse card styles in related grid */
.related-grid .app-card {
  background: transparent;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: all 0.3s;
}

.related-grid .app-card:hover { background: var(--bg-card-h); border-color: var(--border-h); color: inherit; }

.app-card-header { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }

.app-icon {
  width: 56px; height: 56px;
  border-radius: 13px;
  flex-shrink: 0;
}

.app-card-title h3 { font-size: 1rem; font-weight: 700; margin-bottom: 2px; }
.app-card-title .subtitle { font-size: 0.78rem; color: var(--text-s); }

.app-card p { font-size: 0.82rem; color: var(--text-m); line-height: 1.5; flex-grow: 1; }

.app-card-footer { display: flex; gap: 6px; margin-top: 12px; }

.badge {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--glow);
  color: var(--accent);
}

.badge.macos { background: var(--glow2); color: var(--accent2); }

/* ===== Footer ===== */
.footer {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-s);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
}

.footer-inner { max-width: var(--mw); margin: 0 auto; }

.footer-links {
  display: flex;
  gap: 24px;
  justify-content: center;
  list-style: none;
  margin-bottom: 12px;
}

.footer-links a { color: var(--text-s); font-size: 0.8rem; }
.footer-links a:hover { color: var(--accent); }

/* ===== Content Pages ===== */
.content-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 160px 24px 100px;
}

.content-page h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 32px;
  letter-spacing: -0.03em;
}

.content-page h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 40px;
  margin-bottom: 12px;
}

.content-page h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 8px;
  color: var(--text);
}

.content-page p, .content-page li {
  color: var(--text-m);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 12px;
}

.content-page ul { padding-left: 20px; }
.content-page a { color: var(--accent); }

/* ===== 404 ===== */
.not-found {
  text-align: center;
  padding: 200px 24px;
}

.not-found h1 {
  font-size: 10rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  line-height: 1;
}

.not-found p {
  font-size: 1.1rem;
  color: var(--text-s);
  margin-bottom: 32px;
}

.btn {
  display: inline-block;
  padding: 12px 32px;
  background: var(--accent);
  color: #fff;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.88rem;
  transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(108,99,255,0.3);
  color: #fff;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .nav { top: 8px; width: calc(100% - 16px); }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: calc(100% + 8px);
    left: 0; right: 0;
    background: var(--glass);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 16px;
    gap: 4px;
  }
  .nav-toggle { display: block; }
  .hero { padding: 140px 20px 60px; }
  .hero h1 { font-size: 2.5rem; }
  .grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .pricing-cards { flex-direction: column; }
  .pricing-card { max-width: 100%; }
  .not-found h1 { font-size: 6rem; }
}
