@import url('/subpage-theme.css');

:root {
  --ink: #070a12;
  --bg-dark: #070a12;
  --surface-card: rgba(13, 19, 33, 0.88);
  --surface-elevated: rgba(20, 29, 48, 0.95);
  --border-hud: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(6, 182, 212, 0.3);
  --cyan: #06b6d4;
  --cyan-bright: #22d3ee;
  --yellow: #ffdc35;
  --red: #ed3b36;
  --green: #10b981;
  --green-bright: #00ff88;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
}

body {
  margin: 0;
  background-color: #070a13 !important;
  background-image: 
    radial-gradient(ellipse 90% 50% at 50% 0%, rgba(14, 165, 233, 0.12) 0%, rgba(99, 102, 241, 0.04) 50%, transparent 80%),
    radial-gradient(ellipse 60% 40% at 85% 85%, rgba(237, 59, 54, 0.05) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 15% 90%, rgba(6, 182, 212, 0.05) 0%, transparent 60%),
    linear-gradient(180deg, #070a13 0%, #0a0f1d 50%, #05070c 100%) !important;
  background-attachment: fixed !important;
  background-size: 100% 100% !important;
  color: var(--text-main);
  font: 16px/1.7 'Chakra Petch', system-ui, sans-serif;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: 
    linear-gradient(180deg, 
      rgba(7, 10, 19, 0.90) 0%, 
      rgba(7, 10, 19, 0.84) 360px, 
      rgba(5, 7, 13, 0.96) 800px, 
      rgba(4, 6, 11, 0.99) 100%
    ),
    url('/assets/musutafu.png') center top / cover no-repeat;
  opacity: 0.22;
  filter: saturate(1.1) brightness(0.9);
}

.install-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* ==========================================================================
   HERO BANNER
   ========================================================================== */
.install-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 380px;
  padding: 60px 48px 64px;
  border: 1px solid var(--border-glow);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(13, 20, 36, 0.95) 0%, rgba(8, 12, 22, 0.98) 100%);
  box-shadow: 0 12px 36px -6px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.install-hero::before {
  content: '';
  position: absolute;
  z-index: -2;
  inset: 0;
  background: 
    linear-gradient(90deg, rgba(7, 10, 18, 0.95) 0%, rgba(13, 22, 44, 0.75) 50%, rgba(7, 10, 18, 0.92) 100%),
    url('/assets/musutafu.png') center 45%/cover;
  filter: saturate(1.2);
  transform: scale(1.02);
}

.install-hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  right: -5%;
  bottom: -40px;
  width: 48%;
  height: 90px;
  background: linear-gradient(90deg, transparent, rgba(237, 59, 54, 0.25), rgba(255, 220, 53, 0.3));
  border-top: 3px solid var(--yellow);
  transform: rotate(-3deg);
  pointer-events: none;
}

.install-page .eyebrow {
  margin: 0 0 12px;
  color: var(--yellow) !important;
  font: 700 12px/1.4 'Chakra Petch', sans-serif;
  letter-spacing: 2px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.install-page .eyebrow::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--yellow);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.install-hero h1 {
  max-width: 820px;
  margin: 0 0 16px;
  color: #fff;
  font: 400 clamp(48px, 7vw, 84px)/1 Bangers, Impact, sans-serif;
  letter-spacing: 1.5px;
  text-shadow: 0 0 30px rgba(6, 182, 212, 0.4), 3px 3px 0 #000;
  transform: rotate(-0.5deg);
}

.install-hero .intro {
  max-width: 680px;
  margin: 0;
  color: #cbd5e1 !important;
  font-size: 17px;
  line-height: 1.6;
}

