@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;600;700&display=swap');

:root {
  --primary: #C4956A;
  --primary-dark: #A87850;
  --primary-light: #FEF3E8;
  --bg: #F7F8FA;
  --white: #FFFFFF;
  --text: #1A1A2E;
  --text-light: #6B7280;
  --border: #E5E7EB;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 30px rgba(196,149,106,0.22);
  --radius: 14px;
  --radius-sm: 8px;
}

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

body {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

header {
  background: var(--primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(196,149,106,0.35);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 60px;
  padding: 0 20px;
  gap: 32px;
}

.logo {
  color: white;
  font-size: 1.4rem;
  font-weight: 700;
  text-decoration: none;
  flex-shrink: 0;
}

nav { display: flex; gap: 4px; flex: 1; }

nav a {
  color: rgba(255,255,255,0.88);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 20px;
  transition: background 0.15s;
  white-space: nowrap;
}
nav a:hover { background: rgba(255,255,255,0.18); color: white; }

.header-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.our-sites-bar {
  background: #1A1A2E;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.our-sites-bar::-webkit-scrollbar { display: none; }
.our-sites-label {
  color: rgba(255,255,255,0.4);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}
.our-sites-links { display: flex; gap: 4px; flex-wrap: nowrap; }
.our-sites-links a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.our-sites-links a:hover { background: rgba(255,255,255,0.12); color: white; }
.our-sites-links a.active { background: rgba(196,149,106,0.55); color: white; }

.hero {
  background: linear-gradient(135deg, #C4956A 0%, #E8C49A 100%);
  padding: 56px 20px 80px;
  text-align: center;
}
.hero h1 { color: white; font-size: 2.2rem; font-weight: 700; margin-bottom: 10px; }
.hero p { color: rgba(255,255,255,0.92); font-size: 1.05rem; max-width: 560px; margin: 0 auto; }
.hero-install-btn {
  margin-top: 20px;
  display: none;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.6);
  color: white;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 10px 24px;
  border-radius: 30px;
  cursor: pointer;
  font-family: inherit;
}
.hero-install-btn:hover { background: rgba(255,255,255,0.35); }
.hero-related {
  margin-top: 16px;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.85);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.hero-related a {
  color: white;
  font-weight: 700;
  text-decoration: none;
  background: rgba(255,255,255,0.2);
  padding: 4px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.4);
  font-size: 0.82rem;
}

.index-with-sidebar {
  max-width: 1260px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
  padding: 0 20px;
}
.index-with-sidebar .tools-section { max-width: 100%; margin: 0; padding-left: 0; padding-right: 0; }
.tools-section { max-width: 1200px; margin: -36px auto 0; padding: 52px 0 80px; }
.index-sidebar { position: sticky; top: 76px; padding-top: 40px; }
.index-ad-card { background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 12px; margin-bottom: 16px; }
.index-mobile-ad { display: none; text-align: center; padding: 8px 16px; background: #fff; border-bottom: 1px solid var(--border); }

.category-block { margin-bottom: 40px; }
.category-header { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.category-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }
.category-title { font-size: 1rem; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.5px; }
.category-desc { color: var(--text-light); font-size: 0.85rem; margin: 2px 0 0; }

.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.tool-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 16px 22px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid transparent;
  display: block;
  position: relative;
}
.tool-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: rgba(196,149,106,0.2); }
.tool-icon { font-size: 2.8rem; margin-bottom: 14px; display: block; }
.tool-name { font-weight: 700; font-size: 0.92rem; margin-bottom: 7px; color: var(--text); }
.tool-desc { font-size: 0.78rem; color: var(--text-light); line-height: 1.45; }
.free-badge { display: inline-block; background: #22C55E; color: #fff; font-size: 0.65rem; font-weight: 700; padding: 2px 7px; border-radius: 20px; margin-bottom: 6px; letter-spacing: 0.03em; }
.new-badge { position: absolute; top: 8px; right: 8px; background: #EF4444; color: white; font-size: 0.65rem; font-weight: 700; padding: 2px 6px; border-radius: 4px; }
.coupang-card { background: #fff; border-radius: 14px; box-shadow: 0 2px 12px rgba(0,0,0,.07); overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 10px; min-height: 220px; }

.page-with-sidebar {
  max-width: 1160px;
  margin: 40px auto 80px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}
.tool-page { max-width: 780px; margin: 40px auto 80px; padding: 0 20px; }
.page-with-sidebar .tool-page { max-width: 100% !important; margin: 0; padding: 0; min-width: 0; }
.tool-sidebar { position: sticky; top: 76px; }
.ad-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border: 1.5px dashed var(--border); padding: 14px; display: flex; flex-direction: column; align-items: center; min-height: 280px; margin-bottom: 16px; }
.ad-card-label { font-size: 0.7rem; color: #9CA3AF; align-self: flex-start; margin-bottom: 6px; letter-spacing: 0.05em; }
.mobile-top-ad { display: none; padding: 8px 16px; background: #fff; border-bottom: 1px solid var(--border); text-align: center; }

.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--text-light); margin-bottom: 28px; }
.breadcrumb a { color: var(--primary); text-decoration: none; }
.tool-header { text-align: center; margin-bottom: 36px; }
.tool-header-icon { font-size: 3.5rem; margin-bottom: 14px; display: block; }
.tool-header h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: 8px; }
.tool-header p { color: var(--text-light); font-size: 0.95rem; }

/* 도구별 공통 UI */
.dev-panel {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.dev-label { font-size: 0.8rem; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 8px; }
.dev-textarea {
  width: 100%;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.88rem;
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  resize: vertical;
  outline: none;
  color: var(--text);
  line-height: 1.55;
  min-height: 120px;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.dev-textarea:focus { border-color: var(--primary); }
.dev-input {
  width: 100%;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.9rem;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  color: var(--text);
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.dev-input:focus { border-color: var(--primary); }
.dev-btn {
  padding: 9px 22px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.dev-btn:hover { background: var(--primary-dark); }
.dev-btn.secondary {
  background: white;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.dev-btn.secondary:hover { background: var(--primary-light); }
.dev-btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.dev-result {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.88rem;
  background: #F8F9FA;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  word-break: break-all;
  min-height: 48px;
  color: var(--text);
  position: relative;
  line-height: 1.55;
}
.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 10px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  opacity: 0.85;
  transition: opacity 0.15s;
}
.copy-btn:hover { opacity: 1; }
.dev-select {
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--text);
  background: white;
  outline: none;
  cursor: pointer;
}
.dev-select:focus { border-color: var(--primary); }
.dev-checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; color: var(--text-light); cursor: pointer; }
.dev-checkbox-row input[type=checkbox] { accent-color: var(--primary); width: 16px; height: 16px; }
.dev-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 0.88rem; margin-top: 16px; }
.alert-error { background: #FEF2F2; color: #DC2626; border: 1px solid #FECACA; }
.alert-success { background: #F0FDF4; color: #16A34A; border: 1px solid #BBF7D0; }
.alert-info { background: var(--primary-light); color: var(--primary-dark); border: 1px solid #F0D9C0; }

.features { background: white; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 40px 20px; }
.features-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; text-align: center; }
.feature-icon { font-size: 2rem; margin-bottom: 10px; }
.feature-title { font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; }
.feature-desc { font-size: 0.82rem; color: var(--text-light); line-height: 1.5; }

footer { background: #1F2937; color: #9CA3AF; padding: 44px 20px 28px; margin-top: 60px; }
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; margin-bottom: 36px; flex-wrap: wrap; }
.footer-brand .logo-footer { color: white; font-size: 1.3rem; font-weight: 700; display: block; margin-bottom: 8px; }
.footer-brand p { font-size: 0.83rem; line-height: 1.6; max-width: 260px; }
.footer-links h4 { color: white; font-size: 0.88rem; font-weight: 600; margin-bottom: 14px; }
.footer-links a { display: block; color: #9CA3AF; text-decoration: none; font-size: 0.83rem; margin-bottom: 8px; }
.footer-links a:hover { color: white; }
.footer-bottom { border-top: 1px solid #374151; padding-top: 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-bottom p { font-size: 0.8rem; }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { color: #9CA3AF; text-decoration: none; font-size: 0.8rem; }
.coupang-notice { font-size: 0.65rem; color: #9CA3AF; text-align: center; padding-top: 10px; border-top: 1px solid #374151; margin-top: 10px; }

@media (max-width: 1024px) {
  .index-with-sidebar, .page-with-sidebar { grid-template-columns: 1fr; max-width: 820px; padding: 0; }
  .index-sidebar, .tool-sidebar { display: none; }
  .index-mobile-ad, .mobile-top-ad { display: block; }
}
@media (max-width: 768px) {
  .hero h1 { font-size: 1.65rem; }
  .tools-grid { grid-template-columns: repeat(3, 1fr); }
  nav { display: none; }
  .footer-top { flex-direction: column; }
  .dev-grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .tools-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tool-card { padding: 18px 10px 14px; }
  .tool-icon { font-size: 2rem; }
  .hero { padding: 36px 20px 60px; }
}
