:root {
  --bg: #0c0c0c;
  --surface: #111;
  --surface2: #161616;
  --border: #222;
  --orange: #FF5C00;
  --orange-glow: rgba(255,92,0,0.1);
  --text: #e8e8e8;
  --text-dim: #555;
  --text-muted: #333;
  --mono: 'IBM Plex Mono', monospace;
  --display: 'Bebas Neue', sans-serif;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* HEADER */
header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 2.5rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}
header::after {
  content: ''; position: absolute; bottom: -1px; left: 0;
  width: 60px; height: 1px; background: var(--orange);
}
.logo {
  font-family: var(--display);
  font-size: 2.2rem; letter-spacing: 0.04em; line-height: 1;
}
.logo span { color: var(--orange); }
.header-tag { font-size: 0.62rem; color: var(--text-dim); letter-spacing: 0.08em; }

/* MAIN */
main {
  flex: 1; display: grid;
  grid-template-columns: 1fr 1px 320px;
  max-width: 1000px; width: 100%; margin: 0 auto;
  padding: 2.5rem; gap: 2.5rem;
  align-items: start;
}
.divider { background: var(--border); }

/* EDITOR */
.editor-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px; overflow: hidden;
}
.editor-titlebar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.55rem 1rem;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}
.editor-dots { display: flex; gap: 0.4rem; }
.editor-dots span { width: 8px; height: 8px; border-radius: 50%; }
.editor-dots span:nth-child(1) { background: #ff5f57; }
.editor-dots span:nth-child(2) { background: #febc2e; }
.editor-dots span:nth-child(3) { background: #28c840; }
.editor-filename { font-size: 0.62rem; color: var(--text-dim); }
.editor-lang {
  font-size: 0.58rem; color: var(--orange);
  background: var(--orange-glow); padding: 0.15rem 0.45rem; border-radius: 2px;
}

.editor-body { display: flex; }
.line-nums {
  padding: 1rem 0.75rem;
  background: var(--surface2); border-right: 1px solid var(--border);
  font-size: 0.78rem; color: var(--text-muted);
  line-height: 1.7; text-align: right; user-select: none; min-width: 2.5rem;
}
textarea {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text); font-family: var(--mono); font-size: 0.85rem;
  padding: 1rem; line-height: 1.7; resize: none; min-height: 220px;
}
textarea::placeholder { color: var(--text-muted); }

/* RIGHT PANEL */
.right-title {
  font-family: var(--display); font-size: 1.3rem; letter-spacing: 0.08em;
  color: var(--text-dim); margin-bottom: 1.25rem;
  padding-bottom: 0.6rem; border-bottom: 1px solid var(--border);
  position: relative;
}
.right-title::after {
  content: ''; position: absolute; bottom: -1px; left: 0;
  width: 36px; height: 1px; background: var(--orange);
}

.field { margin-bottom: 1rem; }
.field label {
  display: block; font-size: 0.58rem;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-dim); margin-bottom: 0.35rem;
}
.field label span { color: var(--orange); }
.field input, .field select {
  width: 100%; background: var(--surface);
  border: 1px solid var(--border); color: var(--text);
  font-family: var(--mono); font-size: 0.78rem;
  padding: 0.6rem 0.8rem; border-radius: 3px; outline: none;
  transition: border-color 0.2s;
}
.field input:focus, .field select:focus { border-color: var(--orange); }
.field select option { background: var(--surface2); }
.field input::placeholder { color: var(--text-muted); }

/* BUTTON */
.btn-create {
  width: 100%; padding: 0.9rem; margin-top: 0.5rem;
  background: var(--orange); border: none; color: #000;
  font-family: var(--display); font-size: 1.25rem; letter-spacing: 0.08em;
  cursor: pointer; border-radius: 3px; transition: all 0.2s;
  position: relative; overflow: hidden;
}
.btn-create::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  transform: translateX(-100%); transition: transform 0.4s;
}
.btn-create:hover::before { transform: translateX(100%); }
.btn-create:hover { background: #e05000; }
.btn-create:active { transform: scale(0.99); }

/* RESULT */
.result-box {
  margin-top: 1rem; background: var(--surface);
  border: 1px solid var(--orange); border-radius: 3px;
  padding: 1rem; display: none;
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.result-label {
  font-size: 0.58rem; color: var(--orange);
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.5rem;
}
.result-label::before { content: '// '; }
.result-link {
  font-size: 0.75rem; color: var(--text);
  word-break: break-all; line-height: 1.5;
}
.btn-copy {
  margin-top: 0.6rem; padding: 0.4rem 0.8rem;
  background: var(--orange-glow); border: 1px solid var(--orange);
  color: var(--orange); font-family: var(--mono); font-size: 0.68rem;
  cursor: pointer; border-radius: 2px; transition: all 0.15s;
}
.btn-copy:hover { background: var(--orange); color: #000; }

/* FOOTER */
footer {
  padding: 1rem 2.5rem; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.footer-text { font-size: 0.6rem; color: var(--text-muted); }
.footer-text span { color: var(--orange); }

/* MOBILE */
@media (max-width: 768px) {
  main { grid-template-columns: 1fr; }
  .divider { display: none; }
  header, main, footer { padding-left: 1.5rem; padding-right: 1.5rem; }
}