/* ═══ VARIABLES ═══ */
:root {
  --color-bg: #0a0a0a;
  --color-card: #121212;
  --color-primary: #e1306c;
  --color-secondary: #f77737;
  --color-accent: #833ab4;
  --color-gradient: linear-gradient(135deg, #833ab4, #e1306c, #f77737);
  --color-success: #1db954;
  --color-text: #fafafa;
  --color-muted: #a8a8a8;
  --color-border: #262626;
  --font-heading: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(225,48,108,0.15);
  --transition: all 0.3s ease;
  --header-height: 72px;
  --site-width: 1200px;
  --site-gutter: 24px;
}

/* ═══ RESET & BASE ═══ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  font-size: 1rem;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--color-secondary); }
ul { list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.3; }
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); font-weight: 700; margin-bottom: 1rem; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin-bottom: 1rem; color: var(--color-text); }

/* ═══ LAYOUT — centered max-width (industry standard) ═══ */
.container {
  width: 100%;
  max-width: var(--site-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--site-gutter);
  padding-right: var(--site-gutter);
}
main.container { padding-bottom: 48px; }
main.container > section {
  padding: 48px 0;
}
main.container > section + section {
  border-top: 1px solid var(--color-border);
}
section.hero,
section.page-hero {
  padding: calc(var(--header-height) + 48px) 0 80px;
}
section.page-hero {
  padding-bottom: 48px;
}
.text-muted { color: var(--color-muted); }
.text-gradient {
  background: var(--color-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ═══ INSTAGRAM GRADIENT UTILITIES ═══ */
.bg-gradient { background: var(--color-gradient); }
.border-gradient {
  border: 2px solid transparent;
  background: linear-gradient(var(--color-card), var(--color-card)) padding-box,
              var(--color-gradient) border-box;
}

/* ═══ HEADER ═══ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
  transition: var(--transition);
}
.site-header.header-shrink {
  height: 60px;
  box-shadow: var(--shadow);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
  width: 100%;
  max-width: var(--site-width);
  margin: 0 auto;
  padding: 0 var(--site-gutter);
}
.logo {
  font-family: var(--font-heading);
  font-weight: 800; font-size: 1.35rem;
  background: var(--color-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo span { -webkit-text-fill-color: var(--color-text); }
.nav-desktop { display: flex; gap: 6px; align-items: center; }
.nav-desktop a {
  color: var(--color-muted); font-size: 0.88rem; font-weight: 500;
  padding: 8px 12px; border-radius: 8px;
}
.nav-desktop a:hover, .nav-desktop a.active {
  color: var(--color-text); background: var(--color-border);
}
.btn-download-header {
  background: var(--color-gradient);
  color: white !important; padding: 10px 18px !important;
  border-radius: 999px; font-weight: 600;
  animation: pulseGlow 2s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(225,48,108,0.4); }
  50% { box-shadow: 0 0 20px 4px rgba(225,48,108,0.35); }
}
.hamburger {
  display: none; background: none; border: none;
  color: var(--color-text); font-size: 1.5rem; cursor: pointer;
}
.nav-mobile {
  display: none; position: fixed; top: var(--header-height); left: 0; right: 0;
  background: var(--color-card); border-bottom: 1px solid var(--color-border);
  padding: 16px 20px; flex-direction: column; gap: 4px; z-index: 999;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  color: var(--color-muted); padding: 12px 16px; border-radius: 8px;
  font-weight: 500;
}
.nav-mobile a:hover { background: var(--color-border); color: var(--color-text); }

@media (max-width: 900px) {
  .nav-desktop { display: none; }
  .hamburger { display: block; }
}

/* ═══ HERO ANIMATED GRADIENT ═══ */
.hero {
  position: relative; overflow: hidden; text-align: center;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg,
    rgba(131,58,180,0.25) 0%,
    rgba(225,48,108,0.2) 50%,
    rgba(247,119,55,0.15) 100%);
  animation: heroShift 8s ease-in-out infinite alternate;
}
@keyframes heroShift {
  0% { opacity: 0.6; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.05); }
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { margin-bottom: 16px; }
.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--color-muted); max-width: 720px; margin: 0 auto 28px;
}
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 24px; }
.trust-bar {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
  margin-bottom: 20px; font-size: 0.85rem;
}
.trust-bar span {
  background: var(--color-card); border: 1px solid var(--color-border);
  padding: 6px 14px; border-radius: 999px;
}
.hero-rating { color: var(--color-secondary); font-size: 0.95rem; margin-bottom: 24px; }
.stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  max-width: 800px; margin: 0 auto;
}
.stat-item {
  background: var(--color-card); border: 1px solid var(--color-border);
  border-radius: var(--radius); padding: 20px 12px;
}
.stat-num {
  font-family: var(--font-heading); font-size: 1.75rem; font-weight: 800;
  display: block;
}
@media (max-width: 600px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}

