/* ── Scribd Downloader – Style ─────────────────────────────────────────────── */

:root {
  --bg:          #07111f;
  --primary:     #4f8cff;
  --primary-dim: rgba(79,140,255,0.22);
  --purple:      #6d5efc;
  --text:        #ecf3ff;
  --muted:       #9eb0cf;
  --line:        rgba(255,255,255,0.13);
  --card:        rgba(11,19,35,0.88);
  --hero-muted:  #c7dcff;
  --input-bg:    rgba(255,255,255,0.055);
  --input-bd:    rgba(255,255,255,0.15);
  --shadow:      0 22px 70px rgba(0,0,0,0.38);
  --r-xl:        26px;
  --r-lg:        18px;
  --r-md:        13px;
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

html { scroll-behavior:smooth; }

body {
  font-family: Inter, system-ui, Arial, sans-serif;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 12% 0%,  rgba(79,140,255,0.2)  0%, transparent 38%),
    radial-gradient(ellipse at 88% 0%,  rgba(109,94,252,0.17) 0%, transparent 32%),
    radial-gradient(ellipse at 50% 80%, rgba(30,50,110,0.25)  0%, transparent 50%),
    linear-gradient(180deg, #07111f 0%, #080f1c 100%);
  color: var(--text);
  line-height: 1.65;
}

.container {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
}

/* ── topbar ── */
.scribd-page .site-topbar { margin-bottom: 20px; }

/* ══════════════════════════════════════════════════════════════════════════════
   HERO
══════════════════════════════════════════════════════════════════════════════ */

.hero {
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(ellipse at 10% 0%, rgba(79,140,255,0.18) 0%, transparent 38%),
    radial-gradient(ellipse at 90% 0%, rgba(109,94,252,0.15) 0%, transparent 32%),
    linear-gradient(180deg, rgba(14,24,44,0.92) 0%, rgba(8,15,30,0.95) 100%);
  box-shadow: var(--shadow);
  padding: 56px 0 48px;
  backdrop-filter: blur(20px);
  overflow: hidden;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items: center;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(79,140,255,0.15);
  border: 1px solid rgba(79,140,255,0.35);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .03em;
  margin-bottom: 20px;
  color: #b8d4ff;
}

.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4f8cff;
  box-shadow: 0 0 8px #4f8cff;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:.6; transform:scale(0.8); }
}

.hero h1 {
  font-size: clamp(26px,3.8vw,50px);
  line-height: 1.1;
  letter-spacing: -.025em;
  margin-bottom: 18px;
  color: #f0f6ff;
}

.hero-text {
  font-size: 17px;
  color: var(--hero-muted);
  margin-bottom: 28px;
  max-width: 560px;
}

/* ══════════════════════════════════════════════════════════════════════════════
   3D DOCUMENT SCENE
══════════════════════════════════════════════════════════════════════════════ */

.scene-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 300px;
}

.scene {
  perspective: 900px;
  perspective-origin: 50% 40%;
  width: 220px;
  height: 280px;
}

.doc-stack {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: docFloat 9s ease-in-out infinite;
}

@keyframes docFloat {
  0%,100% { transform: rotateX(16deg) rotateY(-22deg); }
  33%     { transform: rotateX(12deg) rotateY(-17deg) translateY(-10px); }
  66%     { transform: rotateX(19deg) rotateY(-25deg) translateY(-5px); }
}

.doc-sheet {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  border: 1px solid rgba(79,140,255,0.28);
}

.doc-sheet:nth-child(1) {
  background: linear-gradient(145deg, rgba(23,40,75,0.95), rgba(14,26,55,0.97));
  box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(79,140,255,0.15);
  transform: translateZ(0px);
  z-index: 3;
}

.doc-sheet:nth-child(2) {
  background: linear-gradient(145deg, rgba(19,34,64,0.9), rgba(12,22,48,0.92));
  transform: translateZ(-14px) rotate(4deg);
  z-index: 2;
  opacity: .85;
}

.doc-sheet:nth-child(3) {
  background: linear-gradient(145deg, rgba(15,28,54,0.85), rgba(10,18,42,0.88));
  transform: translateZ(-28px) rotate(8deg);
  z-index: 1;
  opacity: .65;
}

/* lines on the top sheet */
.doc-sheet:nth-child(1)::before {
  content: '';
  position: absolute;
  inset: 24px 20px;
  background: repeating-linear-gradient(
    to bottom,
    rgba(79,140,255,0.12) 0px,
    rgba(79,140,255,0.12) 1px,
    transparent 1px,
    transparent 16px
  );
  border-radius: 4px;
}

.doc-sheet:nth-child(1)::after {
  content: '';
  position: absolute;
  top: 20px; left: 20px;
  width: 60%; height: 8px;
  background: rgba(79,140,255,0.28);
  border-radius: 4px;
}

/* ══════════════════════════════════════════════════════════════════════════════
   FORM CARD (glassmorphism)
══════════════════════════════════════════════════════════════════════════════ */

.form-card {
  background: rgba(11,20,38,0.8);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 28px;
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
}

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--hero-muted);
  margin-bottom: 10px;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.input-row {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}

.url-input {
  flex: 1;
  min-height: 56px;
  padding: 0 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--input-bd);
  background: var(--input-bg);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.url-input::placeholder { color: #607290; }

.url-input:focus {
  border-color: rgba(79,140,255,.7);
  box-shadow: 0 0 0 4px rgba(79,140,255,.12);
}

.submit-btn {
  min-height: 56px;
  padding: 0 26px;
  border-radius: var(--r-md);
  border: 1px solid rgba(79,140,255,.25);
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .15s, box-shadow .2s, opacity .15s;
}

.submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(79,140,255,.3);
}

.submit-btn:active:not(:disabled) { transform: translateY(0); }

