:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-primary-light: #eff6ff;
  --color-bg: #ffffff;
  --color-surface: #f8fafc;
  --color-text: #0f172a;
  --color-text-secondary: #334155;
  --color-muted: #64748b;
  --color-border: #e2e8f0;
  --color-border-light: #f1f5f9;
  --color-success: #10b981;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --max-width: 1140px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans KR', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font); color: var(--color-text); background: var(--color-bg); line-height: 1.75; -webkit-font-smoothing: antialiased; }
a { color: var(--color-primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-primary-dark); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { line-height: 1.3; color: var(--color-text); }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 2rem; }

/* Header */
header { border-bottom: 1px solid var(--color-border); background: var(--color-bg); position: sticky; top: 0; z-index: 100; backdrop-filter: blur(8px); background: rgba(255,255,255,0.95); }
header nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-size: 1.375rem; font-weight: 800; color: var(--color-text); letter-spacing: -0.05em; text-decoration: none; }
.logo:hover { text-decoration: none; color: var(--color-text); }
header ul { display: flex; gap: 1.75rem; list-style: none; align-items: center; }
header ul a { color: var(--color-muted); font-size: 0.875rem; font-weight: 500; transition: color 0.2s; text-decoration: none; }
header ul a:hover { color: var(--color-text); text-decoration: none; }

/* Hero */
.hero { text-align: center; padding: 5rem 0 4rem; background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f0f9ff 100%); }
.hero h1 { font-size: 2.75rem; font-weight: 800; letter-spacing: -0.04em; margin-bottom: 1.25rem; color: var(--color-text); }
.hero .subtitle { font-size: 1.2rem; color: var(--color-muted); max-width: 640px; margin: 0 auto; line-height: 1.7; }

/* Tools Grid */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; padding: 3rem 0 4rem; }
.tool-card { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.75rem; transition: all 0.2s ease; text-decoration: none; color: inherit; display: block; }
.tool-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); text-decoration: none; border-color: var(--color-primary); }
.tool-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.tool-card h2 { font-size: 1.125rem; margin-bottom: 0.5rem; font-weight: 700; }
.tool-card p { color: var(--color-muted); font-size: 0.875rem; line-height: 1.6; }

/* Features */
.features { padding: 4rem 0 5rem; }
.features h2 { text-align: center; font-size: 2rem; margin-bottom: 2.5rem; font-weight: 800; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2rem; }
.feature { text-align: center; padding: 2rem 1.5rem; }
.feature h3 { margin-bottom: 0.5rem; font-size: 1.125rem; font-weight: 700; }
.feature p { color: var(--color-muted); font-size: 0.9rem; line-height: 1.65; }

