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

:root {
  --bg: #F7F7F5; --surface: #FFFFFF; --border: #E4E4E0;
  --text: #1A1A18; --muted: #6B6B66; --accent: #1B6AFF;
  --accent-light: #EEF3FF; --success: #16A34A; --success-light: #F0FDF4;
  --danger: #DC2626; --radius: 10px;
}

body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.6; }

.notice-bar { background: #1A1A18; color: #F7F7F5; text-align: center; font-size: 13px; padding: 10px 20px; line-height: 1.5; }
.notice-bar span { color: #7CB9FF; font-weight: 600; }

header { background: var(--surface); border-bottom: 1px solid var(--border); padding: 0 24px; }
.header-inner { max-width: 900px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-family: 'Space Grotesk', sans-serif; font-size: 20px; font-weight: 700; color: var(--text); text-decoration: none; letter-spacing: -0.5px; }
.logo span { color: var(--accent); }
nav { display: flex; gap: 8px; }
nav a { font-size: 13px; color: var(--muted); text-decoration: none; padding: 5px 10px; border-radius: 6px; transition: background 0.15s, color 0.15s; }
nav a:hover { background: var(--bg); color: var(--text); }
nav a.active { color: var(--accent); font-weight: 600; }

.ad-slot { background: var(--border); border: 1px dashed #C4C4BE; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; }
.ad-top { max-width: 900px; margin: 20px auto 0; padding: 0 24px; }
.ad-top .ad-slot { height: 90px; }
.ad-bottom { max-width: 900px; margin: 0 auto 20px; padding: 0 24px; }
.ad-bottom .ad-slot { height: 90px; }

.hero { max-width: 900px; margin: 0 auto; padding: 36px 24px 0; text-align: center; }
.hero h1 { font-family: 'Space Grotesk', sans-serif; font-size: clamp(24px, 5vw, 38px); font-weight: 700; letter-spacing: -1px; line-height: 1.15; margin-bottom: 12px; }
.hero p { color: var(--muted); font-size: 15px; max-width: 520px; margin: 0 auto 8px; }
.badge-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 16px 0 28px; }
.badge { background: var(--accent-light); color: var(--accent); font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 20px; }

.tool-card { max-width: 900px; margin: 0 auto; padding: 0 24px 40px; }

.dropzone { background: var(--surface); border: 2px dashed var(--border); border-radius: var(--radius); padding: 48px 24px; text-align: center; cursor: pointer; transition: border-color 0.2s, background 0.2s; position: relative; }
.dropzone:hover, .dropzone.dragging { border-color: var(--accent); background: var(--accent-light); }
.dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.drop-icon { width: 48px; height: 48px; margin: 0 auto 16px; display: block; }
.dropzone h2 { font-family: 'Space Grotesk', sans-serif; font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.dropzone p { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.btn-select { background: var(--accent); color: #fff; border: none; padding: 10px 24px; border-radius: 8px; font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600; cursor: pointer; pointer-events: none; display: inline-block; }

.settings-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; margin-top: 16px; display: none; }
.settings-panel.visible { display: block; }
.settings-row { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.setting-group { flex: 1; min-width: 160px; }
.setting-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.setting-group label span { font-weight: 400; color: var(--muted); margin-left: 6px; }
input[type="range"] { width: 100%; accent-color: var(--accent); cursor: pointer; }
.quality-marks { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }
input[type="number"] { width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 6px; font-family: 'Inter', sans-serif; font-size: 14px; color: var(--text); background: var(--bg); outline: none; transition: border-color 0.15s; -moz-appearance: textfield; }
input[type="number"]:focus { border-color: var(--accent); }
input[type="number"]::-webkit-outer-spin-button, input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }
.dim-info { font-size: 12px; color: var(--muted); margin-top: 5px; }
.aspect-lock-row { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 13px; color: var(--muted); cursor: pointer; }
input[type="checkbox"] { accent-color: var(--accent); cursor: pointer; width: 15px; height: 15px; }

.btn-action { background: var(--accent); color: #fff; border: none; padding: 12px 32px; border-radius: 8px; font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600; cursor: pointer; width: 100%; margin-top: 16px; transition: opacity 0.15s; display: none; }
.btn-action:hover { opacity: 0.9; }
.btn-action.visible { display: block; }

.processing-area { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px 24px; margin-top: 16px; text-align: center; display: none; }
.processing-area.visible { display: block; }
.spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; margin: 0 auto 16px; }
@keyframes spin { to { transform: rotate(360deg); } }
.processing-area p { color: var(--muted); font-size: 14px; }

.result-area { background: var(--success-light); border: 1px solid #BBF7D0; border-radius: var(--radius); padding: 24px; margin-top: 16px; display: none; }
.result-area.visible { display: block; }
.result-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.stat-box { flex: 1; min-width: 100px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; }
.stat-box .label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.stat-box .value { font-family: 'Space Grotesk', sans-serif; font-size: 20px; font-weight: 700; }
.stat-box .value.green { color: var(--success); }
.btn-download { background: var(--success); color: #fff; border: none; padding: 12px 32px; border-radius: 8px; font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600; cursor: pointer; width: 100%; transition: opacity 0.15s; }
.btn-download:hover { opacity: 0.9; }
.btn-reset { background: transparent; color: var(--muted); border: 1px solid var(--border); padding: 10px 24px; border-radius: 8px; font-family: 'Inter', sans-serif; font-size: 13px; cursor: pointer; width: 100%; margin-top: 10px; transition: background 0.15s; }
.btn-reset:hover { background: var(--bg); }

.error-msg { background: #FEF2F2; border: 1px solid #FECACA; border-radius: var(--radius); padding: 14px 18px; color: var(--danger); font-size: 13px; margin-top: 12px; display: none; }
.error-msg.visible { display: block; }

.content-section { max-width: 900px; margin: 0 auto; padding: 0 24px 40px; }
.content-section h2 { font-family: 'Space Grotesk', sans-serif; font-size: 20px; font-weight: 700; margin-bottom: 12px; margin-top: 32px; }
.content-section h2:first-child { margin-top: 0; }
.content-section p { color: var(--muted); font-size: 14px; margin-bottom: 12px; line-height: 1.7; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 16px 0 24px; }
.feature-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.feature-item .feature-title { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.feature-item p { font-size: 13px; margin: 0; }

.how-to-steps { list-style: none; counter-reset: steps; margin: 12px 0 24px; }
.how-to-steps li { counter-increment: steps; position: relative; padding: 12px 16px 12px 50px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; font-size: 14px; }
.how-to-steps li::before { content: counter(steps); position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; background: var(--accent); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }

.faq-list { margin: 12px 0; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 10px; padding: 16px; }
.faq-item dt { font-weight: 600; font-size: 14px; color: var(--text); margin-bottom: 6px; }
.faq-item dd { font-size: 13px; color: var(--muted); line-height: 1.7; margin: 0; }

.related-tools { max-width: 900px; margin: 0 auto; padding: 0 24px 40px; }
.related-tools h2 { font-family: 'Space Grotesk', sans-serif; font-size: 18px; font-weight: 700; margin-bottom: 14px; }
.tool-links { display: flex; gap: 8px; flex-wrap: wrap; }
.tool-link { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 16px; font-size: 13px; font-weight: 500; color: var(--text); text-decoration: none; transition: border-color 0.15s, color 0.15s; }
.tool-link:hover { border-color: var(--accent); color: var(--accent); }

footer { border-top: 1px solid var(--border); background: var(--surface); padding: 20px 24px; text-align: center; }
.footer-inner { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.footer-links { display: flex; gap: 16px; }
.footer-links a { font-size: 13px; color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 12px; color: var(--muted); }

.static-page { max-width: 720px; margin: 0 auto; padding: 40px 24px 60px; }
.static-page h1 { font-family: 'Space Grotesk', sans-serif; font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.static-page .page-intro { color: var(--muted); font-size: 15px; margin-bottom: 32px; }
.static-page h2 { font-family: 'Space Grotesk', sans-serif; font-size: 18px; font-weight: 700; margin: 28px 0 10px; }
.static-page p, .static-page li { color: var(--muted); font-size: 14px; line-height: 1.75; margin-bottom: 12px; }
.static-page ul { padding-left: 20px; }
.contact-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.form-group input, .form-group textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; font-family: 'Inter', sans-serif; font-size: 14px; color: var(--text); background: var(--bg); outline: none; transition: border-color 0.15s; resize: vertical; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent); }
.btn-submit { background: var(--accent); color: #fff; border: none; padding: 12px 28px; border-radius: 8px; font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600; cursor: pointer; transition: opacity 0.15s; }
.btn-submit:hover { opacity: 0.9; }

@media (max-width: 600px) {
  .header-inner { height: auto; padding: 14px 0; flex-direction: column; gap: 10px; align-items: flex-start; }
  .hero { padding: 24px 16px 0; }
  .tool-card, .content-section, .related-tools { padding-left: 16px; padding-right: 16px; }
  .ad-top, .ad-bottom { padding: 0 16px; }
  .static-page { padding: 24px 16px 40px; }
}