/* ==========================================================
   MarvelCDB Deck Printer — index.css (Heroic Metallic)
   - Sophisticated "metallic hero" backdrop
   - Bright, legible panels
   - Simple, low-friction UI (same markup/classes)
   ========================================================== */

/* Global font stack + shared tokens */
:root {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  /* Heroic Metallic palette */
  --bg0: #070913;
  --bg1: #0b1230;
  --bg2: #1a2a66;

  --ink: #0e1116;
  --muted: #6b7280;

  --panel: rgba(255, 255, 255, 0.92);
  --panel-border: rgba(255, 255, 255, 0.22);

  --field-bg: rgba(255, 255, 255, 0.96);
  --field-border: rgba(0, 0, 0, 0.14);

  --btn-bg: rgba(255, 255, 255, 0.92);
  --btn-border: rgba(0, 0, 0, 0.14);

  --primary0: #2f5eea;
  --primary1: #2346b6;

  --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 14px 36px rgba(0, 0, 0, 0.26);

  
}

/* Page */
body {
  margin: 0;
  padding: 28px;
  color: #eef2ff;

  /* Heroic Metallic backdrop (non-repeating, responsive) */
  background:
    radial-gradient(1100px 720px at 18% 16%, rgba(118, 84, 255, 0.42), rgba(0, 0, 0, 0) 62%),
    radial-gradient(900px 560px at 84% 22%, rgba(53, 120, 255, 0.34), rgba(0, 0, 0, 0) 64%),
    radial-gradient(1000px 760px at 55% 120%, rgba(255, 255, 255, 0.12), rgba(0, 0, 0, 0) 58%),
    /* subtle metallic sweep */
    linear-gradient(135deg, rgba(255,255,255,0) 0 34%, rgba(255,255,255,0.10) 44%, rgba(255,255,255,0) 58%),
    linear-gradient(180deg, var(--bg1), var(--bg0));
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
}

/* Container width so it doesn't stretch on large screens */
.wrap { max-width: 900px; margin: 0 auto; }

/* Headings */
h1 {
  margin: 0 0 10px;
  font-size: 36px;
  letter-spacing: 0.2px;
  color: #f5f7ff;
  text-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.subtitle {
  margin: 0 0 18px;
  color: rgba(245, 247, 255, 0.78);
}

/* Input row layout */
.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* Fields */
input[type="url"]{
  flex: 1;
  min-width: 320px;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid var(--field-border);
  background: var(--field-bg);
  color: var(--ink);
  outline: none;
  box-shadow: 0 10px 28px rgba(0,0,0,0.10);
}

input[type="url"]:focus {
  border-color: rgba(47, 94, 234, 0.55);
  box-shadow: 0 0 0 4px rgba(47, 94, 234, 0.18), 0 10px 28px rgba(0,0,0,0.10);
}

/* Buttons (shared) */
button{
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0,0,0,0.12);
}

button:hover {
  background: rgba(255,255,255,0.98);
  border-color: rgba(0, 0, 0, 0.20);
  transform: translateY(-0.5px);
  box-shadow: 0 14px 34px rgba(0,0,0,0.16);
}

button:active {
  transform: translateY(0px);
}

/* Primary CTA (Continue) — uses existing button element on index page */
#continueBtn{
  border: 1px solid rgba(255,255,255,0.18);
  background: linear-gradient(180deg, rgba(47,94,234,0.92), rgba(35,70,182,0.92));
  color: #fff;
  box-shadow: 0 18px 46px rgba(0,0,0,0.28);
}

#continueBtn:hover {
  background: linear-gradient(180deg, rgba(59,108,255,0.95), rgba(43,82,205,0.95));
  border-color: rgba(255,255,255,0.22);
}

/* Saved list container */
.list {
  margin-top: 18px;
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
}

/* One saved URL row */
.item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.92);
  border-top: 1px solid rgba(0,0,0,0.06);
}
.item:first-child { border-top: 0; }

.url { word-break: break-all; color: #1b3a8a; }
.muted { color: var(--muted); font-size: 12px; }

/* Error/status message area. min-height prevents layout jumping. */
.danger { color: #ff708a; font-size: 12px; margin-top: 10px; min-height: 1em; }

/* Footer row */
.footer {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* Small-screen breathing room */
/* Mobile layout */
@media (max-width: 520px) {
  body { padding: 18px; }

  h1 {
    font-size: 26px;     /* big, but not ridiculous */
    line-height: 1.05;
    margin-bottom: 12px;
    text-align: center;
  }

  .subtitle {
    font-size: 16px;
    line-height: 1.35;
    margin-bottom: 16px;
    text-align: center;
  }

  /* Stack input + buttons cleanly */
  .row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  input[type="url"]{
    min-width: 0;        /* remove the constraint that causes overflow/odd wrapping */
    width: 100%;
  }

  /* Make Add/Clear full width and consistent */
  .row button {
    width: 100%;
    justify-content: center;
  }

  /* Saved list rows: allow wrapping so Remove doesn’t squash layout */
  .item {
    align-items: center;
    gap: 10px;
  }

  .url {
    display: block;
    width: 100%;
  }

  .item button {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  /* Footer CTA full width */
  #continueBtn {
    width: 100%;
  }

  /* Disclaimer spacing so it doesn’t feel “below the fold forever” */
  .disclaimer {
    margin-top: 28px;
  }

  /* Allow flex children to shrink instead of overflowing */
  .row { min-width: 0; }
  .row > * { min-width: 0; }

  /* Ensure the input can actually shrink inside flex */
  #deckUrl {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
}

/* Brand link in title */
.brand-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.35);
}
.brand-link:hover {
  border-bottom-color: rgba(255,255,255,0.65);
}

/* Heartfelt disclaimer */
.disclaimer {
  margin-top: 6em;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--panel-border);
  background: rgba(255,255,255,0.10);
  color: rgba(245, 247, 255, 0.82);
  box-shadow: 0 14px 36px rgba(0,0,0,0.22);
  backdrop-filter: blur(10px);
  font-size: 13px;
  line-height: 1.45;
}