@view-transition { navigation: auto; }

:root {
  --bg: #07090d;
  --bg-soft: #0d1118;
  --surface: rgba(255,255,255,.055);
  --surface-strong: rgba(255,255,255,.085);
  --border: rgba(255,255,255,.1);
  --text: #f7f9fc;
  --muted: #98a2b3;
  --accent: #7c8cff;
  --accent-2: #58d6ff;
  --success: #5fe1a8;
  --danger: #ff6b7a;
  --shadow: 0 30px 80px rgba(0,0,0,.45);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: dark; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 8%, rgba(124,140,255,.14), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(88,214,255,.09), transparent 22%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .16;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 75%);
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
img { max-width: 100%; display: block; }
.container { width: min(calc(100% - 32px), var(--max)); margin-inline: auto; }
.narrow { width: min(calc(100% - 32px), 820px); margin-inline: auto; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: #c6ceff;
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: currentColor; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: rgba(7,9,13,.72);
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.nav { min-height: 72px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 900; letter-spacing: -.03em; font-size: 20px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 11px; position: relative; overflow: hidden;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 35px rgba(124,140,255,.25);
}
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; border-radius: 50%; border: 2px solid rgba(255,255,255,.86); }
.brand-mark::before { width: 18px; height: 18px; left: 7px; top: 7px; }
.brand-mark::after { width: 7px; height: 7px; left: 12.5px; top: 12.5px; background: #fff; }
.nav-links { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.nav-links a { color: #c2c9d5; font-size: 14px; font-weight: 650; transition: .2s ease; }
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.menu-btn { display: none; }
.icon-btn, .menu-btn {
  width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 13px;
  border: 1px solid var(--border); background: var(--surface); cursor: pointer;
}
.mobile-menu { display: none; padding: 0 0 16px; }
.mobile-menu.open { display: grid; gap: 8px; }
.mobile-menu a { padding: 12px 14px; border-radius: 12px; color: #cbd2dd; }
.mobile-menu a:hover { background: var(--surface); color: #fff; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 0 18px; border-radius: 14px; border: 1px solid transparent;
  font-weight: 800; font-size: 14px; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, #8b94ff, #5bd7ff); color: #071017; box-shadow: 0 18px 38px rgba(97,177,255,.22); }
.btn-secondary { background: rgba(255,255,255,.06); border-color: var(--border); }
.btn-danger { background: rgba(255,107,122,.1); border-color: rgba(255,107,122,.25); color: #ff98a2; }
.btn-small { min-height: 36px; padding: 0 12px; border-radius: 10px; font-size: 12px; }

.hero { padding: 92px 0 72px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.02fr .98fr; align-items: center; gap: 56px; }
.hero h1 { margin: 18px 0 18px; max-width: 720px; font-size: clamp(46px, 7vw, 82px); line-height: .98; letter-spacing: -.065em; }
.hero h1 span { color: transparent; background: linear-gradient(100deg, #fff 20%, #9ea8ff 62%, #72e2ff); background-clip: text; -webkit-background-clip: text; }
.hero-copy { max-width: 610px; color: #adb6c4; font-size: clamp(16px, 1.7vw, 19px); line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 34px; color: #8d98a8; font-size: 13px; }
.hero-meta b { color: #fff; }

.vault-wrap { min-height: 510px; display: grid; place-items: center; perspective: 1200px; }
.vault-scene {
  position: relative; width: min(450px, 90vw); aspect-ratio: 1; transform-style: preserve-3d;
  animation: sceneFloat 7s ease-in-out infinite;
}
.vault-glow { position: absolute; inset: 18%; border-radius: 50%; background: radial-gradient(circle, rgba(95,208,255,.38), rgba(124,140,255,.16) 42%, transparent 68%); filter: blur(18px); }
.vault-core {
  position: absolute; left: 50%; top: 50%; width: 170px; aspect-ratio: 1; transform: translate(-50%,-50%) translateZ(70px);
  border-radius: 34px; border: 1px solid rgba(255,255,255,.18); background: linear-gradient(145deg, rgba(255,255,255,.16), rgba(255,255,255,.04));
  backdrop-filter: blur(18px); box-shadow: 0 35px 80px rgba(0,0,0,.55), inset 0 1px rgba(255,255,255,.18); display: grid; place-items: center;
}
.vault-core .brand-mark { width: 78px; height: 78px; border-radius: 24px; }
.vault-core .brand-mark::before { width: 42px; height: 42px; left: 16px; top: 16px; border-width: 3px; }
.vault-core .brand-mark::after { width: 15px; height: 15px; left: 29px; top: 29px; border-width: 3px; }
.orbit { position: absolute; inset: 8%; border: 1px solid rgba(160,180,255,.2); border-radius: 50%; transform-style: preserve-3d; animation: orbitSpin 18s linear infinite; }
.orbit.two { inset: 18%; transform: rotateX(68deg) rotateZ(34deg); animation-duration: 13s; animation-direction: reverse; }
.orbit.three { inset: 28%; transform: rotateY(68deg) rotateZ(-24deg); animation-duration: 9s; }
.float-tile {
  position: absolute; width: 104px; padding: 13px; border-radius: 22px; background: rgba(16,21,31,.82); border: 1px solid rgba(255,255,255,.12); box-shadow: var(--shadow); backdrop-filter: blur(14px); transform-style: preserve-3d;
}
.float-tile i { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-style: normal; font-weight: 900; background: linear-gradient(145deg, rgba(124,140,255,.95), rgba(88,214,255,.75)); }
.float-tile b { display: block; margin-top: 9px; font-size: 12px; }
.float-tile small { color: var(--muted); font-size: 10px; }
.float-tile.a { left: 3%; top: 18%; transform: translateZ(110px) rotate(-8deg); }
.float-tile.b { right: 0; top: 26%; transform: translateZ(55px) rotate(8deg); }
.float-tile.c { left: 14%; bottom: 7%; transform: translateZ(35px) rotate(5deg); }
.float-tile.d { right: 12%; bottom: 9%; transform: translateZ(105px) rotate(-5deg); }
@keyframes sceneFloat { 0%,100% { transform: translateY(0) rotateX(2deg) rotateY(-3deg); } 50% { transform: translateY(-16px) rotateX(-2deg) rotateY(3deg); } }
@keyframes orbitSpin { to { rotate: 1 1 .4 360deg; } }

.section { padding: 78px 0; }
.section-tight { padding: 48px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-head h2 { margin: 8px 0 0; font-size: clamp(30px, 4vw, 48px); letter-spacing: -.045em; }
.section-head p { max-width: 600px; color: var(--muted); line-height: 1.7; }
.link-arrow { color: #c4cbff; font-weight: 750; font-size: 14px; }

.apps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.app-card {
  position: relative; min-width: 0; padding: 18px; border-radius: var(--radius-lg); background: linear-gradient(145deg, rgba(255,255,255,.07), rgba(255,255,255,.035)); border: 1px solid var(--border);
  overflow: hidden; transform-style: preserve-3d; transition: transform .22s ease, border-color .22s ease, background .22s ease, box-shadow .22s ease;
}
.app-card::after { content: ""; position: absolute; inset: 0; opacity: 0; background: radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(124,140,255,.18), transparent 38%); transition: opacity .2s ease; pointer-events: none; }
.app-card:hover { border-color: rgba(151,164,255,.28); box-shadow: 0 24px 60px rgba(0,0,0,.28); }
.app-card:hover::after { opacity: 1; }
.app-icon { width: 68px; height: 68px; border-radius: 18px; object-fit: cover; background: linear-gradient(145deg, #7c8cff, #58d6ff); box-shadow: 0 14px 32px rgba(90,170,255,.16); }
.app-icon.fallback { display: grid; place-items: center; font-size: 26px; font-weight: 900; color: #071017; }
.app-card h3 { margin: 18px 0 6px; font-size: 17px; letter-spacing: -.02em; }
.app-card p { margin: 0; min-height: 42px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.app-card-meta { margin-top: 17px; display: flex; justify-content: space-between; gap: 8px; color: #8f99a9; font-size: 11px; }
.badge { display: inline-flex; align-items: center; min-height: 27px; padding: 0 9px; border-radius: 999px; background: rgba(124,140,255,.1); border: 1px solid rgba(124,140,255,.2); color: #c9ceff; font-size: 11px; font-weight: 750; }

.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.category-card { padding: 22px; min-height: 168px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); transition: .22s ease; }
.category-card:hover { transform: translateY(-4px); background: var(--surface-strong); border-color: rgba(153,165,255,.25); }
.category-card .cat-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: rgba(124,140,255,.12); color: #d0d5ff; font-size: 20px; }
.category-card h3 { margin: 17px 0 7px; }
.category-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.category-card small { display: block; margin-top: 12px; color: #7f8b9b; }

.page-hero { padding: 72px 0 38px; }
.page-hero h1 { margin: 12px 0 14px; font-size: clamp(40px, 6vw, 70px); letter-spacing: -.06em; }
.page-hero p { max-width: 700px; color: var(--muted); line-height: 1.75; font-size: 17px; }

.toolbar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.field, .search-field, textarea.field, select.field {
  width: 100%; min-height: 48px; border-radius: 14px; border: 1px solid var(--border); background: rgba(255,255,255,.045); color: #fff; padding: 0 14px; outline: none; transition: .2s ease;
}
textarea.field { min-height: 130px; padding-top: 13px; resize: vertical; }
.field:focus { border-color: rgba(124,140,255,.55); box-shadow: 0 0 0 4px rgba(124,140,255,.08); }
.search-field { flex: 1 1 320px; }
.toolbar select { width: auto; min-width: 170px; }
.form-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.form-group { display: grid; gap: 8px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { color: #c5ccd8; font-size: 12px; font-weight: 750; }
.help { color: #788596; font-size: 11px; line-height: 1.45; }

.empty-state { padding: 52px 24px; text-align: center; border: 1px dashed rgba(255,255,255,.14); border-radius: var(--radius-lg); color: var(--muted); }
.empty-state b { display: block; color: #fff; font-size: 19px; margin-bottom: 8px; }
.skeleton { min-height: 245px; border-radius: var(--radius-lg); background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.085), rgba(255,255,255,.04)); background-size: 220% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -220% 0; } }

.app-detail { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 34px; align-items: start; }
.detail-main, .detail-side { min-width: 0; }
.detail-card { padding: 24px; border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--border); }
.app-heading { display: grid; grid-template-columns: 108px 1fr; gap: 20px; align-items: center; }
.app-heading .app-icon { width: 108px; height: 108px; border-radius: 26px; }
.app-heading h1 { margin: 0 0 7px; font-size: clamp(30px, 4vw, 50px); letter-spacing: -.05em; }
.app-heading p { margin: 0; color: var(--muted); }
.meta-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; margin-top: 20px; }
.meta-item { padding: 14px; border-radius: 14px; background: rgba(255,255,255,.035); }
.meta-item small { color: #7f8998; display: block; margin-bottom: 4px; }
.meta-item b { font-size: 13px; }
.download-card { position: sticky; top: 96px; }
.download-card .btn { width: 100%; min-height: 54px; font-size: 15px; }
.download-card .download-note { margin-top: 13px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.content-block { margin-top: 18px; padding: 24px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: rgba(255,255,255,.035); }
.content-block h2 { margin: 0 0 14px; font-size: 22px; }
.prose { color: #b3bdca; line-height: 1.8; white-space: pre-line; }
.screenshot-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 38%); overflow-x: auto; gap: 12px; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.screenshot-strip img { width: 100%; aspect-ratio: 9/16; object-fit: cover; border-radius: 18px; border: 1px solid var(--border); scroll-snap-align: start; }

.ad-slot { display: none; }
.ad-slot.active { display: block; min-height: 90px; padding: 16px; border: 1px dashed rgba(255,255,255,.12); border-radius: 14px; color: #6f7b8a; font-size: 11px; text-align: center; }

.info-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.info-card { padding: 24px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); }
.info-card h3 { margin: 0 0 10px; }
.info-card p { margin: 0; color: var(--muted); line-height: 1.7; }

.admin-shell { display: grid; grid-template-columns: 250px minmax(0,1fr); min-height: 100vh; }
.admin-side { position: sticky; top: 0; height: 100vh; padding: 24px 18px; border-right: 1px solid var(--border); background: #090c12; }
.admin-side .brand { margin-bottom: 28px; }
.admin-nav { display: grid; gap: 7px; }
.admin-nav button { text-align: left; padding: 12px 13px; border-radius: 12px; border: 0; background: transparent; color: #8f9bab; cursor: pointer; }
.admin-nav button.active, .admin-nav button:hover { background: var(--surface); color: #fff; }
.admin-main { padding: 34px; }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 28px; }
.admin-top h1 { margin: 0; letter-spacing: -.04em; }
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
.stat-card { padding: 20px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); }
.stat-card small { color: var(--muted); }
.stat-card b { display: block; margin-top: 8px; font-size: 30px; letter-spacing: -.04em; }
.admin-panel { margin-top: 18px; padding: 22px; border: 1px solid var(--border); border-radius: 20px; background: rgba(255,255,255,.035); }
.admin-panel h2 { margin: 0 0 18px; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 13px 10px; border-bottom: 1px solid rgba(255,255,255,.07); text-align: left; vertical-align: middle; font-size: 13px; }
.admin-table th { color: #7f8a99; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.table-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.progress { height: 9px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.08); }
.progress > span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--accent),var(--accent-2)); transition: width .2s ease; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(100%, 430px); padding: 30px; border: 1px solid var(--border); border-radius: 28px; background: rgba(14,18,26,.88); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.login-card h1 { margin: 20px 0 7px; font-size: 34px; letter-spacing: -.05em; }
.login-card p { margin: 0 0 24px; color: var(--muted); }
dialog { width: min(calc(100% - 28px), 720px); border: 1px solid var(--border); border-radius: 24px; background: #0c1017; color: #fff; padding: 0; box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(5px); }
.dialog-inner { padding: 24px; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.dialog-head h2 { margin: 0; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 90; max-width: min(380px, calc(100vw - 44px)); padding: 13px 16px; border-radius: 14px; border: 1px solid var(--border); background: #111722; box-shadow: var(--shadow); transform: translateY(25px); opacity: 0; pointer-events: none; transition: .25s ease; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { border-color: rgba(255,107,122,.3); color: #ffb0b8; }

.site-footer { margin-top: 72px; padding: 52px 0 28px; border-top: 1px solid rgba(255,255,255,.08); background: rgba(0,0,0,.12); }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3,1fr); gap: 36px; }
.footer-brand p { max-width: 380px; color: var(--muted); line-height: 1.7; }
.footer-col h4 { margin: 0 0 14px; font-size: 13px; }
.footer-col { display: grid; align-content: start; gap: 10px; }
.footer-col a { color: #8f9aaa; font-size: 13px; }
.footer-col a:hover { color: #fff; }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.07); display: flex; justify-content: space-between; gap: 16px; color: #697586; font-size: 12px; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: translateY(0); }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .vault-wrap { min-height: 430px; }
  .apps-grid, .category-grid { grid-template-columns: repeat(2,1fr); }
  .app-detail { grid-template-columns: 1fr; }
  .download-card { position: static; }
  .info-grid { grid-template-columns: 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .admin-nav { grid-template-columns: repeat(4,1fr); overflow-x: auto; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 760px) {
  .nav { min-height: 64px; }
  .nav-links, .nav-actions .btn { display: none; }
  .menu-btn { display: inline-flex; margin-left: auto; }
  .hero { padding-top: 58px; }
  .hero h1 { font-size: clamp(43px, 14vw, 66px); }
  .vault-wrap { min-height: 360px; }
  .vault-scene { width: min(360px, 92vw); }
  .float-tile { width: 90px; padding: 11px; border-radius: 18px; }
  .section { padding: 58px 0; }
  .section-head { align-items: start; flex-direction: column; }
  .apps-grid, .category-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .app-heading { grid-template-columns: 82px 1fr; }
  .app-heading .app-icon { width: 82px; height: 82px; border-radius: 21px; }
  .meta-grid { grid-template-columns: 1fr 1fr; }
  .screenshot-strip { grid-auto-columns: 72%; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; }
  .admin-main { padding: 22px 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .admin-table { display: block; overflow-x: auto; }
}

@media (max-width: 480px) {
  .container, .narrow { width: min(calc(100% - 22px), var(--max)); }
  .hero-meta { gap: 13px; }
  .meta-grid, .stats-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
