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

body {
  font-family: 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  background: #f5f9f5;
  color: #333;
}

/* ── 네비게이션 ─────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #e0f0e0;
  box-shadow: 0 2px 8px rgba(46,125,50,0.08);
}

.nav-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 18px;
  font-weight: 800;
  color: #2e7d32;
  text-decoration: none;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 4px;
}

.nav-links a {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  color: #388e3c;
  text-decoration: none;
  transition: background 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  background: #e8f5e9;
  color: #1b5e20;
}

/* ── 히어로 ─────────────────────────────── */
.hero {
  position: relative;
  background: linear-gradient(135deg, #1a5c20 0%, #2e7d32 55%, #43a047 100%);
  color: #fff;
  padding: 80px 20px 110px;
  overflow: hidden;
}

/* 배경 파티클 */
.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-particles span {
  position: absolute;
  opacity: 0.13;
  animation: particleFloat var(--dur, 9s) ease-in-out infinite var(--delay, 0s);
  user-select: none;
}

@keyframes particleFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33%       { transform: translateY(-18px) rotate(8deg); }
  66%       { transform: translateY(12px) rotate(-6deg); }
}

/* 두 컬럼 레이아웃 */
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-text {
  text-align: left;
}

.hero h1 {
  font-size: 36px;
  font-weight: 900;
  line-height: 1.4;
  margin-bottom: 18px;
  letter-spacing: -0.5px;
}

.hero p {
  font-size: 16px;
  line-height: 1.9;
  opacity: 0.88;
  margin-bottom: 32px;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  padding: 14px 32px;
  background: #fff;
  color: #1b5e20;
  font-weight: 800;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.25s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.hero-btn:hover {
  background: #e8f5e9;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
}

/* ── 히어로 그래픽 ───────────────────────── */
.hero-graphic {
  position: relative;
  width: 320px;
  height: 320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 외부 궤도 링 */
.orbit-ring {
  position: absolute;
  width: 290px;
  height: 290px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.3);
  animation: orbitSpin 30s linear infinite;
}

@keyframes orbitSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* 중앙 원 + 재활용 기호 */
.graphic-center {
  position: relative;
  z-index: 2;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: centerPulse 4s ease-in-out infinite;
  box-shadow: 0 0 40px rgba(255,255,255,0.1), inset 0 0 30px rgba(255,255,255,0.05);
}

@keyframes centerPulse {
  0%, 100% { transform: scale(1);    box-shadow: 0 0 40px rgba(255,255,255,0.10); }
  50%       { transform: scale(1.04); box-shadow: 0 0 60px rgba(255,255,255,0.20); }
}

.recycle-svg {
  width: 100px;
  height: 100px;
  animation: recycleSpin 14s linear infinite;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.15));
}

@keyframes recycleSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* 분리수거 버블들 */
.bubble {
  position: absolute;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  animation: bubbleFloat 5s ease-in-out infinite;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

@keyframes bubbleFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

.bubble-1 { top: 5%;  left: 50%; transform: translateX(-50%); animation-delay: 0s; }
.bubble-2 { top: 22%; right: -5%; animation-delay: -0.8s; }
.bubble-3 { bottom: 22%; right: -5%; animation-delay: -1.6s; }
.bubble-4 { bottom: 5%;  left: 50%; transform: translateX(-50%); animation-delay: -2.4s; }
.bubble-5 { bottom: 22%; left: -5%; animation-delay: -3.2s; }
.bubble-6 { top: 22%; left: -5%; animation-delay: -4s; }

/* 하단 웨이브 */
.hero-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  line-height: 0;
}

.hero-wave svg {
  display: block;
  width: 100%;
  height: 70px;
}

/* 반응형 - 히어로 */
@media (max-width: 700px) {
  .hero { padding: 50px 20px 100px; }
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-text { text-align: center; }
  .hero h1 { font-size: 26px; }
  .hero-graphic {
    width: 260px;
    height: 260px;
    order: -1;
  }
  .orbit-ring { width: 240px; height: 240px; }
  .graphic-center { width: 140px; height: 140px; }
  .recycle-svg { width: 80px; height: 80px; }
  .bubble { font-size: 11px; padding: 5px 10px; }
}

