/* EnigmaHamster shared styles - v12.6 */
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@500;700;800&family=Quicksand:wght@700&display=swap');

:root {
  --navy1: #06102a;
  --navy2: #0b1430;
  --text: #EAF0FF;
  --ink: #cfd7ff;
  --pink: #EE78D1;
  --field-bg: rgba(255,255,255,0.06);
  --field-bg-dark: rgba(0,0,0,0.35);
  --field-border: rgba(255,255,255,0.18);
  --field-border-strong: rgba(255,255,255,0.28);
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
  --banner-notice: "© EnigmaHamster 2025 · Hammy\2122 · EnigmaHamster\2122";
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }

body {
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 50% 10%, rgba(255,255,255,0.06), transparent 60%),
    linear-gradient(180deg, var(--navy2), var(--navy1));
  font-family: 'Raleway', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  min-height: 100vh;
}

/* stars overlay */
body::before { content: ""; position: fixed; inset: 0; background-image: url('assets/stars_seamless.svg'); background-size: 360px 360px; background-repeat: repeat; opacity: .22; pointer-events: none; z-index: -1; }

/* header + nav */
header { position: sticky; top: 0; z-index: 10; background: linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0)); backdrop-filter: blur(6px); }
nav { display: flex; justify-content: center; gap: clamp(18px,5vw,48px); flex-wrap: wrap; padding: 12px 16px 22px; border-bottom: 1px solid rgba(255,255,255,.10); }
nav a { text-decoration: none; color: var(--ink); font-weight: 800; font-size: clamp(18px,2.4vw,28px); transition: transform .12s ease, color .12s ease; }
nav a:hover { transform: translateY(-2px); color: var(--pink); }
nav a.active { color: var(--pink); }

/* mini Hammy icon next to Downloads */
nav a .nav-hammy {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: -4px;
  display: inline-block;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* Downloads / Freebies cards */
.download-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 12px 0 32px;
}
.download-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease;
}
.download-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0,0,0,0.35);
  border-color: var(--pink);
}
.download-card img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(0,0,0,0.2);
  object-fit: cover;
}
.download-card small { display:block; color: var(--ink); font-weight: 500; }

/* hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid rgba(255,255,255,.08); }
.hero img { width: 100%; height: auto; object-fit: cover; }
.hero .overlay { position: absolute; inset: 0; display: grid; place-items: end center; padding: 18px 16px 22px; text-align: center; }
.hero::after { content: var(--banner-notice); position: absolute; right: 20px; bottom: 16px; font-family: 'Raleway', sans-serif; font-weight: 600; font-size: clamp(10px,1.2vw,14px); color: rgba(255,255,255,0.9); text-shadow: 0 1px 2px rgba(0,0,0,0.25); pointer-events: none; z-index: 2; }
.hero.pill::after { background: rgba(0,0,0,0.22); padding: 4px 8px; border-radius: 8px; }

.title {
  display: inline-grid;
  grid-auto-rows: min-content;
  gap: 4px;
  padding: 8px 12px;
  border-radius: 12px;
  backdrop-filter: blur(3px);
  text-align: center;
}
.title-brand {
  font-family: 'Raleway', sans-serif;
  font-weight: 800;
  font-size: clamp(22px, 4vw, 42px);
  color: #ffffff;
  text-shadow: 0 2px 14px rgba(0,0,0,.45);
}
.title-tagline {
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: clamp(14px, 2.6vw, 26px); /* a bit smaller than brand */
  color: #a966cc; /* deep purple */
  text-shadow: 0 2px 10px rgba(0,0,0,.35);
}

