/* ==========================================================================
   Android App Download Page
   ========================================================================== */

.android-page {
  --app-green: #3ddc84;
  --app-green-dark: #2bb86a;
  --app-card: rgba(18, 22, 26, 0.92);
  --app-border: rgba(255, 255, 255, 0.08);
  padding: calc(var(--header-height, 58px) + 1.5rem) 0 3rem;
  background:
    radial-gradient(circle at 12% 18%, rgba(61, 220, 132, 0.07), transparent 28%),
    radial-gradient(circle at 88% 82%, rgba(245, 173, 17, 0.05), transparent 24%);
}

.android-page__inner {
  display: block;
  width: 100%;
  max-width: var(--container-max-width, 1240px);
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 1.5rem);
}

/* Hero */
.android-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 280px);
  gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: center;
  background: var(--app-card);
  border: 1px solid var(--app-border);
  border-radius: 16px;
  padding: clamp(1.25rem, 3vw, 2rem);
  margin-bottom: 2rem;
}

.android-hero__brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.android-hero__icon {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--app-border);
}

.android-hero__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
}

.android-hero__title {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  color: #fff;
  margin: 0 0 0.4rem;
  line-height: 1.3;
}

.android-hero__subtitle {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
}

.android-hero__desc {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.92rem;
  line-height: 1.75;
  margin: 0 0 1.1rem;
  max-width: 52ch;
}

/* Platform cards */
.android-platforms {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.android-platform {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  padding: 1rem 0.65rem 0.85rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--app-border);
  text-align: center;
  transition: border-color 0.2s ease;
}

.android-platform--active {
  border-color: rgba(61, 220, 132, 0.3);
  background: rgba(61, 220, 132, 0.05);
}

.android-platform--soon {
  opacity: 0.9;
}

.android-platform__name {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.android-platform__label {
  display: block;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.4;
  margin-bottom: 0.15rem;
}

.android-platform__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  margin-bottom: 0.15rem;
}

.android-platform__icon i {
  display: block;
  width: 1em;
  height: 1em;
  font-size: 1.15rem;
  line-height: 1;
  text-align: center;
}

.android-platform__icon--android {
  color: var(--app-green);
  background: rgba(61, 220, 132, 0.12);
  border: 1px solid rgba(61, 220, 132, 0.2);
}

.android-platform__icon--ios {
  color: #a8b4c4;
  background: rgba(168, 180, 196, 0.1);
  border: 1px solid rgba(168, 180, 196, 0.18);
}

.android-platform__icon--tv {
  color: #8ab8ff;
  background: rgba(138, 184, 255, 0.1);
  border: 1px solid rgba(138, 184, 255, 0.18);
}

.android-platform__btn,
.android-platform__soon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  min-height: 34px;
  margin-top: auto;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
}

.android-platform__btn--download {
  background: linear-gradient(135deg, var(--app-green) 0%, var(--app-green-dark) 100%);
  color: #0b0e0f;
  box-shadow: 0 2px 10px rgba(61, 220, 132, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.android-platform__btn--download:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(61, 220, 132, 0.35);
  color: #0b0e0f;
}

.android-platform__btn--disabled {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.35);
  border: 1px dashed rgba(255, 255, 255, 0.1);
}

.android-platform__soon {
  color: #f5ad11;
  background: rgba(245, 173, 17, 0.1);
  border: 1px solid rgba(245, 173, 17, 0.22);
}

.android-hero__qr-wrap {
  margin-top: 0.25rem;
}

.android-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.android-btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 42px;
  padding: 0.6rem 1.25rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--app-green) 0%, var(--app-green-dark) 100%);
  color: #0b0e0f;
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(61, 220, 132, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.android-btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(61, 220, 132, 0.38);
  color: #0b0e0f;
}

.android-btn-download i {
  font-size: 1rem;
}

