@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Sora:wght@600;700&display=swap');

:root {
  --bg: #f3f7fb;
  --bg-soft: #e9f1fb;
  --surface: #ffffff;
  --surface-2: #f8fbff;
  --text: #10233d;
  --muted: #4f6785;
  --line: #d6e3f3;
  --brand: #0d6efd;
  --brand-strong: #0957ca;
  --accent: #09a37d;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow-soft: 0 10px 35px rgba(11, 36, 71, 0.08);
  --shadow-card: 0 8px 22px rgba(16, 35, 61, 0.06);
  --container: min(1400px, 94vw);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  font-family: 'Manrope', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 5% 5%, rgba(13, 110, 253, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 95% 20%, rgba(9, 163, 125, 0.08) 0%, transparent 35%),
    radial-gradient(circle at 50% 50%, rgba(217, 233, 255, 0.4) 0%, transparent 100%),
    var(--bg);
  background-attachment: fixed;
  line-height: 1.58;
}

a {
  color: inherit;
  text-decoration: none;
}

p {
  margin: 0;
  color: var(--muted);
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--text);
}

h1,
h2,
h3,
.logo {
  font-family: 'Sora', sans-serif;
  letter-spacing: -0.02em;
}

.container {
  width: var(--container);
  margin: 0 auto;
}

main.container {
  padding: 28px 0 40px;
}

/* ======== HEADER ======== */
.site-header {
  position: sticky;
  top: 14px;
  z-index: 30;
  width: var(--container);
  margin: 14px auto 0;
  border: 1px solid rgba(214, 227, 243, 0.85);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-soft);
}

.site-header,
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
}

.site-header .container {
  width: 100%;
  padding: 0;
}

.logo {
  font-size: 1.05rem;
  font-weight: 700;
  background: linear-gradient(120deg, var(--brand-strong), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

nav a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

nav a:hover {
  color: var(--text);
  background: var(--surface-2);
}

nav a.active {
  color: var(--brand-strong);
  background: #e9f2ff;
}

/* ======== SHARED PANEL STYLES ======== */
.hero,
.card,
.tool-panel,
.blog-article,
.feature-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.card,
.tool-panel,
.blog-article,
.feature-panel {
  padding: 16px 20px;
}

/* ======== HERO ======== */
.hero {
  padding: clamp(32px, 6vw, 72px);
  margin-bottom: 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  overflow: hidden;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(13, 110, 253, 0.05) 0%, transparent 50%);
  z-index: -1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(13, 110, 253, 0.1);
  color: var(--brand-strong);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 20px;
  border: 1px solid rgba(13, 110, 253, 0.1);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.05;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text) 30%, var(--brand-strong));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  max-width: 680px;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  margin-bottom: 32px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

/* ======== BUTTONS ======== */
.btn {
  border: 1px solid var(--brand);
  background: linear-gradient(180deg, #2f87ff 0%, var(--brand) 100%);
  color: #ffffff;
  border-radius: 10px;
  padding: 11px 15px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.93rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

.btn-light {
  background: #ffffff;
  color: var(--brand-strong);
  border-color: #c8ddfa;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: 8px;
}

/* ======== TOOLBAR ======== */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin: 4px 0 12px;
}

.toolbar {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.text-muted,
.muted {
  color: var(--muted);
}

/* ======== INPUTS ======== */
#tool-search,
select,
input[type="text"],
input[type="url"],
input[type="search"],
textarea {
  width: 100%;
  border: 1px solid #bfd4ef;
  border-radius: var(--radius-sm);
  background: #fcfeff;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea {
  max-width: none;
  min-height: 130px;
  resize: vertical;
}

#tool-search:focus,
select:focus,
input[type="text"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
textarea:focus {
  border-color: #7bb0f0;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.12);
}

label {
  display: block;
  margin: 12px 0 7px;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
}

/* ======== GRID ======== */
.grid,
.compact-grid,
.discover-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin: 14px 0 24px;
}

.compact-grid {
  margin-bottom: 0;
}

/* ======== MINI CARD (new compact card with hover) ======== */
.mini-card {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.mini-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.04) 0%, rgba(9, 163, 125, 0.04) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mini-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand);
  box-shadow: 0 12px 32px rgba(13, 110, 253, 0.12);
}

.mini-card:hover::before {
  opacity: 1;
}

.mini-card.disabled {
  opacity: 0.55;
  pointer-events: none;
}

