@font-face {
  font-family: "M PLUS Rounded 1c";
  src: url("assets/fonts/MPLUSRounded1c-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "M PLUS Rounded 1c";
  src: url("assets/fonts/MPLUSRounded1c-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: "M PLUS Rounded 1c";
  src: url("assets/fonts/MPLUSRounded1c-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

:root {
  --bg-1: #0f1218;
  --bg-2: #171b23;
  --card: #11141c;
  --line: #2a303d;
  --text: #f4f7ff;
  --muted: #98a2b8;
  --accent: #f9fafb;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 80% 15%, #24304a 0%, transparent 45%),
    radial-gradient(circle at 15% 80%, #2c2438 0%, transparent 45%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2));
  display: grid;
  place-items: center;
  padding: 24px;
}

.app {
  width: min(1600px, 100%);
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 20px;
}

.panel {
  background: rgba(17, 20, 28, 0.88);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  backdrop-filter: blur(8px);
}

.panel h1 {
  margin: 0 0 14px;
  font-size: 20px;
}

.group { margin-bottom: 14px; }

label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--muted);
}

input[type="text"], input[type="file"], textarea {
  width: 100%;
  background: #0d1017;
  color: var(--text);
  border: 1px solid #2b3242;
  border-radius: 10px;
  padding: 10px 11px;
  font-size: 14px;
  outline: none;
}

textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.45;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

button {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
}

#renderBtn {
  background: #e9ecf6;
  color: #121622;
  flex: 1;
}

#downloadBtn {
  background: #2a3143;
  color: #f6f7fb;
  flex: 1;
}

.preview {
  display: grid;
  align-items: center;
  justify-items: center;
}

canvas {
  width: min(100%, 960px);
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #0b0e14;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.hint {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .panel h1 { font-size: 18px; }
}

.app-version {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  font-family: "JetBrains Mono", "SFMono-Regular", monospace;
  font-size: 1rem;
  color: #d2dcf059;
  letter-spacing: 0.1rem;
  pointer-events: none;
  user-select: none;
}