.android-hero__empty {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #f5ad11;
  background: rgba(245, 173, 17, 0.1);
  border: 1px solid rgba(245, 173, 17, 0.25);
}

.android-hero__qr {
  display: none;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--app-border);
}

.android-hero__qr img,
.android-hero__qr canvas {
  width: 64px;
  height: 64px;
  padding: 3px;
  border-radius: 6px;
  background: #fff;
}

.android-hero__qr-text {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.5;
}

.android-hero__qr-text strong {
  display: block;
  color: #fff;
  font-size: 0.85rem;
  margin-bottom: 0.15rem;
}

/* Phone mockup — splash screen with centered app icon */
.android-mockup {
  display: flex;
  justify-content: center;
  align-items: center;
}

.android-phone {
  width: min(100%, 220px);
  aspect-ratio: 1 / 2;
  background: linear-gradient(145deg, #2a2a32 0%, #121218 100%);
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-radius: 32px;
  padding: 10px;
  overflow: hidden;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.android-phone__screen {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 40%, rgba(61, 220, 132, 0.08) 0%, transparent 55%),
    linear-gradient(180deg, #0e1216 0%, #06080a 100%);
  position: relative;
  overflow: hidden;
}

/* subtle notch */
.android-phone__screen::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 18px;
  background: #121218;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  z-index: 2;
}

.android-phone__logo {
  width: 42%;
  max-width: 88px;
  height: auto;
  object-fit: contain;
  border-radius: 18px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  z-index: 1;
  margin: auto;
}

/* Section titles */
.android-section {
  margin-bottom: 2rem;
}

.android-section__title {
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  font-weight: 800;
  color: #fff;
  text-align: center;
  margin: 0 0 1.25rem;
  position: relative;
  padding-bottom: 0.65rem;
}

.android-section__title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 3px;
  border-radius: 2px;
  background: var(--app-green);
}

/* Features */
.android-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}

.android-feature {
  background: var(--app-card);
  border: 1px solid var(--app-border);
  border-radius: 12px;
  padding: 1.1rem 0.9rem;
  text-align: center;
  transition: border-color 0.2s ease;
}

.android-feature:hover {
  border-color: rgba(61, 220, 132, 0.25);
}

.android-feature__icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.1rem;
  color: var(--app-green);
  background: rgba(61, 220, 132, 0.1);
  border: 1px solid rgba(61, 220, 132, 0.18);
}

.android-feature h3 {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.45rem;
}

.android-feature p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.65;
  margin: 0;
}

/* Install guide */
.android-guide {
  background: var(--app-card);
  border: 1px solid var(--app-border);
  border-radius: 16px;
  padding: clamp(1.25rem, 3vw, 1.75rem);
}

.android-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.android-step {
  position: relative;
  padding: 1rem 0.9rem 0.9rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.android-step__num {
  position: absolute;
  top: -14px;
  right: 14px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--app-green);
  color: #0b0e0f;
  font-size: 0.85rem;
  font-weight: 900;
}

.android-step h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  margin: 0.35rem 0 0.4rem;
}

.android-step p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.65;
  margin: 0;
}

/* Hide redundant app promo bar on this page */
body.android-route #gplayBox,
body.android-route .gplay-box {
  display: none !important;
}

/* Responsive */
@media (min-width: 768px) {
  .android-hero__qr {
    display: flex;
  }
}

@media (max-width: 991px) {
  .android-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .android-hero__brand {
    justify-content: center;
  }

  .android-hero__desc {
    margin-left: auto;
    margin-right: auto;
  }

  .android-platforms {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }

  .android-hero__qr-wrap {
    display: flex;
    justify-content: center;
  }

  .android-features {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .android-page {
    padding-top: calc(var(--header-height-mobile, 52px) + 1rem);
    padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
  }

  .android-features {
    grid-template-columns: 1fr;
  }

  .android-platforms {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .android-steps {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .android-phone {
    width: 200px;
  }
}