/* mast avatar */
.mast { text-align: center; padding: 16px 16px 6px; }
.avatar { width: clamp(140px, 18vw, 180px); height: clamp(140px, 18vw, 180px); margin: 0 auto 8px; border-radius: 50%; border: 3px solid rgba(255,255,255,.9); box-shadow: 0 8px 26px rgba(0,0,0,.35); overflow: hidden; background: #0b1430; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.star { width: 28px; height: 28px; margin: 8px auto 0; background: var(--pink); clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); filter: drop-shadow(0 2px 0 rgba(0,0,0,.25)); }

/* content */
main { max-width: 1100px; margin: 0 auto; padding: 20px 16px 80px; }
h1,h2 { color: #ffffff; }
p { color: var(--ink); line-height: 1.7; }
.cta { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); text-decoration: none; color: #fff; background: rgba(255,255,255,.06); }

/* Links page */
.link-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 12px 0 32px; }
.link-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid rgba(255,255,255,0.14); border-radius: 14px; background: rgba(255,255,255,0.06); color: #fff; text-decoration: none; font-weight: 700; transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease; }
.link-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,0.35); border-color: var(--pink); }
.link-icon-img { width: 26px; height: 26px; border-radius: 6px; }

/* form */
.form-card { background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.14); border-radius: 18px; padding: 18px; box-shadow: var(--shadow); }
.form-grid { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.form-grid .full { grid-column: 1 / -1; }
label { font-size: 14px; color: #e6e9ff; display: block; margin-bottom: 6px; }
input[type="text"], input[type="email"], textarea { width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--field-border); background: rgba(255,255,255,0.06); color: #ffffff; outline: none; transition: border .15s ease, background .15s ease, box-shadow .15s ease; }
input::placeholder, textarea::placeholder { color: #b8c2ff; opacity: .7; }
input:focus, textarea:focus { border-color: #EE78D1; background: rgba(255,255,255,0.10); box-shadow: 0 0 0 3px rgba(238,120,209,0.35); }
textarea { min-height: 140px; resize: vertical; }
form button[type="submit"], form input[type="submit"] { display: inline-block; margin-top: 10px; padding: 12px 20px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.06)); color: #fff; font-family: 'Raleway', sans-serif; font-weight: 700; font-size: 15px; cursor: pointer; letter-spacing: 0.3px; transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease, color .15s ease; }
form button[type="submit"]:hover, form input[type="submit"]:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,.35); background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.09)); border-color: #EE78D1; color: #EE78D1; }

/* footer */
footer { text-align: center; padding: 30px 12px 60px; opacity: .8; font-size: 14px; color: var(--ink); border-top: 1px solid rgba(255,255,255,0.08); }

/* mobile */
@media (max-width: 600px) {
  .hero::after { right: 50%; transform: translateX(50%); text-align: center; font-size: 12px; }
  footer { font-size: 12px; padding: 20px 12px 40px; }
  nav a { font-size: 18px; }
  .form-grid { grid-template-columns: 1fr; }
}


/* doodle icons */
.nav-doodle { width: 20px; height: 20px; margin-right: 6px; vertical-align: -3px; display: inline-block; }
.download-card .doodle { width: 28px; height: 28px; border-radius: 6px; }


/* === Mobile polish (v12.7.5 quick fix) === */
@media (max-width: 480px) {
  nav { gap: 16px; padding: 10px 12px 16px; }
  .nav-hammy { width: 18px; height: 18px; margin-right: 6px; }
  .nav-doodle { width: 18px; height: 18px; margin-right: 6px; }
  nav a { font-size: 17px; }

  .hero::after {
    right: 50%;
    transform: translateX(50%);
    bottom: 8px;
    font-size: 10px;
    background: rgba(0,0,0,0.35);
    padding: 3px 6px;
    border-radius: 6px;
  }

  .title { gap: 2px; padding: 6px 8px; }
  .title-brand { font-size: clamp(18px, 6vw, 28px); }
  .title-tagline { font-size: clamp(12px, 4.2vw, 18px); }

  .avatar {
    width: 120px; height: 120px;
    border-width: 2px;
  }
  .star { width: 22px; height: 22px; }
}

@media (max-width: 360px) {
  nav { gap: 12px; }
  nav a { font-size: 16px; }
  .title-brand { font-size: 20px; }
  .title-tagline { font-size: 13px; }
  .hero::after { font-size: 9px; padding: 2px 5px; }
  .avatar { width: 108px; height: 108px; }
}