.submit-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

/* Checkbox */
.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 6px;
}

.consent-row input[type=checkbox] {
  margin-top: 3px;
  width: 16px; height: 16px;
  accent-color: var(--primary);
  flex-shrink: 0;
  cursor: pointer;
}

.consent-row label {
  font-size: 13px;
  color: var(--hero-muted);
  cursor: pointer;
  line-height: 1.5;
}

/* Helper text */
.field-hint {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
}

/* ── Mesaj alanı ── */
.msg-box {
  display: none;
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: var(--r-md);
  font-size: 14px;
  line-height: 1.55;
}

.msg-box.info  { background:rgba(79,140,255,.12); border:1px solid rgba(79,140,255,.25); color:#c0d8ff; }
.msg-box.error { background:rgba(239,68,68,.14);  border:1px solid rgba(254,202,202,.2); color:#ffe5ea; }

.msg-box[aria-live] { display: block; }

/* ══════════════════════════════════════════════════════════════════════════════
   PROGRESS AREA
══════════════════════════════════════════════════════════════════════════════ */

.progress-area {
  display: none;
  margin-top: 22px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.progress-stage-name {
  font-size: 14px;
  font-weight: 600;
  color: #c0d8ff;
}

.progress-pct {
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* 3D capsule */
.capsule-wrap {
  position: relative;
  height: 26px;
  border-radius: 13px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(79,140,255,.25);
  box-shadow:
    inset 0 4px 10px rgba(0,0,0,.35),
    inset 0 -1px 0 rgba(255,255,255,.04),
    0 2px 0 rgba(255,255,255,.04);
  overflow: hidden;
}

.capsule-fill {
  height: 100%;
  border-radius: 13px;
  background: linear-gradient(90deg, #3a72e8, #6d5efc 60%, #8b72ff);
  box-shadow:
    0 4px 16px rgba(79,140,255,.45),
    inset 0 1px 0 rgba(255,255,255,.18);
  transition: width .55s cubic-bezier(.4,0,.2,1);
  position: relative;
  overflow: hidden;
  will-change: width;
}

.capsule-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,255,255,.22) 50%,
    transparent 100%
  );
  transform: translateX(-100%);
  animation: shimmer 1.6s ease-in-out infinite;
}

@keyframes shimmer { to { transform: translateX(200%); } }

@media (prefers-reduced-motion: reduce) {
  .doc-stack { animation: none; }
  .capsule-fill::after { animation: none; }
  .badge-dot { animation: none; }
}

/* Stage steps */
.stage-steps {
  display: grid;
  grid-template-columns: repeat(6,1fr);
  gap: 6px;
  margin-top: 16px;
}

.stage-dot {
  text-align: center;
}

.stage-dot-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  margin: 0 auto 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: background .3s, border-color .3s;
}

.stage-dot.active .stage-dot-icon {
  background: rgba(79,140,255,.2);
  border-color: var(--primary);
}

.stage-dot.done .stage-dot-icon {
  background: rgba(35,196,131,.18);
  border-color: #23c483;
  color: #23c483;
}

.stage-dot-label {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.3;
}

.stage-dot.active .stage-dot-label { color: #93c5fd; }
.stage-dot.done .stage-dot-label   { color: #23c483; }

/* ══════════════════════════════════════════════════════════════════════════════
   SONUÇ ALANI
══════════════════════════════════════════════════════════════════════════════ */

.result-area {
  display: none;
  margin-top: 22px;
  padding: 20px;
  border-radius: var(--r-lg);
  border: 1px solid rgba(35,196,131,.3);
  background: rgba(35,196,131,.07);
}

.result-area.failed {
  border-color: rgba(239,68,68,.3);
  background: rgba(239,68,68,.06);
}

.result-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 10px;
  color: #23c483;
}

.result-area.failed .result-title { color: #ff6b6b; }

.result-meta {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.55;
}

.dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, #23c483, #1db070);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: transform .15s, box-shadow .2s;
}

.dl-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(35,196,131,.35);
}

/* ══════════════════════════════════════════════════════════════════════════════
   SECTION / INFO PANELS
══════════════════════════════════════════════════════════════════════════════ */

.section { padding: 64px 0; }

.info-panel {
  background: rgba(10,18,34,.65);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 44px;
  backdrop-filter: blur(16px);
}

.info-panel h2 { font-size: 24px; margin-bottom: 14px; color: #d6e8ff; }
.info-panel p  { font-size: 15px; color: var(--muted); line-height: 1.7; }
.info-panel p + p { margin-top: 10px; }

.legal-box {
  margin-top: 22px;
  padding: 18px 20px;
  border-radius: var(--r-lg);
  border: 1px solid rgba(250,200,60,.25);
  background: rgba(250,200,60,.06);
  font-size: 14px;
  color: #e8d68a;
  line-height: 1.6;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px,1fr));
  gap: 14px;
  margin-top: 22px;
}

.link-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  text-decoration: none;
  color: var(--text);
  transition: border-color .2s, transform .2s;
}

.link-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.link-card strong { font-size: 14px; }
.link-card span   { font-size: 12px; color: var(--muted); }

/* ══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════════════════════ */

@media (max-width:860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .scene-wrap { height: 220px; }
  .doc-stack { transform-style: preserve-3d; animation: none; }
  .doc-sheet:nth-child(2), .doc-sheet:nth-child(3) { display: none; }
  .doc-sheet:nth-child(1) { position: relative; height: 200px; width: 170px; margin: 0 auto; }

  .stage-steps { grid-template-columns: repeat(3,1fr); }
  .info-panel { padding: 26px 20px; }
}

@media (max-width:540px) {
  .input-row { flex-direction: column; }
  .stage-steps { grid-template-columns: repeat(2,1fr); }
}
