/* =========================================================
   StoryIndir.com — Global Styles (Index + Privacy + Terms)
   Theme: Instagram Gradient
   ========================================================= */

:root{
  --bg: #0B0B10;
  --panel: rgba(20, 20, 32, 0.72);
  --panel-2: rgba(12, 12, 18, 0.75);
  --border: rgba(255,255,255,0.08);
  --border-2: rgba(255,255,255,0.12);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.68);
  --muted-2: rgba(255,255,255,0.56);
  --shadow: 0 18px 60px rgba(0,0,0,0.45);
  --shadow-soft: 0 10px 30px rgba(0,0,0,0.35);

  /* Instagram-ish gradient */
  --ig-1: #feda75; /* yellow */
  --ig-2: #fa7e1e; /* orange */
  --ig-3: #d62976; /* pink */
  --ig-4: #962fbf; /* purple */
  --ig-5: #4f5bd5; /* blue */

  --accent: var(--ig-3);
  --accent-2: var(--ig-4);

  --ok: #22c55e;
  --warn: #fbbf24;
  --err: #ef4444;

  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 10px;

  --container: 1120px;

  --font: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

*{ box-sizing: border-box; }
html, body{
  height: 100%;
}
body{
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* background glow layer */
.bg-glow{
  position: fixed;
  inset: -20vh -20vw;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 420px at 15% 25%, rgba(214,41,118,0.18), rgba(0,0,0,0) 60%),
    radial-gradient(900px 420px at 85% 10%, rgba(79,91,213,0.18), rgba(0,0,0,0) 60%),
    radial-gradient(1000px 520px at 60% 95%, rgba(250,126,30,0.14), rgba(0,0,0,0) 60%),
    radial-gradient(1200px 650px at 50% 45%, rgba(150,47,191,0.10), rgba(0,0,0,0) 62%);
  filter: blur(0px);
}

/* selection */
::selection{
  background: rgba(214,41,118,0.35);
}

/* basic elements */
a{
  color: rgba(255,255,255,0.92);
  text-decoration: none;
}
a:hover{
  text-decoration: underline;
  text-underline-offset: 3px;
}
strong{
  font-weight: 700;
}