/* === Mobile hero fix (v12.7.6) === */
@media (max-width: 480px) {
  .hero { min-height: 230px; }
  .hero img {
    width: 100%;
    height: 230px;
    object-fit: cover;
    object-position: center 40%;
  }
  .hero .overlay { padding: 10px 12px 28px; }
  .title { gap: 2px; padding: 6px 8px; }
  .title-brand   { font-size: clamp(18px, 5.6vw, 26px); line-height: 1.05; }
  .title-tagline { font-size: clamp(12px, 4.0vw, 16px); line-height: 1.05; }
  .hero::after { display: none; }
  .avatar { width: 104px; height: 104px; border-width: 2px; }
  .star { width: 20px; height: 20px; }
}
@media (max-width: 360px) {
  .hero { min-height: 210px; }
  .hero img { height: 210px; object-position: center 38%; }
  .title-brand { font-size: 20px; }
  .title-tagline { font-size: 13px; }
}


/* === Mobile hero tweak (v12.7.8) === */
@media (max-width: 480px) {
  .hero { min-height: 280px; }
  .hero img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    object-position: center 55%;
  }
  .hero .overlay { padding: 8px 12px 22px; }
  .title-brand   { font-size: clamp(18px, 5.2vw, 24px); }
  .title-tagline { font-size: clamp(12px, 3.8vw, 15px); }
}
@media (max-width: 360px) {
  .hero { min-height: 260px; }
  .hero img { height: 260px; object-position: center 58%; }
}


/* === Mobile hero corrective tweak (v12.7.9) === */
/* Show more of the bottom of the banner by shifting the crop upward */
@media (max-width: 480px) {
  .hero { min-height: 240px !important; }
  .hero img {
    height: 240px !important;
    object-position: center 32% !important; /* move focus upward -> reveals more bottom */
  }
}
@media (max-width: 360px) {
  .hero { min-height: 220px !important; }
  .hero img { height: 220px !important; object-position: center 30% !important; }
}


/* === Mobile hero fine-tune (v12.7.10) === */
@media (max-width: 480px) {
  .hero { min-height: 240px !important; }
  .hero img {
    height: 240px !important;
    object-fit: cover !important;
    object-position: center 26% !important; /* shift focus further up => reveals more bottom */
  }
  .hero .overlay { padding: 8px 12px 18px !important; }
  .title-brand   { font-size: clamp(18px, 5.0vw, 23px) !important; }
  .title-tagline { font-size: clamp(12px, 3.6vw, 14px) !important; }
}
@media (max-width: 360px) {
  .hero { min-height: 220px !important; }
  .hero img { height: 220px !important; object-position: center 24% !important; }
}


/* === Mobile-specific banner (v12.7.11) === */
@media (max-width: 480px) {
  .hero img {
    content: url("assets/banner_mobile.png");
    height: auto !important;
    object-fit: contain !important;
  }
}


/* Centered page title beneath banner */
.page-title { text-align: center; padding: 10px 16px 0; }
.page-title .title { display: inline-grid; gap: 4px; }

/* Keep banner copyright on desktop, hide on phones (footer has it) */
@media (max-width: 480px) {
  .hero::after { display: none; }
}


/* Amazon icon (pink tile + white logo) */
.link-card .link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 12px;
  background: #EE78D1;
  box-shadow: 0 1px 0 rgba(255,255,255,0.05) inset, 0 8px 16px rgba(0,0,0,0.25);
  margin-right: 14px;
}
.link-card .link-icon img {
  width: 30px; height: 30px; display: block;
}

/* --- Hammy Links fix (2025-09-13) --- */
/* Make the Amazon icon tile match the other icons (26x26) */
.link-card .link-icon{
  width:26px; height:26px; flex:0 0 26px; border-radius:6px;
}
.link-card .link-icon img{ width:18px; height:18px; display:block; }

/* Equal-height link tiles + prevent label wrap */
.link-card{ min-height:56px; }
.link-card .link-text,
.link-card .label{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* Failsafe: hide instructional box in Originals when empty */
#grid-originals .error-box{ display:none !important; }

/* Stronger failsafe to hide instructional box on Originals tab when empty */
#tab-originals .error-box { display: none !important; }
#grid-originals .error-box { display: none !important; }