/* ═══ BUTTONS ═══ */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--color-gradient); color: white;
  padding: 14px 28px; border-radius: 999px;
  font-weight: 700; font-size: 1rem; border: none; cursor: pointer;
  transition: var(--transition);
  animation: pulseGlow 2s ease-in-out infinite;
}
.btn-primary:hover { transform: scale(1.04); opacity: 0.95; color: white; }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  border: 2px solid var(--color-border); color: var(--color-text);
  padding: 12px 24px; border-radius: 999px; font-weight: 600;
  background: transparent; cursor: pointer;
}
.btn-secondary:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* ═══ BREADCRUMB ═══ */
.breadcrumb {
  padding: calc(var(--header-height) + 16px) 0 0;
  font-size: 0.82rem; color: var(--color-muted);
}
.breadcrumb a { color: var(--color-muted); }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb span { margin: 0 8px; }

/* ═══ TABLES ═══ */
.table-wrap { overflow-x: auto; margin: 24px 0; border-radius: var(--radius); }
table {
  width: 100%; border-collapse: collapse;
  background: var(--color-card); border: 1px solid var(--color-border);
  border-radius: var(--radius); overflow: hidden;
}
th, td {
  padding: 14px 16px; text-align: left;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.92rem;
}
th { background: var(--color-border); font-family: var(--font-heading); font-weight: 600; }
tr:last-child td { border-bottom: none; }
.col-insta-pro { background: rgba(225,48,108,0.08); color: var(--color-primary); font-weight: 600; }
.check-yes { color: var(--color-success); }
.check-no { color: #f59e0b; }

/* ═══ FEATURE CARDS ═══ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px; margin-top: 32px;
}
.feature-card {
  background: var(--color-card); border: 1px solid var(--color-border);
  border-radius: var(--radius); padding: 28px 24px;
  transition: var(--transition);
}
.feature-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}
.feature-card .icon {
  width: 52px; height: 52px; border-radius: 12px;
  background: rgba(225,48,108,0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: var(--color-primary); margin-bottom: 16px;
}
.feature-card h3 { margin-bottom: 8px; }
.feature-card p { color: var(--color-muted); font-size: 0.9rem; margin: 0; }

/* ═══ MOD VS OFFICIAL TABLE ═══ */
.comparison-highlight th:nth-child(3),
.comparison-highlight td:nth-child(3) {
  background: rgba(225,48,108,0.06);
}

/* ═══ DOWNLOAD CARD ═══ */
.download-card {
  background: var(--color-card); border: 2px solid var(--color-primary);
  border-radius: 20px; padding: 40px 32px; text-align: center;
  max-width: 560px; margin: 32px auto;
  box-shadow: var(--shadow);
}
.download-meta {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
  margin: 16px 0 24px; font-size: 0.88rem; color: var(--color-muted);
}
.download-meta span {
  background: var(--color-bg); padding: 6px 14px; border-radius: 8px;
}

/* ═══ SUB PAGE CARDS ═══ */
.guide-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px; margin-top: 24px;
}
.guide-card {
  background: var(--color-card); border: 1px solid var(--color-border);
  border-radius: var(--radius); padding: 24px; text-align: center;
  transition: var(--transition);
}
.guide-card:hover { border-color: var(--color-primary); transform: translateY(-4px); }
.guide-card .emoji { font-size: 2rem; margin-bottom: 12px; display: block; }

/* ═══ VISUAL INSTALL STEPS ═══ */
.install-steps {
  display: grid; gap: 0; margin-top: 32px; position: relative;
}
.install-step {
  display: flex; gap: 20px; align-items: flex-start;
  padding: 20px 0; position: relative;
}
.install-step::before {
  content: '';
  position: absolute; left: 23px; top: 56px; bottom: 0;
  width: 2px; background: var(--color-border);
}
.install-step:last-child::before { display: none; }
.step-num {
  flex-shrink: 0; width: 48px; height: 48px;
  background: var(--color-gradient); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-weight: 800; font-size: 1.1rem;
  color: white;
}
.step-content h3 { margin-bottom: 6px; font-size: 1rem; }
.step-content p { margin: 0; color: var(--color-muted); font-size: 0.9rem; }
.tip-box, .note-box {
  padding: 16px 20px; border-radius: var(--radius); margin-top: 24px;
  font-size: 0.9rem;
}
.tip-box { background: rgba(29,185,84,0.1); border-left: 4px solid var(--color-success); }
.note-box { background: rgba(245,158,11,0.1); border-left: 4px solid #f59e0b; }

/* ═══ SCREENSHOTS ═══ */
.screenshots-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px;
}
.screenshot-item {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--color-border);
}
.screenshot-item img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
@media (max-width: 768px) {
  .screenshots-grid { grid-template-columns: 1fr; }
}