/* ── 페이지 레이아웃 ─────────────────────── */
.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 16px 60px;
  gap: 60px;
}

/* ── 섹션 ───────────────────────────────── */
.section {
  width: 100%;
  max-width: 860px;
}

.section-title {
  font-size: 26px;
  font-weight: 800;
  color: #1b5e20;
  margin-bottom: 10px;
  text-align: center;
}

.section-desc {
  font-size: 15px;
  color: #555;
  text-align: center;
  line-height: 1.7;
  margin-bottom: 32px;
}

/* ── AI 도구 영역 ────────────────────────── */
.tab-group {
  display: flex;
  gap: 8px;
  background: #fff;
  border-radius: 50px;
  padding: 6px;
  box-shadow: 0 2px 12px rgba(46, 125, 50, 0.12);
  width: fit-content;
  margin: 0 auto 24px;
}

.tab {
  padding: 10px 24px;
  border: none;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: #388e3c;
  transition: all 0.2s;
  font-family: inherit;
}

.tab.active {
  background: #43a047;
  color: #fff;
}

.main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 520px;
  margin: 0 auto;
}

/* 카드 */
.card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(46, 125, 50, 0.1);
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* 업로드 영역 */
.upload-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background: #f1f8e9;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px dashed #81c784;
  transition: border-color 0.2s, background 0.2s;
}

.upload-wrap:hover,
.upload-wrap.drag-over {
  border-color: #43a047;
  background: #e8f5e9;
}

.upload-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #66bb6a;
  text-align: center;
  padding: 20px;
  pointer-events: none;
}

.upload-placeholder span { font-size: 56px; }
.upload-placeholder p { font-size: 14px; font-weight: 600; color: #388e3c; }
.upload-placeholder small { font-size: 12px; color: #81c784; }

/* 카메라 영역 */
.camera-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background: #f1f8e9;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.camera-overlay {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  pointer-events: none;
}

.trash-guide {
  width: 200px;
  height: 200px;
  border: 3px dashed rgba(255,255,255,0.85);
  border-radius: 12px;
}

.camera-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 20px;
}

.camera-placeholder span { font-size: 48px; }
.camera-placeholder p { font-size: 14px; font-weight: 600; color: #388e3c; }

/* 버튼 */
.btn-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 28px;
  border: none;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  text-decoration: none;
}