/* screen-reader only */
.sr-only{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* =========================================================
   Layout containers
   ========================================================= */

.page{
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 18px 90px; /* bottom space for mobile sticky ad */
}

@media (min-width: 900px){
  .page{ padding: 26px 20px 40px; }
}

/* Header */
.header{
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 12px 0 18px;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 900px){
  .header{
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0 22px;
  }
}

.brand{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Logo */
.logo{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-mark{
  width: 32px;
  height: 32px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--ig-1), var(--ig-2), var(--ig-3), var(--ig-4), var(--ig-5));
  box-shadow: 0 10px 24px rgba(214,41,118,0.28);
}

.logo-text{
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.logo-text span{
  background: linear-gradient(135deg, var(--ig-2), var(--ig-3), var(--ig-4));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.logo-text .dot{
  color: rgba(255,255,255,0.86);
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
}

.tagline{
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

/* Nav */
.nav{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.nav-link{
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.88);
  font-size: 13px;
}
.nav-link:hover{
  text-decoration: none;
  border-color: var(--border-2);
  background: rgba(255,255,255,0.06);
}

/* =========================================================
   Cards / Sections
   ========================================================= */

.card{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.section{
  padding: 18px 16px;
  margin-top: 14px;
}

@media (min-width: 900px){
  .section{
    padding: 22px 20px;
    margin-top: 16px;
  }
}

.h1{
  margin: 0 0 14px;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.6px;
}
.h1-sub{
  display: block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
}

@media (min-width: 900px){
  .h1{ font-size: 32px; }
  .h1-sub{ font-size: 14px; }
}

h2{
  margin: 0 0 10px;
  font-size: 18px;
  letter-spacing: -0.2px;
}
h3{
  margin: 0 0 8px;
  font-size: 16px;
}

/* =========================================================
   Index Layout (main + sidebar)
   ========================================================= */

.layout{
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 18px;
}

@media (min-width: 900px){
  .layout{
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 18px;
    align-items: start;
  }
}

.main{ min-width: 0; }
.sidebar{ display: none; }
@media (min-width: 900px){
  .sidebar{ display: block; }
}

.sidebar-card{
  padding: 16px;
  margin-bottom: 14px;
}
.sidebar-card.small p{ margin: 0; }

.list{
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}
.list li{ margin: 6px 0; }
.list a{ color: rgba(255,255,255,0.86); }

/* =========================================================
   Downloader Card (Hero)
   ========================================================= */

.hero{
  padding: 18px 16px;
}

@media (min-width: 900px){
  .hero{ padding: 22px 20px; }
}

.form{
  display: block;
}

.input-row{
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 720px){
  .input-row{
    grid-template-columns: 1fr 180px;
    align-items: stretch;
  }
}

input[type="url"], input[type="text"]{
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.28);
  color: rgba(255,255,255,0.92);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

input::placeholder{
  color: rgba(255,255,255,0.46);
}

input:focus{
  border-color: rgba(214,41,118,0.55);
  box-shadow: 0 0 0 4px rgba(214,41,118,0.14);
}

/* Button (Instagram gradient) */
button, .btn{
  border: 0;
  cursor: pointer;
  font-family: var(--font);
}

#downloadBtn{
  height: 48px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  letter-spacing: 0.1px;
  color: rgba(255,255,255,0.95);
  background: linear-gradient(135deg, var(--ig-2), var(--ig-3), var(--ig-4));
  box-shadow: 0 16px 40px rgba(214,41,118,0.20);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform .08s ease, filter .15s ease, box-shadow .15s ease;
}

#downloadBtn:hover{
  filter: brightness(1.05);
  box-shadow: 0 18px 48px rgba(214,41,118,0.26);
}
#downloadBtn:active{
  transform: translateY(1px) scale(0.99);
}

.btn-text{ font-size: 14px; }
.btn-icon{ font-size: 16px; }

.hint{
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
}

/* Loader */
.hidden{ display: none !important; }

.loader{
  margin-top: 14px;
  padding: 14px 14px;
  border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.22);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.spinner{
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: rgba(255,255,255,0.85);
  animation: spin 0.85s linear infinite;
}
@keyframes spin{
  to{ transform: rotate(360deg); }
}

.loader-text{
  color: rgba(255,255,255,0.86);
  font-size: 13px;
}

/* Result area (cards injected by JS) */
.result{
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.result .result-card{
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.24);
  padding: 14px;
}

.result .result-title{
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
}

.result .result-meta{
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--muted);
  word-break: break-word;
}

.result .btn-row{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.a-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.92);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.a-btn:hover{
  text-decoration: none;
  border-color: var(--border-2);
  background: rgba(255,255,255,0.07);
}

.a-btn.primary{
  border: 0;
  background: linear-gradient(135deg, var(--ok), #16a34a);
  color: rgba(0,0,0,0.85);
  box-shadow: 0 14px 28px rgba(34,197,94,0.18);
}

.a-btn.ig{
  border: 0;
  background: linear-gradient(135deg, var(--ig-2), var(--ig-3), var(--ig-4));
  box-shadow: 0 14px 28px rgba(214,41,118,0.14);
}

.error{
  border-radius: var(--radius-sm);
  border: 1px solid rgba(239,68,68,0.35);
  background: rgba(239,68,68,0.10);
  padding: 12px;
  color: rgba(255,255,255,0.92);
  font-size: 13px;
}

/* Note box */
.note{
  margin-top: 14px;
  padding: 12px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(250,126,30,0.25);
  background: rgba(250,126,30,0.08);
  color: rgba(255,255,255,0.88);
  font-size: 12.5px;
}

/* =========================================================
   Features
   ========================================================= */

.features{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 14px;
}

@media (min-width: 720px){
  .features{
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature{
  padding: 14px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
}
.feature-ico{
  font-size: 20px;
  margin-bottom: 8px;
}
.feature h3{
  margin: 0 0 6px;
  font-size: 15px;
}
.feature p{
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

/* Steps */
.steps{
  margin: 10px 0 0;
  padding-left: 18px;
  color: rgba(255,255,255,0.88);
}
.steps li{
  margin: 8px 0;
}
.steps strong{
  color: rgba(255,255,255,0.95);
}

/* FAQ details */
details.faq{
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.18);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-top: 10px;
}
details.faq summary{
  cursor: pointer;
  font-weight: 700;
  font-size: 13.5px;
  color: rgba(255,255,255,0.92);
  list-style: none;
}
details.faq summary::-webkit-details-marker{ display:none; }
details.faq p{
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

/* =========================================================
   Ads: placeholders (top/middle/bottom/side/sticky)
   ========================================================= */

.ad-wrap{
  width: 100%;
  margin: 14px 0;
}

.ad-box{
  border-radius: var(--radius);
  border: 1px dashed rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.03);
  padding: 14px;
  position: relative;
  overflow: hidden;
}

.ad-box.compact{
  padding: 12px;
  border-radius: var(--radius-sm);
}

.ad-box.tall{
  min-height: 320px;
}

.ad-label{
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 11px;
  letter-spacing: 0.6px;
  font-weight: 700;
  color: rgba(255,255,255,0.62);
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.10);
  padding: 4px 8px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

.ad-placeholder{
  min-height: 78px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  color: rgba(255,255,255,0.70);
}

.ad-placeholder span{
  font-weight: 700;
  font-size: 12.5px;
}
.ad-placeholder small{
  font-size: 11.5px;
  color: rgba(255,255,255,0.55);
}

/* top ad spacing; keep it simple */
.ad-top{ margin-top: 8px; }
.ad-bottom{ margin-bottom: 20px; }

/* desktop sidebar ad */
.ad-side .ad-box.tall .ad-placeholder{
  min-height: 520px;
}

/* Mobile sticky ad */
.ad-sticky{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 12px;
  z-index: 50;
  background: linear-gradient(180deg, rgba(11,11,16,0), rgba(11,11,16,0.75) 55%, rgba(11,11,16,0.90));
  backdrop-filter: blur(8px);
}

.ad-box.sticky{
  border-radius: 14px;
  padding: 10px 12px;
}

@media (min-width: 900px){
  .ad-sticky{ display: none; }
}

/* =========================================================
   Footer
   ========================================================= */

.footer{
  margin-top: 22px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.footer-inner{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 720px){
  .footer-inner{
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.footer-brand{
  font-weight: 800;
  letter-spacing: -0.3px;
}

.footer-links{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-links a{
  color: rgba(255,255,255,0.78);
  font-size: 13px;
  border: 1px solid var(--border);
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
}
.footer-links a:hover{
  text-decoration: none;
  border-color: var(--border-2);
  background: rgba(255,255,255,0.06);
}

.muted{
  color: var(--muted);
}
.footer-left p{
  margin: 6px 0 0;
  font-size: 13px;
}

/* =========================================================
   Legal pages (privacy/terms)
   ========================================================= */

.legal{
  margin-top: 18px;
}

.legal h1{
  margin: 0 0 8px;
  font-size: 26px;
  letter-spacing: -0.6px;
  line-height: 1.15;
}

.legal p{
  margin: 10px 0;
  color: rgba(255,255,255,0.88);
}

.legal .muted{
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.legal h2{
  margin-top: 18px;
  font-size: 17px;
  letter-spacing: -0.2px;
}

.legal ul{
  margin: 10px 0 0;
  padding-left: 18px;
  color: rgba(255,255,255,0.88);
}

.legal li{
  margin: 8px 0;
  color: rgba(255,255,255,0.86);
}

.legal .note{
  margin-top: 18px;
}

/* =========================================================
   Small screens polish
   ========================================================= */

@media (max-width: 420px){
  .logo-text{ font-size: 20px; }
  .tagline{ font-size: 12.5px; }
  .h1{ font-size: 24px; }
  .hero{ padding: 16px 14px; }
  input[type="url"], input[type="text"], #downloadBtn{ height: 46px; }
}

/* =========================================================
   Reduced motion
   ========================================================= */

@media (prefers-reduced-motion: reduce){
  *{ scroll-behavior: auto !important; }
  .spinner{ animation: none; }
  #downloadBtn{ transition: none; }
}