/* ═══ PROS & CONS ═══ */
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; }
.pros-cons ul li {
  padding: 10px 14px; margin-bottom: 8px; border-radius: 8px;
  font-size: 0.92rem; display: flex; gap: 10px; align-items: flex-start;
}
.pros-list li { background: rgba(29,185,84,0.08); border-left: 3px solid var(--color-success); }
.cons-list li { background: rgba(245,158,11,0.08); border-left: 3px solid #f59e0b; }
@media (max-width: 700px) { .pros-cons { grid-template-columns: 1fr; } }

/* ═══ SAFETY SECTION ═══ */
.safety-box {
  background: var(--color-card); border: 1px solid var(--color-border);
  border-radius: var(--radius); padding: 32px; margin-top: 24px;
}
.safety-tips { margin-top: 16px; }
.safety-tips li {
  padding: 8px 0 8px 24px; position: relative; color: var(--color-muted);
}
.safety-tips li::before {
  content: '✓'; position: absolute; left: 0; color: var(--color-success);
}

/* ═══ FAQ ACCORDION ═══ */
.faq-list { margin-top: 24px; }
.faq-item {
  background: var(--color-card); border: 1px solid var(--color-border);
  border-radius: var(--radius); margin-bottom: 10px; overflow: hidden;
}
.faq-question {
  width: 100%; text-align: left; background: none; border: none;
  color: var(--color-text); font-family: var(--font-heading);
  font-weight: 600; font-size: 0.95rem; padding: 18px 48px 18px 20px;
  cursor: pointer; position: relative; transition: var(--transition);
}
.faq-question:hover { color: var(--color-primary); }
.faq-question::after {
  content: '+'; position: absolute; right: 20px; top: 50%;
  transform: translateY(-50%); font-size: 1.4rem; color: var(--color-primary);
  transition: var(--transition);
}
.faq-item.active .faq-question::after { content: '−'; }
.faq-answer {
  max-height: 0; overflow: hidden; transition: max-height 0.35s ease;
  padding: 0 20px;
}
.faq-item.active .faq-answer { max-height: 500px; padding: 0 20px 18px; }
.faq-answer p { color: var(--color-muted); font-size: 0.9rem; margin: 0; }

/* ═══ VERSION HISTORY ═══ */
.version-table td:first-child { font-weight: 600; color: var(--color-primary); }

/* ═══ BACK TO TOP ═══ */
.back-to-top {
  position: fixed; bottom: 24px; right: 24px;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--color-gradient); color: white; border: none;
  cursor: pointer; opacity: 0; visibility: hidden;
  transition: var(--transition); z-index: 900;
  display: flex; align-items: center; justify-content: center;
}
.back-to-top.visible { opacity: 1; visibility: visible; }

/* ═══ FOOTER ═══ */
.site-footer {
  background: var(--color-card); border-top: 1px solid var(--color-border);
  padding: 48px 0 24px; margin-top: 48px;
}
.site-footer .container,
.breadcrumb.container {
  max-width: var(--site-width);
  margin-left: auto;
  margin-right: auto;
}
.footer-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 32px; margin-bottom: 32px;
}
.footer-grid h4 {
  font-size: 0.85rem; color: var(--color-muted); margin-bottom: 12px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.footer-grid a {
  display: block; color: var(--color-muted); font-size: 0.88rem;
  padding: 4px 0;
}
.footer-grid a:hover { color: var(--color-primary); }
.footer-bottom {
  text-align: center; padding-top: 24px;
  border-top: 1px solid var(--color-border);
  font-size: 0.82rem; color: var(--color-muted);
}
.disclaimer { font-size: 0.78rem; margin-top: 8px; }

/* ═══ PAGE HERO (subpages) ═══ */
.page-hero {
  text-align: center;
}
.page-hero h1 { margin-bottom: 12px; }
.page-hero p { color: var(--color-muted); max-width: 680px; margin: 0 auto 24px; }

/* ═══ CONTENT BLOCKS ═══ */
.content-block { max-width: 800px; }
.content-block h2 { margin-top: 48px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 768px) { .two-col { grid-template-columns: 1fr; } }

.emulator-badge { display: inline-block; background: var(--color-success); color: white; font-size: 0.7rem; padding: 2px 8px; border-radius: 4px; }

.verdict-box {
  background: linear-gradient(135deg, rgba(131,58,180,0.15), rgba(225,48,108,0.1));
  border: 1px solid var(--color-primary);
  border-radius: var(--radius); padding: 24px; margin: 24px 0;
}

.trust-strip {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 16px;
  margin-bottom: 24px; font-size: 0.82rem; color: var(--color-muted);
}
.trust-strip span {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--color-card); border: 1px solid var(--color-border);
  padding: 6px 14px; border-radius: 999px;
}
.trust-strip i { color: var(--color-success); }

