:root {
  --radius: 18px;
  --transition: 0.3s ease;
}

/* ================= THEME ================= */
/* LIGHT */
body[data-theme="light"] {
  --bg: #F8F5F2;
  --card: #FFFFFF;
  --text: #1E1E1E;
  --accent: #E50914;
}

/* DARK */
body[data-theme="dark"] {
  --bg: #0E0E0E;
  --card: #161616;
  --text: #FFFFFF;
  --accent: #E50914;
}

/* ================= BASE ================= */
body {
  margin: 0;
  font-family: Courier, monospace;
  background: var(--bg);
  color: var(--text);
  transition: var(--transition);
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ================= LAYOUT ================= */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ================= NAVBAR ================= */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
}

button {
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  cursor: pointer;
  background: var(--card);
  color: var(--text);
}

/* ================= HERO ================= */
.hero {
  text-align: center;
  padding: 70px 20px;
}

.hero h1 {
  font-size: 2.4rem;
}

/* ================= CARD (GLOBAL) ================= */
.card,
.feature-card,
.result-card {
  background: var(--card);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  transition: var(--transition);
  position: relative;

  /* animation start */
  opacity: 0;
  transform: translateY(30px) scale(0.97);
  animation: cardFadeUp 0.7s ease forwards;
}

/* animation delay */
.card { animation-delay: 0.05s; }
.feature-card { animation-delay: 0.1s; }
.result-card { animation-delay: 0.15s; }

@keyframes cardFadeUp {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* hover effect */
.card:hover,
.feature-card:hover,
.result-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow:
    0 18px 40px rgba(0,0,0,0.15),
    0 0 0 1px var(--accent);
}

/* active (tap) */
.card:active,
.feature-card:active,
.result-card:active {
  transform: scale(0.96);
}

/* ================= FOOTER ================= */
footer {
  text-align: center;
  padding: 24px;
  opacity: 0.7;
  margin-top: 60px;
}

/* ================= GRID ================= */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

/* ================= FEATURE CARD ================= */
.feature-card {
  padding: 18px;
  cursor: pointer;
  border: 1px solid transparent;
}

.feature-card h4 {
  margin: 0 0 6px;
}

.feature-card p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* ================= FORM ================= */
.downloader-form {
  margin-top: 16px;
}

.input {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--accent);
  margin-bottom: 14px;
  background: transparent;
  color: var(--text);
}

.input:focus {
  outline: none;
  border-color: var(--accent);
}

.downloader-form button {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: bold;
  transition: var(--transition);
}

.downloader-form button:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* ================= HIDDEN ================= */
.hidden {
  display: none;
}

/* ================= RESULT ================= */
#igResult,
#ttResult {
  margin-top: 20px;
}

.result-header {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  opacity: .85;
  display: flex;
  justify-content: space-between;
}

/* ================= JSON VIEW ================= */
.json-view {
  margin-top: 10px;
  background: #0f0f0f;
  color: #00ffcc;
  border-radius: 12px;
  padding: 14px;
  font-family: ui-monospace, monospace;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 420px;
  overflow: auto;
}

body[data-theme="light"] .json-view {
  background: #f4f4f4;
  color: #1e1e1e;
}

.json-view::-webkit-scrollbar {
  width: 6px;
}
.json-view::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 6px;
}

/* ================= COPY BUTTON ================= */
.copy-json {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  opacity: 0.85;
}

.copy-json:hover {
  opacity: 1;
  transform: scale(1.05);
}

/* ================= BUTTON LINKS ================= */
.card-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* DOCS */
.docs-link {
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  transition: var(--transition);
}

.docs-link:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

/* WHATSAPP */
.wa-link {
  padding: 12px 18px;
  border-radius: 14px;
  background: #25D366;
  color: #fff;
  font-weight: 600;
  transition: var(--transition);
}

.wa-link:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 480px) {
  .card-actions {
    flex-direction: column;
  }

  .card-actions a {
    width: 100%;
    justify-content: center;
  }
    }
