 :root {
  --bg: #0b1020;
  --card: #0f172a;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --link: #60a5fa;
  --accent: #f59e0b;
  --border: #ffffff14;
  --ring: rgba(2, 6, 23, 0.6);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Noto Sans JP, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 800px at 10% -10%, var(--bg), var(--bg));
}

.container { max-width: 1100px; margin: 0 auto; padding: 20px; }
header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg,#0ea5e9 0%, #8b5cf6 50%, #f59e0b 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-weight: 800; letter-spacing: .4px; font-size: 20px;
}
header a { color: inherit; text-decoration: none; }
header .brand { font-weight: inherit; letter-spacing: inherit; font-size: inherit; }
header .brand b { font-weight: 800; }
header nav { margin-left: 12px; }
.lang-switch { display:inline-block; background: var(--accent); color:#0b1020 !important; text-decoration:none; padding:8px 12px; border-radius:12px; font-weight:800; box-shadow:0 10px 24px -12px rgba(0,0,0,.6); transition: transform .03s ease, filter .15s ease; }
.lang-switch:hover { filter: brightness(1.05); }
.lang-switch:active { transform: translateY(1px); }

.layout { display: grid; grid-template-columns: 1fr; gap: 20px; }
main { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 20px; }
aside { background: transparent; }

.row { margin: 12px 0; }
label { display: inline-block; margin-right: 8px; }
select, input[type="range"], input[type="file"] {
  font: inherit; color: var(--text);
  border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; background: #0b1224; outline: none;
}
input[type="range"] { padding: 0; height: 32px; background: transparent; }

button#convert {
  appearance: none; border: none; cursor: pointer;
  background: var(--accent); color: #0b1020; font-weight: 800;
  padding: 10px 16px; border-radius: 12px; transition: transform .03s ease, filter .15s ease;
  box-shadow: 0 10px 24px -12px rgba(0,0,0,.6);
}
button#convert:hover { filter: brightness(1.05); }
button#convert:active { transform: translateY(1px); }
button#convert:disabled { opacity: .6; cursor: not-allowed; }

.dropzone {
  border: 2px dashed var(--accent); border-radius: 14px; padding: 28px; text-align: center; color: var(--muted);
  background: #0b1224; transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.dropzone.active { border-color: #fbbf24; background: #111a32; color: #cbd5e1; }

.hint { color: var(--muted); font-size: 0.9em; }
img { max-width: 100%; height: auto; margin-top: 12px; border-radius: 12px; box-shadow: 0 8px 24px -16px rgba(0,0,0,.6); }

.progress { background:#1f2937; border-radius: 8px; overflow: hidden; height:10px; border: 1px solid var(--border); }
.progress-bar { height:10px; width:0%; background: var(--accent); transition: width .2s ease; }

/* Additional extracted styles from inline attributes */
.title { margin: 10px 0 18px 0; font-size: 22px; }
.file-name { margin-top: 6px; }
.ad-box { border-radius: 14px; }
.row #webpQualityValue { display: inline-block; width: 2.5em; text-align: right; }

/* Ad placeholders */
.ad { display: grid; place-items: center; color: #64748b; border: 1px dashed #334155; background: #0f172a90; }
.ad-top { height: 90px; border-radius: 12px; }
.ad-inline { height: 280px; border-radius: 12px; }
.ad-sidebar { position: sticky; top: 16px; }
.ad .label { font-size: 12px; letter-spacing: .04em; }

footer { margin: 28px 0 18px; text-align: center; color: #64748b; font-size: 12px; }

/* Responsive */
@media (min-width: 900px) {
  .layout { grid-template-columns: 1fr 320px; }
  .ad-inline { display: none; }
  .ad-sidebar .ad-box { width: 300px; height: 600px; border-radius: 12px; }
}
@media (max-width: 899.98px) {
  .ad-top { height: 60px; }
  .ad-sidebar { display: none; }
  .ad-inline { height: 250px; }
}
