/* Home page styles extracted from pages/*/index.jsx to avoid inlining large CSS in HTML. */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Avenir Next", "Segoe UI Variable Text", "SF Pro Text", "Noto Sans", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(1200px 760px at 50% -10%, rgba(246, 179, 90, 0.22), transparent 60%),
    radial-gradient(980px 740px at 18% 24%, rgba(168, 85, 247, 0.14), transparent 58%),
    radial-gradient(820px 620px at 88% 34%, rgba(59, 130, 246, 0.12), transparent 60%),
    linear-gradient(180deg, var(--bg1) 0%, var(--bg0) 70%, #050505 100%);
  color: var(--text-main);
  line-height: 1.7;
  font-size: 16px;
  letter-spacing: 0.01em;
  min-height: 100vh;
}

.home-shell {
  --accent: #f6b35a;
  --accent-strong: #f59e0b;
  --accent-deep: #d97706;
  --text-main: rgba(255, 248, 238, 0.94);
  --text-light: rgba(240, 231, 220, 0.76);
  --text-faint: rgba(221, 205, 190, 0.58);
  --border-color: rgba(255, 255, 255, 0.12);
  --border-color-strong: rgba(255, 255, 255, 0.18);
  --max-width: 1100px;
  --radius: 18px;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.55);
  --shadow-soft: 0 18px 46px rgba(0, 0, 0, 0.35);
  min-height: 100vh;
  color: var(--text-main);
  background:
    radial-gradient(1200px 760px at 50% -10%, rgba(246, 179, 90, 0.22), transparent 60%),
    radial-gradient(980px 740px at 18% 24%, rgba(95, 55, 135, 0.16), transparent 58%),
    radial-gradient(820px 620px at 88% 34%, rgba(41, 74, 130, 0.12), transparent 60%),
    linear-gradient(180deg, #120d09 0%, #0d0907 54%, #080605 100%);
  position: relative;
  overflow: clip;
}

.home-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.28), transparent 75%);
  pointer-events: none;
}

.home-shell > * {
  position: relative;
  z-index: 1;
}

.home-shell h1,
.home-shell h2,
.home-shell h3,
.home-shell h4,
.home-shell h5,
.home-shell h6 {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Songti SC", "STSong", serif;
  line-height: 1.2;
  margin-bottom: 0.8em;
  color: var(--text-main);
  font-weight: 700;
  letter-spacing: -0.012em;
}

.home-shell p {
  margin-bottom: 1.2em;
  color: var(--text-light);
}

.home-shell a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.84);
  transition: 0.2s;
}

.home-shell a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
  display: block;
}

/* --- Layout Utilities --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.section:last-child {
  border-bottom: none;
}

.bg-white {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.018));
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

/* --- Header --- */
.home-shell header {
  background: rgba(10, 8, 6, 0.60);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.home-shell.is-tool-active header {
  position: relative;
  top: auto;
  z-index: 2;
  background: rgba(10, 8, 6, 0.72);
  box-shadow: none;
}

body.rasterbator-zoom-open .home-shell.is-tool-active header {
  visibility: hidden;
  pointer-events: none;
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo img {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.logo span {
  color: var(--text-faint);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--accent);
}

.mobile-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.1rem;
  font-weight: 700;
}

.mobile-nav-panel {
  display: none;
}

.lang-selector {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.lang-btn:hover {
  border-color: rgba(246, 179, 90, 0.55);
  color: var(--accent);
}

.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: rgba(18, 14, 10, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
  min-width: 140px;
  z-index: 100;
  overflow: hidden;
}

.lang-dropdown a {
  display: block;
  padding: 0.7rem 1rem;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.9rem;
  transition: 0.2s;
}

.lang-dropdown a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent);
}

.lang-dropdown a.active {
  background: rgba(246, 179, 90, 0.14);
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
}

.btn-cta {
  background: linear-gradient(180deg, rgba(246, 179, 90, 1), rgba(217, 119, 6, 1));
  color: rgba(20, 12, 6, 0.92) !important;
  padding: 0.65rem 1.55rem;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid rgba(246, 179, 90, 0.45);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  cursor: pointer;
}

.btn-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.40);
  filter: brightness(1.02);
}

.btn-cta-btn {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  line-height: 1;
}