.language-picker {
  display: flex;
  align-items: center;
  gap: 14px;
  width: fit-content;
  margin-top: 28px;
  padding: 8px 16px;
  border: 1px solid var(--border-glow);
  border-radius: 8px;
  background: rgba(11, 16, 28, 0.85);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  color: var(--yellow);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.language-picker select {
  min-width: 180px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  background: #0f172a;
  color: #fff;
  font: 600 13px 'Chakra Petch', sans-serif;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.language-picker select:focus,
.language-picker select:focus-visible {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.5);
}

/* ==========================================================================
   CARDS COMMON STYLES
   ========================================================================== */
.prep-card,
.install-card,
.steps,
.donation-card,
.troubleshooting {
  position: relative;
  margin-top: 36px;
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid var(--border-hud);
  border-radius: 12px;
  background: var(--surface-card);
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
}

.install-page h2 {
  margin: 0 0 14px;
  font: 400 clamp(32px, 4vw, 46px)/1.1 Bangers, Impact, sans-serif;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 2px 2px 0 #000;
}

/* ==========================================================================
   PREPARATION CHECKLIST (PREP-CARD)
   ========================================================================== */
.prep-card {
  border-top: 3px solid var(--cyan);
  background: linear-gradient(145deg, rgba(14, 23, 42, 0.9) 0%, rgba(9, 13, 24, 0.95) 100%);
}

.prep-card::after {
  content: 'CHECKLIST';
  position: absolute;
  right: 28px;
  top: 15px;
  color: rgba(255, 255, 255, 0.03);
  font: 400 clamp(60px, 9vw, 110px)/1 Bangers, Impact, sans-serif;
  letter-spacing: 3px;
  pointer-events: none;
}

.prep-intro {
  margin: 0 0 24px;
  color: var(--text-muted) !important;
  font-size: 15px;
}

.prep-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.prep-grid article {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.7);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.prep-grid article:hover {
  transform: translateY(-2px);
  border-color: rgba(6, 182, 212, 0.4);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.prep-icon {
  display: grid;
  place-items: center;
  flex: none;
  min-width: 40px;
  height: 40px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 220, 53, 0.15);
  color: var(--yellow);
  font: 700 13px/1 'Chakra Petch', sans-serif;
  box-shadow: 0 0 10px rgba(255, 220, 53, 0.2);
}

.prep-grid article:nth-child(2) .prep-icon {
  background: rgba(237, 59, 54, 0.15);
  color: #ff6b66;
  border-color: rgba(237, 59, 54, 0.4);
  box-shadow: 0 0 10px rgba(237, 59, 54, 0.2);
}

.prep-grid article:nth-child(3) .prep-icon {
  background: rgba(6, 182, 212, 0.15);
  color: var(--cyan);
  border-color: rgba(6, 182, 212, 0.4);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

.prep-grid article:nth-child(4) .prep-icon {
  background: rgba(16, 185, 129, 0.15);
  color: var(--green-bright);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.prep-grid h3 {
  margin: 0 0 6px;
  color: #fff;
  font: 700 16px/1.3 'Chakra Petch', sans-serif;
  letter-spacing: 0.3px;
}

.prep-grid p {
  margin: 0;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.55;
}

/* ==========================================================================
   DOWNLOAD CARD
   ========================================================================== */
.install-card {
  border-top: 3px solid var(--yellow);
  background: linear-gradient(145deg, rgba(16, 24, 44, 0.9) 0%, rgba(10, 14, 26, 0.95) 100%);
}

.install-card::before {
  content: 'DOWNLOADS';
  position: absolute;
  top: 15px;
  right: 28px;
  color: rgba(255, 255, 255, 0.03);
  font: 400 clamp(54px, 8vw, 100px)/1 Bangers, Impact, sans-serif;
  letter-spacing: 3px;
  pointer-events: none;
}

.install-card > p:not(.eyebrow) {
  margin: 0 0 24px;
  color: var(--text-muted);
  font-size: 15px;
}

.file-links {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.file-link {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  min-height: 155px;
  padding: 22px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(17, 24, 39, 0.85);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  color: #fff;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  position: relative;
  overflow: hidden;
}

.file-link:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.7);
}

.file-link.apk {
  background: linear-gradient(135deg, rgba(237, 59, 54, 0.9) 0%, rgba(185, 28, 28, 0.95) 100%);
  border-color: rgba(237, 59, 54, 0.6);
  box-shadow: 0 8px 24px -4px rgba(237, 59, 54, 0.4);
}

.file-link.apk:hover {
  border-color: #ff8a85;
  box-shadow: 0 12px 32px rgba(237, 59, 54, 0.6);
}

.file-link:nth-child(2) {
  border-top: 4px solid var(--cyan);
}

.file-link:nth-child(2):hover {
  border-color: var(--cyan);
  box-shadow: 0 8px 25px rgba(6, 182, 212, 0.3);
}

.file-link:nth-child(3) {
  border-top: 4px solid var(--yellow);
}

.file-link:nth-child(3):hover {
  border-color: var(--yellow);
  box-shadow: 0 8px 25px rgba(255, 220, 53, 0.3);
}

.file-kind {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.5);
  color: var(--yellow);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.file-link.apk .file-kind {
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
}

.file-link strong {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.5;
  color: #fff;
  overflow-wrap: anywhere;
}

.small-note {
  margin: 28px 0 8px !important;
  font-size: 13px;
  color: var(--text-muted);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--cyan) !important;
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color 0.2s, text-shadow 0.2s;
}

.text-link:hover {
  color: var(--cyan-bright) !important;
  text-shadow: 0 0 10px rgba(6, 182, 212, 0.6);
}

/* ==========================================================================
   SETUP STEPS (CHECKLIST)
   ========================================================================== */
.steps {
  border-top: 3px solid var(--green-bright);
  background: linear-gradient(145deg, rgba(14, 21, 38, 0.95) 0%, rgba(9, 13, 24, 0.98) 100%);
}

.progress-panel {
  position: relative;
  z-index: 1;
  margin: 22px 0 10px;
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(11, 16, 28, 0.9);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.progress-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.progress-copy strong {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.progress-copy button {
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font: 700 11px/1.2 'Chakra Petch', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}

.progress-copy button:hover {
  border-color: var(--yellow);
  color: var(--yellow);
  background: rgba(255, 220, 53, 0.1);
}

.progress-track {
  overflow: hidden;
  height: 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(15, 23, 42, 0.8);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--yellow) 0%, var(--green-bright) 60%, var(--cyan) 100%);
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.6);
  transition: width 0.3s ease;
}

