/* app.css */

/* === GLOBAL RESET & BASE === */
html,
body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, sans-serif;
  background: radial-gradient(ellipse at 60% 0%, #0f243a 0%, #17182b 80%, #191929 100%);
  /* no longer force 100vh / 100% height: */
  height: auto;
  min-height: auto;
  width: 100%;
  overflow-x: hidden;
  /* only scroll vertically when content truly overflows: */
  overflow-y: auto;.brand-logo svg {
  width: 32px;
  height: 32px;
}

  box-sizing: border-box;
}

/* Prevent scroll bugs with SvelteKit layout */
#svelte,
body > #svelte,
body > #svelte > div {
  min-height: 100%;
  height: 100%;
  width: 100%;
  box-sizing: border-box;
}

/* === NAVBAR === */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 62px;
  display: flex;
  align-items: center;
  background: #191929;
  padding: 0 36px;
  z-index: 99;
  border-bottom: 1.5px solid transparent;
}
.navbar::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0;
  width: 200%; height: 2px;
  background: linear-gradient(120deg, transparent, #25dbc3, transparent);
  animation: shine 8s linear infinite;
  opacity: 0.7;
  transform: translateX(-100%);
}
@keyframes shine {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Brand / Logo */
.brand {
  display: flex;
  align-items: center;
  font-size: 1.34rem;
  font-weight: 800;
  color: #f3f8fa;
  gap: 0.7em;
  user-select: none;
}
.brand-logo {
  background: #1c2e3b;
  border-radius: 8px;
  padding: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.2s;
}
.brand-logo:hover {
  transform: scale(1.08);
}
.brand-logo svg {
  width: 32px;
  height: 32px;
  transition: transform 0.3s ease, filter 0.3s ease;
}
.brand-logo:hover svg {
  transform: scale(1.1) rotate(2deg);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* Nav links */
.nav-links {
  display: flex;
  gap: 1.8rem;
  margin-left: 2rem;
}
.menu-item {
  position: relative;
}
.menu-item a {
  color: #dbeafe;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.07rem;
  padding: 8px 10px;
  border-radius: 6px;
  transition: color 0.2s;
}
.menu-item a:hover {
  color: #ffffff;
}
/* Dropdowns */
.menu-item.has-dropdown:hover .dropdown,
.menu-item.has-dropdown:focus-within .dropdown {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.menu-item.has-dropdown .dropdown {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%; left: 0;
  background: #1c2e3b;
  border: 1px solid #293a46;
  border-radius: 8px;
  padding: 10px 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  min-width: 200px;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  z-index: 100;
}
.dropdown a {
  color: #f3f8fa;
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.2s, color 0.2s;
}
.dropdown a:hover {
  background: rgba(255,255,255,0.05);
  color: #ffffff;
}
.dropdown-icon svg {
  width: 20px; height: 20px; fill: #fff;
}

/* Spacer pushes Login to the right */
.nav-spacer {
  flex: 1;
}

/* === FILTERS (centered in navbar) === */
.navbar .nav-filters {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  height: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 100;
}
.type-btn-row {
  display: flex; gap: 5px;
}
.type-btn {
  background: #151728;
  color: #e7eaf4;
  border: 1.5px solid #393e59;
  border-radius: 7px;
  padding: 6px 13px;
  font-weight: 500;
  font-size: 0.97rem;
  cursor: pointer;
  transition: all 0.2s;
}
.type-btn.selected,
.type-btn:hover {
  background: #222339;
  border-color: #ffe087;
  color: #ffe087;
}
.inline-search {
  background: #181a29;
  border: 1.2px solid #32384d;
  border-radius: 7px;
  padding: 7px 12px;
  color: #e6eaff;
  font-size: 0.97rem;
  width: 180px;
  transition: border-color 0.2s;
}
.inline-search:focus {
  border-color: #ffe087;
}

/* === LOGIN LINK === */
.login-link {
  /* existing styles */
  margin-left: 1rem;
  color: #ffe087;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 12px;
  border: 1.5px solid #ffe087;
  border-radius: 6px;
  background: transparent;      /* reset default button bg */
  appearance: none;             /* remove OS-specific styling */
  cursor: pointer;              /* pointer on hover */
  transition: background 0.2s, color 0.2s;

  /* new additions: */
  font: inherit;                /* match parent font-size/line-height */
  line-height: inherit;
  display: inline-flex;         /* behave like an inline <a> */
  align-items: center;          /* vertically center text */
  justify-content: center;
}
.login-link:hover {
  background: #ffe087;
  color: #191929;
}

/* === DATASETS PAGE LAYOUT === */
.page-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* account for fixed navbar height */
  padding-top: 62px;
  width: 100%;
  /* let it grow naturally instead of forcing 100vh: */
  min-height: auto;
  background: radial-gradient(ellipse at 60% 0%, #0f243a 0%, #17182b 80%, #191929 100%);
}
.main-content {
  display: flex;
  flex-direction: column;
  /* standard padding / max-width */
  padding: 38px 16px;
  width: 100%;
  max-width: 1400px;
  box-sizing: border-box;
  /* flex only if needed, otherwise size to its children */
  flex: 1 0 auto;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 18px;
  width: 100%;
}
.subtitle {
  color: #9aa5cf;
  font-size: 1.11rem;
}
.results-count {
  background: #23253a;
  color: #ffe087;
  padding: 5px 14px;
  border-radius: 15px;
  font-weight: 600;
}

/* === CARD GRID === */
.card-grid-wrapper {
  width: 100%;
  /* cards can scroll here if there are many */
  overflow-y: auto;
  /* remove any flex:1 so grid sizing is natural */
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
  padding: 40px 0;
  max-width: 100%;        /* REMOVE max-width or set to 100% */
  margin-left: 0;         /* Remove centering */
  margin-right: 0;
  justify-items: start;   /* NEW: force items left */
  justify-content: start; /* NEW: force grid to start left */
  box-sizing: border-box;
}



/* === DATASET CARD (flat corners) === */
.dataset-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #1f2330;
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: inset 0 0 8px rgba(0,0,0,0.4), 0 4px 12px rgba(0,0,0,0.3);
  border-radius: 0;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  animation: popIn 0.5s forwards ease-out;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  max-width: 320px;
  min-height: 200px;
}
@keyframes popIn {
  to { opacity: 1; transform: translateY(0); }
}
.dataset-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
}
.dataset-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 4px;
  background: linear-gradient(to right, #25dbc3, #ffb63f);
}

/* Thumbnail container */
.card-thumb {
  width: 100%;
  aspect-ratio: 1/1;
  background: #101124;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* card content */
.card-content {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  z-index: 1;
}
.card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  text-align: center;

  /* pull it up by 4px */
  margin-top: -4px;
  margin-bottom: 4px;
}

.card-desc {
  flex: 1;
  font-size: 0.9rem;
  color: #c3cbe1;
  line-height: 1.3;
  text-align: center;
  /* pull it up by 4px */
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Bottom‑left badge group */
.badge-group {
  position: absolute;
  bottom: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Base pill styling */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  font-size: 0.75rem;
  line-height: 1;
  border-radius: 999px;
  white-space: nowrap;
}

/* Premium pill: black bg, gold border/text, subtle glow */
.badge-premium {
  background-color: #000;
  color: #FFD700;
  border: 1px solid #FFD700;
  box-shadow: 0 0 6px rgba(255,215,0,0.4);
}

/* Price pill: identical style to premium */
.badge-price {
  background-color: #000;
  color: #FFD700;
  border: 1px solid #FFD700;
  box-shadow: 0 0 6px rgba(255,215,0,0.4);
}

.badge-free {
  background-color: #000;
  color: #FFD700;
  border: 1px solid #FFD700;
  box-shadow: 0 0 6px rgba(255,215,0,0.4);
}

/* Bottom-right Buy Now button (for reference) */
.add-cart-btn {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background-color: #ffb63f;
  color: #191929;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.add-cart-btn:hover {
  background-color: #ffc96b;
  transform: translateY(-2px);
}

/* Responsive tweaks */
@media (max-width: 900px) {
  .badge-group {
    gap: 4px;
    bottom: 12px;
    left: 12px;
  }
  .add-cart-btn {
    bottom: 12px;
    right: 12px;
    padding: 5px 12px;
  }
}
/* —— Global body & background —— */
body {
  margin: 0;
  font-family: 'Manrope', 'Inter', system-ui, sans-serif;
  background: radial-gradient(ellipse at 60% 0%, #0f243a 0%, #17182b 80%, #191929 100%);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* —— Navbar & shine effect —— */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 62px;
  display: flex;
  align-items: center;
  background: #191929;
  padding: 0 36px;
  z-index: 99;
  border-bottom: 1.5px solid transparent;
}

.navbar::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0;
  width: 200%; height: 2px;
  background: linear-gradient(120deg, transparent, #25dbc3, transparent);
  animation: shine 8s linear infinite;
  opacity: 0.7;
  transform: translateX(-100%);
}
@keyframes shine {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* —— Brand / Logo —— */
.brand {
  display: flex;
  align-items: center;
  font-size: 1.34rem;
  font-weight: 800;
  color: #f3f8fa;
  gap: 0.7em;
  user-select: none;
  background: none;           /* <— ADDED: removes button bg */
  border: none;               /* <— ADDED: removes button border */
  box-shadow: none;           /* <— ADDED: removes any browser focus style */
  padding: 0;                 /* <— ADDED: removes button padding */
  cursor: pointer;            /* <— OPTIONAL: show hand on hover */
  font-family: inherit;       /* <— ADDED: keep font consistent */
  outline: none;              /* <— ADDED: removes default focus outline */
}
.brand:focus {
  outline: none;              /* <— ADDED: removes default blue focus */
}

.brand-logo {
  background: #1c2e3b;
  border-radius: 8px;
  padding: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.2s;
}
.brand-logo:hover {
  transform: scale(1.08);
}
.brand-logo svg {
  width: 32px;
  height: 32px;
  transition: transform 0.3s ease, filter 0.3s ease;
}
.brand-logo:hover svg {
  transform: scale(1.1) rotate(2deg);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* —— Nav links & dropdowns —— */
.nav-links {
  display: flex;
  gap: 1.8rem;
  margin-left: 2rem;
}
.menu-item { position: relative; }
.menu-item a {
  color: #dbeafe;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.07rem;
  padding: 8px 10px;
  border-radius: 6px;
  transition: color 0.2s;
}
.menu-item a:hover { color: #ffffff; }
.menu-item.has-dropdown:hover .dropdown,
.menu-item.has-dropdown:focus-within .dropdown {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.menu-item.has-dropdown .dropdown {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%; left: 0;
  background: #1c2e3b;
  border: 1px solid #293a46;
  border-radius: 8px;
  padding: 10px 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  min-width: 200px;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  z-index: 100;
}
.dropdown a {
  color: #f3f8fa;
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.2s ease, color 0.2s ease;
}
.dropdown a:hover {
  background: rgba(255,255,255,0.05);
  color: #ffffff;
}
.dropdown-icon svg {
  width: 20px; height: 20px; fill: #ffffff;
}

/* pushes login/signup to the right */
.nav-spacer {
  flex: 1;
}

/* —— Hero section —— */
.hero {
  padding: 100px 16px 40px;
  text-align: center;
  color: #e6ebef;
}
.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 10px;
  min-height: 3rem;
  white-space: pre-wrap;
}
.hero-desc {
  font-size: 1.15rem;
  color: #b8c4d0;
  margin-bottom: 26px;
}
.hero-cta-btn {
  background: #ffb63f;
  color: #191929;
  padding: 11px 26px;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}
.hero-cta-btn:hover {
  transform: translateY(-2px);
  background: #ffc96b;
}

/* —— Features section —— */
.features {
  background: #14141c;
  padding: 30px 0;
  color: #f4f4f4;
  text-align: center;
}
.features h2 {
  font-size: 1.6rem;
  margin-bottom: 24px;
}
.feature-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 50px;
  max-width: 1000px;
  margin: 0 auto;
}
.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 180px;
}
.feature svg {
  width: 22px;
  height: 22px;
  margin-bottom: 10px;
  fill: #ffb63f;
}
.feature-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 5px;
}
.feature-desc {
  font-size: 0.88rem;
  color: #bfc6d1;
  line-height: 1.3;
}
/* in your app.css, under the .features rules */
.features {
  background: #14141c;
  padding: 30px 0;
  color: #f4f4f4;
  text-align: center;
  margin-top: auto;    /* ← this makes it hug the bottom */
}
/* —— Success Page Styles —— */

/* Wrap everything below the navbar */
.success-container {
  /* account for fixed 62px navbar */
  padding: 62px 16px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: calc(100vh - 62px);
  box-sizing: border-box;
  color: #e6ebef;
  text-align: center;
}

/* The centered card */
.success-box {
  background: #232539;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  max-width: 440px;
  width: 100%;
  padding: 2.5rem 1.5rem;
  margin-top: 2rem;
}

/* Title & subtitle */
.success-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  color: #25dbc3;
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.success-desc {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Action buttons row */
.success-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.success-actions a {
  background: #ffb63f;
  color: #191929;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.success-actions a:hover {
  background: #ffc96b;
  transform: translateY(-2px);
}

/* “Questions?” link */
.success-contact {
  font-size: 0.9rem;
  color: #b8c4d0;
}

.success-contact a {
  color: #25dbc3;
  text-decoration: underline;
  font-weight: 600;
}

/* Responsive tweaks */
@media (max-width: 600px) {
  .success-box {
    padding: 1.5rem 1rem;
    margin-top: 1.5rem;
  }
  .success-title {
    font-size: 1.2rem;
  }
  .success-actions {
    flex-direction: column;
    gap: 0.75rem;
  }
}