/* ═══ LEGAL & CONTACT PAGES ═══ */
.legal-page .page-hero { padding-bottom: 32px; }
.legal-content {
  max-width: 760px;
  margin: 0 auto;
  padding-bottom: 48px;
}
.legal-content h2 {
  margin-top: 40px;
  font-size: 1.25rem;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 {
  margin-top: 24px;
  font-size: 1.05rem;
  color: var(--color-text);
}
.legal-content p,
.legal-content li {
  color: var(--color-muted);
  font-size: 0.95rem;
}
.legal-content ul {
  list-style: disc;
  margin: 12px 0 16px 24px;
}
.legal-content li { margin-bottom: 8px; }
.legal-content a { color: var(--color-primary); }
.legal-updated {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-bottom: 24px;
}
.contact-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  max-width: 480px;
  margin: 0 auto 32px;
}
.contact-card .contact-email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-primary);
  margin: 16px 0;
  word-break: break-all;
}
.contact-card .contact-email:hover { color: var(--color-secondary); }
.footer-legal-links {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 8px 16px; margin-bottom: 12px;
  font-size: 0.82rem;
}
.footer-legal-links a { color: var(--color-muted); }
.footer-legal-links a:hover { color: var(--color-primary); }
.footer-legal-links span { color: var(--color-border); }

/* ═══ DOWNLOAD MODAL (Magis-style) ═══ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.modal-overlay.modal-active {
  opacity: 1; visibility: visible;
}
.modal-card {
  background: #1c1e22;
  border: 1px solid #2d3139;
  border-radius: 16px;
  padding: 36px 28px 28px;
  width: 100%;
  max-width: 400px;
  position: relative;
  text-align: center;
  transform: scale(0.92) translateY(16px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-overlay.modal-active .modal-card {
  transform: scale(1) translateY(0);
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  background: transparent;
  border: none;
  width: 32px; height: 32px;
  color: #9ca3af;
  font-size: 1.1rem;
  cursor: pointer;
  transition: color 0.2s ease;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { color: #fff; }
.modal-panel.hidden { display: none; }
.modal-app-icon {
  margin: 0 auto 16px;
  width: 80px; height: 80px;
}
.modal-app-icon img {
  margin: 0 auto;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(225, 48, 108, 0.35);
}
.modal-app-name {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}
.modal-app-meta {
  font-size: 0.88rem;
  color: #9ca3af;
  margin-bottom: 0;
}
.modal-divider {
  border: none;
  border-top: 1px solid #2d3139;
  margin: 20px 0;
}
.modal-instruction {
  font-size: 0.88rem;
  color: #9ca3af;
  line-height: 1.5;
  margin-bottom: 20px;
}
.modal-btn-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 10px;
  background: var(--color-gradient);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
  margin-bottom: 16px;
}
.modal-btn-download:hover:not(:disabled) {
  opacity: 0.92;
  transform: scale(1.02);
}
.modal-btn-download:disabled,
.modal-btn-download.is-loading {
  opacity: 0.75;
  cursor: not-allowed;
  transform: none;
}
.modal-verified {
  font-size: 0.82rem;
  color: var(--color-success);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.modal-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  background: #252830;
  border: 1px solid #353a45;
  color: #d1d5db;
}
.modal-badge i { font-size: 0.75rem; }
.modal-badge.badge-free i { color: var(--color-success); }
.modal-badge.badge-safe i { color: #60a5fa; }
.modal-badge.badge-fast i { color: var(--color-secondary); }
.modal-progress-wrap { margin: 20px 0 12px; }
.modal-progress-bar {
  width: 100%; height: 10px;
  background: #2d3139;
  border-radius: 999px;
  overflow: hidden;
}
.modal-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--color-gradient);
  border-radius: 999px;
  transition: width 0.1s linear;
}
.modal-percent {
  display: block;
  margin-top: 8px;
  font-size: 0.85rem;
  color: #9ca3af;
  font-weight: 600;
}
.modal-disclaimer {
  font-size: 0.72rem;
  color: var(--color-muted);
  text-align: center;
  margin-top: 12px;
}
.modal-disclaimer a {
  color: var(--color-muted);
  text-decoration: underline;
}
.modal-disclaimer a:hover { color: var(--color-primary); }