.steps ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 16px;
  min-height: 145px;
  padding: 22px 58px 22px 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.75);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  position: relative;
  transition: background-color 0.25s, border-color 0.25s, transform 0.2s, box-shadow 0.2s;
}

.steps li:nth-child(3n+1) { border-top: 3px solid var(--yellow); }
.steps li:nth-child(3n+2) { border-top: 3px solid var(--red); }
.steps li:nth-child(3n) { border-top: 3px solid var(--cyan); }

.steps li:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.steps li.is-complete {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.4);
}

.steps li.is-complete h3 {
  color: var(--green-bright);
}

.step-check {
  appearance: none;
  position: absolute;
  top: 18px;
  right: 18px;
  width: 28px;
  height: 28px;
  margin: 0;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  background: rgba(11, 16, 28, 0.8);
  cursor: pointer;
  transition: all 0.2s;
}

.step-check::after {
  content: '✓';
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: transparent;
  font: 900 16px/1 Arial, sans-serif;
  transition: color 0.15s;
}

.step-check:checked {
  background: var(--green-bright);
  border-color: var(--green-bright);
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.6);
}

.step-check:checked::after {
  color: #070a12;
}

.step-check:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
}

.step-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 220, 53, 0.15);
  color: var(--yellow);
  font: 400 24px/1 Bangers, Impact, sans-serif;
  box-shadow: 0 0 10px rgba(255, 220, 53, 0.2);
}

.steps li:nth-child(3n+2) .step-number {
  background: rgba(237, 59, 54, 0.15);
  color: #ff6b66;
  border-color: rgba(237, 59, 54, 0.4);
  box-shadow: 0 0 10px rgba(237, 59, 54, 0.2);
}