.mini-card-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.mini-card:hover .mini-card-icon {
  background: var(--brand);
  color: #fff;
  transform: rotate(5deg) scale(1.08);
  border-color: var(--brand);
}

.mini-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  z-index: 1;
}

.mini-card-body h3 {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mini-card-body p {
  font-size: 0.82rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
  margin: 0;
}

.mini-card-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--muted);
}

.mini-card-cat {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ======== TYPE BADGES (for discover section) ======== */
.type-badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.type-badge.tool {
  background: rgba(13, 110, 253, 0.1);
  color: var(--brand-strong);
  border: 1px solid rgba(13, 110, 253, 0.15);
}

.type-badge.blog {
  background: rgba(9, 163, 125, 0.1);
  color: var(--accent);
  border: 1px solid rgba(9, 163, 125, 0.15);
}

/* ======== BADGE ======== */
.badge {
  font-size: 0.62rem;
  font-weight: 800;
  color: #fff;
  background: var(--accent);
  border-radius: 4px;
  padding: 2px 7px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  vertical-align: middle;
}

/* ======== RESULT GRID (thumbnails) ======== */
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.result-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: 10px;
}

.result-item img {
  width: 100%;
  border-radius: 8px;
  display: block;
  margin-bottom: 8px;
}

/* ======== FEATURE PANEL ======== */
.feature-panel {
  margin-top: 14px;
}

.stats-row,
.share-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.stats-row span,
.chip-link,
.text-btn {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 999px;
  padding: 7px 11px;
  font: inherit;
  font-size: 0.88rem;
}

.chip-link,
.text-btn {
  cursor: pointer;
}

.chip-link:hover {
  background: var(--bg-soft);
  border-color: var(--brand);
  color: var(--brand-strong);
}

/* ======== INLINE LINK ======== */
.inline-link {
  color: var(--brand-strong);
  font-weight: 700;
}

.inline-link:hover {
  text-decoration: underline;
}

/* ======== BLOG ARTICLE ======== */
.blog-article h1 {
  font-size: clamp(1.5rem, 3.2vw, 2.3rem);
  margin-bottom: 10px;
}

.blog-article h2 {
  margin: 20px 0 8px;
  font-size: 1.15rem;
}

.blog-article p {
  margin: 0 0 10px;
}

/* ======== BACK BUTTON ======== */
.back-btn-wrapper {
  margin-bottom: 24px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--muted);
  transition: all 0.2s ease;
  cursor: pointer;
}

.back-btn:hover {
  color: var(--brand-strong);
  border-color: var(--brand);
  transform: translateX(-4px);
}

/* ======== PREMIUM FOOTER ======== */
.site-footer {
  background: linear-gradient(180deg, #0c1524 0%, #0f1d32 100%);
  color: #8899b0;
  padding: 56px 0 0;
  margin-top: 60px;
  border-top: none;
  width: 100%;
}

.site-footer .container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand .logo {
  font-size: 1.4rem;
  margin-bottom: 14px;
  display: inline-block;
}

.footer-brand p {
  color: #6b7f99;
  font-size: 0.9rem;
  max-width: 300px;
  line-height: 1.6;
}

.footer-column h4 {
  color: #e2e8f0;
  font-size: 0.95rem;
  margin-bottom: 18px;
  font-family: 'Sora', sans-serif;
  letter-spacing: 0.02em;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #6b7f99;
  font-size: 0.88rem;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-links a:hover {
  color: #e2e8f0;
  padding-left: 4px;
}

.footer-bottom {
  margin-top: 48px;
  padding: 20px 0;
  border-top: 1px solid rgba(100, 120, 150, 0.12);
  text-align: center;
  font-size: 0.82rem;
  color: #506680;
}

/* ======== RESPONSIVE ======== */
@media (max-width: 900px) {
  .site-footer .container {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .site-header {
    border-radius: 16px;
    top: 8px;
    margin-top: 8px;
  }

  .site-header,
  .site-header .container {
    padding: 10px;
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    width: 100%;
    justify-content: flex-start;
  }

  nav a {
    flex: 0 0 auto;
  }

  main.container {
    padding-top: 18px;
  }

  .section-head,
  .toolbar {
    grid-template-columns: 1fr;
    display: grid;
    align-items: stretch;
  }

  .actions {
    width: 100%;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .grid,
  .discover-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .site-footer .container {
    grid-template-columns: 1fr;
  }
}