/* FAQ */
.faq { padding: 3rem 0 5rem; }
.faq h2 { text-align: center; font-size: 2rem; margin-bottom: 2rem; font-weight: 800; }
details { border: 1px solid var(--color-border); border-radius: var(--radius); margin-bottom: 0.75rem; overflow: hidden; }
summary { padding: 1rem 1.5rem; cursor: pointer; font-weight: 600; font-size: 0.95rem; background: var(--color-surface); transition: background 0.2s; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary:hover { background: #f1f5f9; }
details[open] summary { border-bottom: 1px solid var(--color-border); }
details p { padding: 1rem 1.5rem; color: var(--color-text-secondary); font-size: 0.9rem; line-height: 1.7; }

/* Footer */
footer { border-top: 1px solid var(--color-border); padding: 2.5rem 0; background: var(--color-surface); }
.footer-links { display: flex; gap: 2rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.footer-links a { color: var(--color-muted); font-size: 0.8125rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--color-text); }
footer p { color: var(--color-muted); font-size: 0.8125rem; }

/* Tool Page */
.tool-page { padding: 3rem 0 4rem; }
.tool-page h1 { font-size: 2.25rem; margin-bottom: 0.75rem; font-weight: 800; letter-spacing: -0.03em; }
.tool-page .lead { color: var(--color-muted); font-size: 1.1rem; margin-bottom: 2.5rem; max-width: 700px; line-height: 1.7; }

/* Dropzone */
.dropzone { border: 2px dashed var(--color-border); border-radius: var(--radius-lg); padding: 3.5rem 2rem; text-align: center; background: var(--color-surface); cursor: pointer; transition: all 0.2s; }
.dropzone:hover, .dropzone.dragover { border-color: var(--color-primary); background: var(--color-primary-light); }
.dropzone h3 { margin-bottom: 0.5rem; font-size: 1.125rem; font-weight: 700; }
.dropzone p { color: var(--color-muted); font-size: 0.875rem; }

/* Controls */
.controls { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; margin: 1.5rem 0; padding: 1rem 1.5rem; background: var(--color-surface); border-radius: var(--radius); border: 1px solid var(--color-border); }
.btn { padding: 0.7rem 1.5rem; border: none; border-radius: var(--radius-sm); font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; gap: 0.5rem; }
.btn-primary { background: var(--color-primary); color: white; }
.btn-primary:hover { background: var(--color-primary-dark); box-shadow: var(--shadow-md); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-secondary { background: var(--color-bg); color: var(--color-text); border: 1px solid var(--color-border); }
.btn-secondary:hover { background: var(--color-surface); border-color: var(--color-muted); }
select, input[type="number"] { padding: 0.6rem 1rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); font-size: 0.875rem; background: var(--color-bg); color: var(--color-text); transition: border-color 0.2s; }
select:focus, input:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
label { font-size: 0.875rem; font-weight: 500; color: var(--color-text-secondary); display: flex; align-items: center; gap: 0.5rem; }

/* Preview */
.preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.preview-item { border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; transition: box-shadow 0.2s; }
.preview-item:hover { box-shadow: var(--shadow-md); }
.preview-item img { width: 100%; height: 160px; object-fit: cover; }
.preview-item .info { padding: 0.875rem; font-size: 0.8125rem; color: var(--color-muted); line-height: 1.5; }

/* Content sections */
.content-section { max-width: 800px; margin: 0 auto; padding: 3.5rem 1.5rem; }
.content-section h2 { font-size: 1.75rem; margin-bottom: 1rem; font-weight: 800; letter-spacing: -0.02em; }
.content-section h3 { font-size: 1.25rem; margin: 2rem 0 0.75rem; font-weight: 700; }
.content-section p { margin-bottom: 1rem; color: var(--color-text-secondary); font-size: 1rem; line-height: 1.8; }
.content-section ol, .content-section ul { margin: 0.5rem 0 1.25rem 1.5rem; color: var(--color-text-secondary); font-size: 1rem; }
.content-section li { margin-bottom: 0.75rem; line-height: 1.75; }
.content-section strong { color: var(--color-text); font-weight: 600; }

/* Blog */
.blog-list { padding: 3rem 0 4rem; }
.blog-card { border-bottom: 1px solid var(--color-border); padding: 1.75rem 0; }
.blog-card:last-child { border-bottom: none; }
.blog-card h2 { font-size: 1.25rem; margin-bottom: 0.375rem; font-weight: 700; }
.blog-card h2 a { color: var(--color-text); }
.blog-card h2 a:hover { color: var(--color-primary); }
.blog-card .meta { color: var(--color-muted); font-size: 0.8125rem; margin-bottom: 0.5rem; }
.blog-card p { color: var(--color-text-secondary); font-size: 0.9rem; line-height: 1.65; }

/* About / Contact / Legal pages */
.page-content { max-width: 800px; margin: 0 auto; padding: 3rem 2rem 5rem; }
.page-content h1 { font-size: 2.25rem; margin-bottom: 1rem; font-weight: 800; }
.page-content h2 { font-size: 1.5rem; margin: 2.5rem 0 0.75rem; font-weight: 700; }
.page-content h3 { font-size: 1.125rem; margin: 1.75rem 0 0.5rem; font-weight: 600; }
.page-content p { margin-bottom: 1rem; color: var(--color-text-secondary); line-height: 1.8; }
.page-content ul, .page-content ol { margin: 0.5rem 0 1.25rem 1.5rem; color: var(--color-text-secondary); }
.page-content li { margin-bottom: 0.5rem; line-height: 1.75; }

/* Responsive */
@media (max-width: 768px) {
  .container { padding: 0 1.25rem; }
  .hero { padding: 3rem 0 2.5rem; }
  .hero h1 { font-size: 2rem; }
  .hero .subtitle { font-size: 1rem; }
  header ul { gap: 1rem; }
  header ul a { font-size: 0.8125rem; }
  .tools-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .controls { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; justify-content: center; padding: 0.875rem; }
  .tool-page h1 { font-size: 1.75rem; }
  .content-section h2 { font-size: 1.5rem; }
  .footer-links { flex-direction: column; gap: 0.75rem; }
  .page-content { padding: 2rem 1.25rem 4rem; }
  .page-content h1 { font-size: 1.75rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .hero { padding: 2rem 0 1.75rem; }
  .hero h1 { font-size: 1.5rem; }
  .hero .subtitle { font-size: 0.9375rem; }
  .tools-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .tool-card { padding: 1.25rem; }
  .dropzone { padding: 2rem 1rem; }
  header nav { height: 56px; }
  .logo { font-size: 1.25rem; }
  header ul { gap: 0.75rem; }
  .preview-grid { grid-template-columns: 1fr 1fr; }
  .faq { padding: 2rem 0 3rem; }
  .features { padding: 2.5rem 0 3rem; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--color-surface); }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-muted); }

/* Selection */
::selection { background: var(--color-primary); color: white; }