.steps li:nth-child(3n) .step-number {
  background: rgba(6, 182, 212, 0.15);
  color: var(--cyan);
  border-color: rgba(6, 182, 212, 0.4);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

.steps h3 {
  margin: 1px 0 8px;
  color: #fff;
  font: 600 18px/1.3 'Chakra Petch', sans-serif;
  letter-spacing: 0.3px;
}

.steps li p {
  margin: 0;
  color: #94a3b8;
  font-size: 13.5px;
  line-height: 1.55;
}

.install-page code {
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.5);
  color: var(--yellow);
  font-size: 0.9em;
}

/* ==========================================================================
   DONATION CARD
   ========================================================================== */
.donation-card {
  display: flex;
  overflow: hidden;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  background: linear-gradient(135deg, rgba(185, 28, 28, 0.9) 0%, rgba(127, 29, 29, 0.95) 100%);
  border: 1px solid rgba(237, 59, 54, 0.5);
  box-shadow: 0 10px 30px -5px rgba(237, 59, 54, 0.3);
}

.donation-card::after {
  content: 'PLUS ULTRA';
  position: absolute;
  right: -20px;
  bottom: -25px;
  color: rgba(255, 255, 255, 0.05);
  font: 400 90px/1 Bangers, Impact, sans-serif;
  letter-spacing: 3px;
  transform: rotate(-5deg);
  pointer-events: none;
}

.donation-copy {
  position: relative;
  z-index: 1;
}

.donation-copy p:last-child {
  max-width: 720px;
  margin: 0;
  color: #fca5a5;
  font-size: 15px;
}

.donation-button {
  position: relative;
  z-index: 1;
  display: inline-block;
  flex: none;
  padding: 14px 26px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.3);
  background: var(--yellow);
  box-shadow: 0 4px 16px rgba(255, 220, 53, 0.4);
  color: #070a12;
  font: 400 22px/1.2 Bangers, Impact, sans-serif;
  letter-spacing: 1px;
  text-align: center;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.donation-button:hover {
  transform: translateY(-2px);
  background: #fff;
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   TROUBLESHOOTING
   ========================================================================== */
.troubleshooting {
  overflow: hidden;
  border-top: 3px solid var(--yellow);
  background: linear-gradient(145deg, rgba(20, 27, 45, 0.9) 0%, rgba(12, 17, 30, 0.95) 100%);
}

.troubleshooting::after {
  content: '?';
  position: absolute;
  right: 32px;
  top: -30px;
  color: rgba(255, 255, 255, 0.03);
  font: 400 180px/1 Bangers, Impact, sans-serif;
  transform: rotate(8deg);
  pointer-events: none;
}

.troubleshooting p {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 0 12px;
  color: #cbd5e1;
  font-size: 14.5px;
}

.install-footnote {
  max-width: 850px;
  margin: 28px 0 0;
  padding-left: 14px;
  border-left: 3px solid var(--yellow);
  color: var(--text-muted) !important;
  font-size: 13px !important;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1050px) {
  .prep-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .file-links { grid-template-columns: 1fr; }
  .file-link { min-height: 120px; }
  .steps ol { grid-template-columns: 1fr; }
  .steps li { min-height: auto; }
}

@media (max-width: 700px) {
  .install-page { padding: 24px 16px 60px; }
  .install-hero { min-height: 0; padding: 40px 24px 50px; }
  .install-hero h1 { font-size: clamp(40px, 14vw, 64px); }
  .install-hero .intro { font-size: 15px; }
  .language-picker { width: 100%; flex-direction: column; align-items: stretch; gap: 8px; }
  .language-picker select { width: 100%; }
  .prep-card, .install-card, .steps, .donation-card, .troubleshooting {
    margin-top: 24px;
    padding: 24px 18px;
  }
  .prep-grid { grid-template-columns: 1fr; }
  .donation-card { flex-direction: column; align-items: stretch; }
  .donation-button { width: 100%; }
}
