/* Android-Emulators portal theme */
:root {
  --paper: #F4F1E8;
  --card: #FFFDF8;
  --ink: #0D0F0C;
  --mute: #68685F;
  --rule: rgba(13,15,12,0.12);
  --droid: #3DDC84;
  --droidd: #16A05A;
  --night: #0D0F0C;
}

html { scroll-behavior: smooth; }

body.portal {
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  margin: 0;
}

.font-display { font-family: 'Bricolage Grotesque', system-ui, sans-serif; letter-spacing: -0.02em; }
.font-mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

.dots {
  background-image: radial-gradient(rgba(13,15,12,0.10) 1px, transparent 1px);
  background-size: 22px 22px;
}

.chip {
  border: 1.5px solid rgba(13,15,12,0.85);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font-weight: 600;
  font-size: 0.9rem;
  background: transparent;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
  cursor: pointer;
  color: inherit;
}
.chip:hover { background: rgba(13,15,12,0.07); }
.chip[aria-pressed="true"] { background: #0D0F0C; color: #3DDC84; }
.chip:active { transform: scale(0.97); }

.row-cmp {
  display: grid;
  grid-template-columns: 2.4fr 1.4fr 1.1fr 0.8fr 0.8fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(13,15,12,0.12);
  transition: background-color .18s ease;
}
.row-cmp:hover { background: rgba(61,220,132,0.10); }
.row-cmp[hidden] { display: none; }

@media (max-width: 767px) {
  .row-cmp { grid-template-columns: 1fr auto; row-gap: 0.4rem; }
  .row-cmp .c-best, .row-cmp .c-os, .row-cmp .c-ram { display: none; }
  .row-cmp .c-rate { grid-column: 2; grid-row: 1; justify-self: end; }
  .row-cmp .c-act { grid-column: 1 / -1; }
  .thead-cmp { display: none; }
}

.win-icon {
  aspect-ratio: 1;
  border-radius: 14px;
  box-shadow: inset 0 -6px 12px rgba(0,0,0,0.18);
}

@keyframes bob {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.bob { animation: bob 6s ease-in-out infinite; }

@keyframes up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.up { animation: up .6s cubic-bezier(.2,.7,.2,1) both; }
.d1 { animation-delay: .06s; }
.d2 { animation-delay: .14s; }
.d3 { animation-delay: .22s; }
.d4 { animation-delay: .3s; }

.link-u {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  transition: background-size .25s ease;
}
.link-u:hover { background-size: 100% 2px; }

.guide:hover .g-title { color: #16A05A; }
.guide:hover .g-arrow { transform: translateX(4px); }
.g-arrow { transition: transform .2s ease; }

.apk:hover { background: #fff; border-color: #0D0F0C; }

.portal-content {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #1a1c18;
}
.portal-content p { margin: 0 0 1.1em; }
.portal-content h2, .portal-content h3 {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  letter-spacing: -0.02em;
  margin: 1.6em 0 0.55em;
  line-height: 1.2;
}
.portal-content h2 { font-size: 1.55rem; }
.portal-content h3 { font-size: 1.25rem; }
.portal-content a { color: var(--droidd); text-decoration: underline; text-underline-offset: 3px; }
.portal-content a:hover { color: var(--ink); }
.portal-content ul, .portal-content ol { margin: 0 0 1.1em; padding-left: 1.25em; }
.portal-content li { margin: 0.35em 0; }
.portal-content img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1.5px solid rgba(13,15,12,0.12);
  margin: 1em 0;
}
.portal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2em 0;
  font-size: 0.95rem;
}
.portal-content th, .portal-content td {
  border: 1px solid var(--rule);
  padding: 0.65rem 0.8rem;
  text-align: left;
}
.portal-content th { background: rgba(13,15,12,0.04); }

/* Pagination from CI */
ul.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.875rem;
}
ul.pagination li a,
ul.pagination li span,
ul.pagination .page-link {
  display: grid;
  place-items: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.55rem;
  border-radius: 0.5rem;
  border: 1px solid var(--rule);
  color: var(--ink);
  text-decoration: none;
  background: var(--card);
}
ul.pagination li.active a,
ul.pagination li.active .page-link {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--droid);
  font-weight: 700;
}
ul.pagination li a:hover { border-color: var(--ink); }

.portal-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.8rem;
  color: var(--mute);
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
}
.portal-crumbs li { display: inline-flex; align-items: center; gap: 0.4rem; }
.portal-crumbs li:not(:last-child)::after {
  content: '/';
  color: rgba(13,15,12,0.35);
  margin-left: 0.15rem;
}
.portal-crumbs a { color: var(--mute); text-decoration: none; }
.portal-crumbs a:hover { color: var(--droidd); }

#mobile-nav { display: none; }
#mobile-nav.open { display: block; }

@media (prefers-reduced-motion: reduce) {
  .bob, .up { animation: none; }
  html { scroll-behavior: auto; }
}