/* --- Hero Section --- */
.hero {
  padding: 6rem 0 4rem;
  text-align: center;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -160px -80px auto -80px;
  height: 520px;
  background: radial-gradient(closest-side at 50% 50%, rgba(246, 179, 90, 0.22), transparent 70%);
  filter: blur(24px);
  opacity: 0.9;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 120px -80px auto -80px;
  height: 520px;
  background:
    radial-gradient(closest-side at 18% 40%, rgba(168, 85, 247, 0.16), transparent 68%),
    radial-gradient(closest-side at 84% 24%, rgba(59, 130, 246, 0.14), transparent 68%);
  filter: blur(24px);
  opacity: 0.85;
  pointer-events: none;
}

.hero > .container {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-family: "Avenir Next", "Segoe UI Variable Text", "SF Pro Display", "Noto Sans", sans-serif;
  font-size: clamp(2.15rem, 4.2vw, 3.45rem);
  line-height: 1.1;
  margin-bottom: 0.8rem;
  letter-spacing: -0.05em;
  font-weight: 780;
  color: #f1c27d;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.hero-sub {
  font-size: 1.12rem;
  max-width: 660px;
  margin: 0 auto 2rem;
  color: rgba(240, 231, 220, 0.82);
}

.hero-note {
  margin: -4px auto 18px;
  font-size: 0.96rem;
  letter-spacing: 0.02em;
  color: rgba(223, 203, 181, 0.72);
}

.hero-chips {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: -8px auto 16px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.86rem;
  line-height: 1;
  white-space: nowrap;
}

.chip.chip-orange {
  background: rgba(246, 179, 90, 0.13);
  border-color: rgba(246, 179, 90, 0.22);
}

.chip.chip-green {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.22);
}

.chip.chip-blue {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.22);
}

.chip.chip-violet {
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.22);
}

.chip.chip-secure {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
  color: rgba(247, 240, 232, 0.92);
}

/* Tool Box */
.tool-box {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.03));
  padding: 2.2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 1250px;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px);
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.tool-box.drag-active {
  border-color: rgba(246, 179, 90, 0.55);
  box-shadow: 0 0 0 4px rgba(246, 179, 90, 0.08), var(--shadow);
  transform: translateY(-1px);
}

.tool-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.8;
}

.tool-box-body h3 {
  font-size: clamp(1.85rem, 3vw, 2.45rem);
  margin-bottom: 0.3rem;
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
}

.tool-box-body p {
  margin-bottom: 0.9rem;
  color: rgba(240, 231, 220, 0.74);
  font-size: 1rem;
  text-align: center;
}

.tool-box-body {
  max-width: 720px;
  margin: 0 auto;
  min-height: 0;
}

.tool-console {
  background: linear-gradient(180deg, rgba(57, 43, 33, 0.86), rgba(40, 31, 25, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 1.5rem 1.5rem 1.2rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), inset 0 -30px 80px rgba(0, 0, 0, 0.18);
  margin-bottom: 1.35rem;
}

.tool-console-head {
  margin-bottom: 0;
}

.upload-btn {
  background: linear-gradient(180deg, rgba(246, 179, 90, 1), rgba(217, 119, 6, 1));
  color: rgba(20, 12, 6, 0.92);
  border: 1px solid rgba(246, 179, 90, 0.45);
  padding: 0.95rem 2.45rem;
  font-size: 1.06rem;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  margin-top: 1rem;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
  display: inline-block;
  text-align: center;
  min-width: 360px;
  max-width: 100%;
  white-space: normal;
  line-height: 1.25;
  margin-left: auto;
  margin-right: auto;
}

.upload-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.40);
  filter: brightness(1.02);
}

.hidden-input {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(245, 237, 229, 0.78);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  margin-top: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  width: 100%;
  justify-content: center;
}

.home-ad-wrap {
  margin: 1.6rem auto 0;
  max-width: 100%;
  display: flex;
  justify-content: center;
}

.home-ad-wrap--desktop {
  width: 300px;
}

.home-ad-wrap--mobile {
  width: 320px;
}

.home-ad-slot--300x250 {
  width: 300px;
  height: 250px;
  max-width: 100%;
  overflow: hidden;
}

.home-ad-slot--320x50 {
  width: 320px;
  height: 50px;
  max-width: 100%;
  overflow: hidden;
}

.side-ads-layer {
  position: fixed;
  top: 50%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 60;
}

.side-ad-slot {
  position: absolute;
  width: 160px;
  height: 300px;
  overflow: hidden;
  pointer-events: auto;
}

.side-ad-slot--tall {
  height: 600px;
}

.side-ad-slot--left {
  left: 20px;
}

.side-ad-slot--right {
  right: 20px;
}