.btn-primary { background: #43a047; color: #fff; }
.btn-primary:hover { background: #2e7d32; }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-secondary { background: #66bb6a; color: #fff; }
.btn-secondary:hover { background: #43a047; }
.btn-outline { background: transparent; border: 2px solid #43a047; color: #43a047; }
.btn-outline:hover { background: #43a047; color: #fff; }

/* 결과 카드 */
.result-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(46, 125, 50, 0.1);
  padding: 28px;
}

.result-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: #1b5e20;
  margin-bottom: 20px;
  text-align: center;
}

.top-result {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #f1f8e9;
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.category-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  border: 2px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
}

.top-label { display: flex; flex-direction: column; gap: 4px; }
.top-name { font-size: 24px; font-weight: 800; }
.top-percent { font-size: 14px; color: #66bb6a; font-weight: 600; }

.result-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.result-item { display: flex; align-items: center; gap: 8px; }
.item-icon { font-size: 18px; flex-shrink: 0; width: 24px; text-align: center; }
.item-label { font-size: 13px; font-weight: 600; color: #2e7d32; width: 80px; flex-shrink: 0; }

.bar-wrap {
  flex: 1;
  background: #e8f5e9;
  border-radius: 50px;
  height: 10px;
  overflow: hidden;
}

.bar { height: 100%; border-radius: 50px; transition: width 0.6s ease; }
.item-pct { font-size: 13px; font-weight: 700; color: #388e3c; width: 36px; text-align: right; flex-shrink: 0; }

.result-tip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: #388e3c;
  line-height: 1.7;
  background: #f1f8e9;
  border-radius: 12px;
  padding: 14px 16px;
  border-left: 4px solid #43a047;
}

.tip-icon { font-size: 24px; flex-shrink: 0; margin-top: 2px; }

/* ── 광고 영역 ───────────────────────────── */
.ad-wrap {
  width: 100%;
  max-width: 860px;
  min-height: 90px;
  background: #f0f0f0;
  border-radius: 12px;
  overflow: hidden;
  text-align: center;
}

/* ── 분리수거 가이드 그리드 ──────────────── */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.guide-card {
  background: #fff;
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 4px 16px rgba(46,125,50,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.guide-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(46,125,50,0.15);
}

.guide-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 12px;
}

.guide-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: #1b5e20;
  margin-bottom: 10px;
}

.guide-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.guide-card li {
  font-size: 13px;
  color: #555;
  line-height: 1.5;
  padding-left: 14px;
  position: relative;
}

.guide-card li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: #43a047;
  font-weight: 700;
}

/* ── 중요성 섹션 ─────────────────────────── */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.info-card {
  background: #fff;
  border-radius: 16px;
  padding: 28px 22px;
  box-shadow: 0 4px 16px rgba(46,125,50,0.08);
  text-align: center;
}

.info-num {
  font-size: 40px;
  font-weight: 900;
  color: #43a047;
  margin-bottom: 12px;
}

.info-card p {
  font-size: 14px;
  color: #555;
  line-height: 1.7;
}

/* ── FAQ ─────────────────────────────────── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(46,125,50,0.07);
  overflow: hidden;
}

.faq-item summary {
  padding: 18px 22px;
  font-size: 15px;
  font-weight: 700;
  color: #1b5e20;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 20px;
  color: #43a047;
  font-weight: 400;
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  padding: 0 22px 18px;
  font-size: 14px;
  color: #555;
  line-height: 1.8;
}

/* ── 푸터 ───────────────────────────────── */
.footer {
  background: #1b5e20;
  color: #fff;
  padding: 40px 20px;
  text-align: center;
}

.footer-inner {
  max-width: 860px;
  margin: 0 auto;
}

.footer-logo {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 8px;
}

.footer-desc {
  font-size: 14px;
  opacity: 0.75;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
}

.footer-links a {
  font-size: 14px;
  color: #a5d6a7;
  text-decoration: none;
}

.footer-links a:hover { color: #fff; text-decoration: underline; }

.footer-copy {
  font-size: 12px;
  opacity: 0.6;
}

.footer-copy a { color: #a5d6a7; text-decoration: none; }
.footer-copy a:hover { color: #fff; }

/* ── 서브 페이지 ─────────────────────────── */
.sub-page {
  padding-top: 40px;
}

.sub-hero {
  text-align: center;
  margin-bottom: 40px;
}

.sub-hero h1 {
  font-size: 30px;
  font-weight: 800;
  color: #1b5e20;
  margin-bottom: 8px;
}

.sub-hero p {
  font-size: 14px;
  color: #888;
}

.content-card {
  background: #fff;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 4px 24px rgba(46,125,50,0.08);
  max-width: 720px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.content-card h2 {
  font-size: 18px;
  font-weight: 700;
  color: #1b5e20;
  padding-top: 10px;
  border-top: 1px solid #e8f5e9;
}

.content-card h2:first-child { border-top: none; padding-top: 0; }

.content-card p {
  font-size: 15px;
  color: #444;
  line-height: 1.8;
}

.content-card a { color: #43a047; }
.content-card a:hover { text-decoration: none; }

.content-list {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.content-list li {
  font-size: 15px;
  color: #444;
  line-height: 1.7;
}

/* ── 반응형 ─────────────────────────────── */
@media (max-width: 600px) {
  .hero h1 { font-size: 26px; }
  .hero p { font-size: 15px; }
  .nav-links { display: none; }
  .guide-grid { grid-template-columns: 1fr 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .content-card { padding: 24px; }
}

@media (max-width: 400px) {
  .guide-grid { grid-template-columns: 1fr; }
}
