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

:root {
  --bg:        #0A0F1E;
  --bg2:       #111827;
  --card:      #1A2235;
  --card-hov:  #1F2D44;
  --border:    #2A3A55;
  --accent:    #3B82F6;
  --accent2:   #2563EB;
  --success:   #10B981;
  --text:      #F1F5F9;
  --muted:     #94A3B8;
  --danger:    #EF4444;
}

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

/* ── Layout ─────────────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Hero / Header ──────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #0A0F1E 0%, #0D1B3E 60%, #0A0F1E 100%);
  border-bottom: 1px solid var(--border);
  padding: 3rem 1.5rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(59,130,246,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-logo { height: 64px; margin-bottom: 1.5rem; filter: drop-shadow(0 0 20px rgba(59,130,246,0.4)); }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; letter-spacing: -0.02em; }
.hero h1 span { color: var(--accent); }
.hero p { color: var(--muted); margin-top: .75rem; font-size: 1.05rem; max-width: 560px; margin-left: auto; margin-right: auto; }

.hero-stats {
  display: flex; align-items: center; justify-content: center; gap: 0;
  margin-top: 2rem; flex-wrap: wrap; gap: .5rem;
}
.hero-stat { text-align: center; padding: 0 2rem; }
.hero-stat-n { display: block; font-size: 1.6rem; font-weight: 800; color: var(--text); }
.hero-stat-l { display: block; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; margin-top: .1rem; }
.hero-stat-sep { width: 1px; height: 40px; background: var(--border); }

/* ── Trust bar ──────────────────────────────────────────────── */
.trust-bar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: .9rem 1.5rem;
}
.trust-bar-inner {
  display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: center;
}
.trust-item {
  display: flex; align-items: center; gap: .45rem;
  font-size: .82rem; color: var(--muted);
}
.trust-icon { width: 16px; height: 16px; flex-shrink: 0; }
.android-icon { color: #3DDC84; }
.win-icon     { color: #00A4E4; }
.vt-icon      { color: #394EFF; }
.https-icon   { color: var(--success); }
.clean-icon   { color: var(--danger); }

/* ── AV badges strip ────────────────────────────────────────── */
.av-strip {
  background: #0D1420;
  border-bottom: 1px solid var(--border);
  padding: .65rem 1.5rem;
}
.av-strip-inner {
  display: flex; flex-wrap: wrap; gap: .75rem; align-items: center;
}
.av-label { font-size: .75rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .07em; white-space: nowrap; }
.av-badges { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.av-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .2rem .6rem;
  border-radius: 5px;
  font-size: .75rem; font-weight: 700;
  border: 1px solid transparent;
}
.av-result {
  display: inline-flex; align-items: center; gap: .35rem;
  margin-left: .25rem;
  font-size: .78rem; color: var(--success); font-weight: 600;
}

/* ── Apps Grid ──────────────────────────────────────────────── */
.apps-section { padding: 3rem 0 5rem; }
.apps-section h2 { text-align: center; font-size: 1.1rem; font-weight: 600; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 2.5rem; }

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

.app-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .85rem;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.app-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(59,130,246,.15);
}

.app-icon {
  width: 72px; height: 72px;
  border-radius: 18px;
  overflow: hidden;
  background: #FFFFFF;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}
.app-icon img { width: 100%; height: 100%; object-fit: cover; }

.app-platform {
  display: inline-flex; align-items: center; gap: .35rem;
  background: rgba(59,130,246,.12);
  color: var(--accent);
  border: 1px solid rgba(59,130,246,.25);
  border-radius: 999px;
  padding: .15rem .65rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  width: fit-content;
}
.app-platform.tv  { background: rgba(139,92,246,.12); color: #A78BFA; border-color: rgba(139,92,246,.25); }
.app-platform.win { background: rgba(16,185,129,.12); color: #34D399; border-color: rgba(16,185,129,.25); }

.app-name     { font-size: 1.15rem; font-weight: 700; }
.app-subtitle { font-size: .82rem; color: var(--muted); margin-top: -.5rem; }
.app-desc     { font-size: .9rem; color: #B0BFCF; flex: 1; }

.app-meta-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.app-meta { display: flex; align-items: center; gap: .4rem; font-size: .76rem; color: var(--muted); background: #0D1525; border: 1px solid var(--border); border-radius: 6px; padding: .2rem .55rem; }
.dot { width: 4px; height: 4px; background: var(--border); border-radius: 50%; }

.badge-safe {
  display: inline-flex; align-items: center; gap: .25rem;
  background: rgba(16,185,129,.1);
  color: #34D399;
  border: 1px solid rgba(16,185,129,.2);
  border-radius: 999px;
  padding: .12rem .5rem;
  font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
}

/* ── How to install ─────────────────────────────────────────── */
.how-section { padding: 2rem 0 4rem; border-top: 1px solid var(--border); }
.how-title { text-align: center; font-size: 1.1rem; font-weight: 600; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 2rem; }
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.how-step { display: flex; gap: 1rem; align-items: flex-start; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem; }
.how-num {
  width: 32px; height: 32px; flex-shrink: 0;
  background: var(--accent2); color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 700;
}
.how-text strong { display: block; font-size: .95rem; margin-bottom: .3rem; }
.how-text p { font-size: .83rem; color: var(--muted); line-height: 1.5; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .65rem 1.25rem;
  border-radius: 10px;
  font-size: .9rem; font-weight: 600;
  text-decoration: none;
  border: none; cursor: pointer;
  transition: opacity .2s, transform .15s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent2); color: #fff; }
.btn-primary:hover { opacity: .88; }
.btn-soon { background: var(--card-hov); color: var(--muted); cursor: default; border: 1px solid var(--border); }

/* ── Footer ─────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  background: var(--bg2);
  padding: 2rem 1.5rem;
  color: var(--muted);
  font-size: .85rem;
}
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: .85rem; text-align: center; }
.footer-logo { height: 28px; opacity: .65; }
.footer-badges { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.footer-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .2rem .6rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: .72rem; color: var(--muted);
}

/* ── Admin ──────────────────────────────────────────────────── */
.admin-body { background: #060B14; }

.admin-nav {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: .9rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
}
.admin-nav .brand { display: flex; align-items: center; gap: .75rem; font-weight: 700; font-size: 1rem; }
.admin-nav .brand img { height: 32px; }
.admin-nav .nav-right { display: flex; gap: 1rem; align-items: center; font-size: .9rem; }
.admin-nav a { color: var(--muted); text-decoration: none; transition: color .2s; }
.admin-nav a:hover { color: var(--text); }

.admin-main { padding: 2rem 1.5rem 4rem; max-width: 1000px; margin: 0 auto; }
.admin-main h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 1.75rem; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  font-size: .9rem;
}
.admin-table th {
  background: var(--bg2);
  padding: .75rem 1rem;
  text-align: left;
  font-size: .78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255,255,255,.02); }

.badge {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
}
.badge-on  { background: rgba(16,185,129,.15); color: #34D399; }
.badge-off { background: rgba(239,68,68,.12);  color: #FCA5A5; }

.btn-sm { padding: .35rem .7rem; font-size: .8rem; border-radius: 7px; }
.btn-edit   { background: rgba(59,130,246,.15); color: var(--accent); }
.btn-edit:hover { background: rgba(59,130,246,.3); }
.btn-del    { background: rgba(239,68,68,.12); color: #FCA5A5; }
.btn-del:hover { background: rgba(239,68,68,.25); }

/* ── Forms ──────────────────────────────────────────────────── */
.form-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  max-width: 600px;
}
.form-wrap h2 { font-size: 1.2rem; margin-bottom: 1.5rem; }

.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: .82rem; font-weight: 600; color: var(--muted); margin-bottom: .35rem; text-transform: uppercase; letter-spacing: .05em; }
.field input, .field textarea, .field select {
  width: 100%;
  background: #0D1525;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: .6rem .85rem;
  font-size: .95rem;
  outline: none;
  font-family: inherit;
  transition: border-color .2s;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 80px; }

.alert { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1.25rem; font-size: .9rem; }
.alert-ok  { background: rgba(16,185,129,.12); color: #34D399; border: 1px solid rgba(16,185,129,.25); }
.alert-err { background: rgba(239,68,68,.1);   color: #FCA5A5; border: 1px solid rgba(239,68,68,.25); }

/* ── Login ──────────────────────────────────────────────────── */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-box { width: 100%; max-width: 360px; }
.login-box h1 { font-size: 1.4rem; text-align: center; margin-bottom: 1.5rem; }
.login-box .logo { display: block; height: 48px; margin: 0 auto 1.5rem; }

/* ── Add app button area ─────────────────────────────────────── */
.admin-actions { display: flex; justify-content: flex-end; margin-bottom: 1.25rem; }

@media (max-width: 640px) {
  .apps-grid { grid-template-columns: 1fr; }
  .admin-table { font-size: .82rem; }
  .admin-table th, .admin-table td { padding: .6rem .65rem; }
}