@media (max-width: 1399px), (max-height: 759px) {
  .side-ad-slot--tall {
    display: none;
  }
}

/* --- Features Grid --- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
}

.feature-card {
  padding: 2rem;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.feature-card p,
.text-center p,
.content-block p,
.content-block li,
.footer-col p,
.bottom-bar p,
.faq-answer {
  color: rgba(240, 231, 220, 0.72);
}

.feature-card h3,
.text-center h2,
.content-block h2,
.content-block h3,
.faq-question,
.footer-col h4 {
  color: rgba(255, 248, 238, 0.94);
}

.privacy-card {
  max-width: 920px;
  margin: 0 auto 2rem;
  padding: 1.5rem 1.6rem;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(55, 42, 31, 0.86), rgba(34, 28, 23, 0.96));
  border: 1px solid rgba(246, 179, 90, 0.18);
  box-shadow: var(--shadow-soft);
  text-align: left;
}

.privacy-card-kicker {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(246, 179, 90, 0.1);
  border: 1px solid rgba(246, 179, 90, 0.16);
  color: rgba(241, 194, 125, 0.92);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}

.privacy-card h3 {
  margin-bottom: 0.6rem;
  color: rgba(255, 248, 238, 0.96);
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
}

.privacy-card p {
  margin: 0;
  color: rgba(240, 231, 220, 0.78);
  font-size: 1rem;
  line-height: 1.7;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
  border-color: rgba(246, 179, 90, 0.22);
}

.feature-icon {
  width: 50px;
  height: 50px;
  background: rgba(246, 179, 90, 0.12);
  color: rgba(255, 255, 255, 0.90);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(246, 179, 90, 0.18);
}

/* --- Gallery Section --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.gallery-item {
  height: 350px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), transparent);
  color: white;
  padding: 2rem 1rem 1rem;
  font-weight: 600;
}

/* --- Article / Content Styles (SEO Heavy) --- */
.content-block {
  max-width: 800px;
  margin: 0 auto;
}

.content-block h2 {
  font-size: 2.2rem;
  margin-top: 3rem;
  color: rgba(255, 248, 238, 0.94);
  border-bottom: 2px solid rgba(246, 179, 90, 0.22);
  padding-bottom: 0.5rem;
  display: inline-block;
}

.content-block h3 {
  font-size: 1.5rem;
  margin-top: 2rem;
  color: rgba(255, 255, 255, 0.88);
}

.content-block ul,
.content-block ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
  color: rgba(240, 231, 220, 0.72);
}

.content-block li {
  margin-bottom: 0.8rem;
}

/* Highlight box for keywords */
.highlight-box {
  background: rgba(246, 179, 90, 0.10);
  border-left: 4px solid rgba(246, 179, 90, 0.55);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 0 8px 8px 0;
  color: rgba(255, 255, 255, 0.82);
}

.highlight-box strong {
  color: rgba(255, 255, 255, 0.92);
}

/* --- FAQ --- */
.faq-item {
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}

.faq-question {
  background: rgba(255, 255, 255, 0.05);
  padding: 1.2rem;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(255, 255, 255, 0.88);
}

.faq-answer {
  padding: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.18);
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

.faq-item.active .faq-question {
  background: rgba(246, 179, 90, 0.10);
  color: rgba(255, 255, 255, 0.92);
}

/* --- Footer --- */
footer {
  background: linear-gradient(180deg, rgba(8, 6, 5, 0.55), rgba(7, 6, 5, 0.85));
  color: rgba(255, 255, 255, 0.70);
  padding: 4rem 0 2rem;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.8rem;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.68);
}

.footer-col a:hover {
  color: rgba(255, 255, 255, 0.92);
}

.bottom-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .nav-links {
    display: none;
  }

  .mobile-nav-toggle {
    display: inline-flex;
  }

  .mobile-nav-panel {
    display: block;
    padding: 0 1.5rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(10, 8, 6, 0.74);
    backdrop-filter: blur(16px);
  }

  .mobile-nav-panel-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    gap: 10px;
  }

  .mobile-nav-panel a,
  .mobile-nav-panel button {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.86);
    font-weight: 600;
    font-size: 0.95rem;
  }

  .mobile-nav-panel button {
    cursor: pointer;
    font: inherit;
  }
}

@media (max-width: 820px) {
  .tool-box-body {
    max-width: none;
  }

  .tool-console {
    padding: 1.2rem 1rem 1rem;
  }

  .upload-btn {
    min-width: 0;
    width: 100%;
  }
}
