:root {
  --sakura: #f6a6c1;
  --sakura-soft: #fdd9e6;
  --lavender: #6b3f86;
  --lavender-soft: #e6d9fb;
  --bg-1: #fdf3f8;
  --bg-2: #f2e9fb;
  --text: #4a3b52;
  --muted: #8d7a97;
  --glass-bg: rgba(255, 255, 255, 0.45);
  --glass-border: rgba(255, 255, 255, 0.6);
  --success: #4caf82;
  --danger: #e2648a;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(160deg, var(--bg-1), var(--bg-2) 60%, var(--lavender-soft));
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  position: relative;
  overflow-x: hidden;
}

.bg-blobs { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
}
.blob-1 { width: 320px; height: 320px; background: var(--sakura); top: -80px; left: -60px; }
.blob-2 { width: 380px; height: 380px; background: var(--lavender); bottom: -120px; right: -80px; }
.blob-3 { width: 220px; height: 220px; background: var(--sakura-soft); top: 40%; right: 15%; }

.wrap {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 18px 64px;
}

/* glassmorphism dasar */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow: 0 8px 32px rgba(190, 140, 190, 0.18);
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  margin-bottom: 22px;
  border-radius: 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}
.brand em { font-style: normal; color: var(--lavender); }

.auth-area {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
}
.auth-area img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--sakura-soft);
}

.hidden { display: none !important; }

.hero {
  text-align: center;
  padding: 40px 24px;
  position: relative;
}
.hero-bow {
  width: 70px;
  height: auto;
  color: var(--sakura);
  margin-bottom: 6px;
}
.hero h1 {
  font-family: 'Quicksand', sans-serif;
  font-size: 24px;
  font-weight: 700;
  margin: 8px 0;
}
.lead { color: var(--muted); margin: 0 0 22px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 7px 14px; font-size: 13px; }

.btn-primary {
  background: var(--lavender);
  color: #fff;
  box-shadow: 0 4px 16px rgba(201, 167, 242, 0.4);
}
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-ghost {
  background: rgba(255, 255, 255, 0.5);
  border-color: var(--glass-border);
  color: var(--text);
}

.btn-danger {
  background: rgba(226, 100, 138, 0.15);
  color: var(--danger);
  border-color: rgba(226, 100, 138, 0.3);
}

.btn-bow {
  width: 18px;
  height: 15px;
  display: inline-flex;
}
.btn-bow svg { width: 100%; height: 100%; }
.btn-bow.small { width: 14px; height: 12px; }

.link-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
}

.repo-bar {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  padding: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.field.grow { flex: 1; min-width: 160px; }

.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 14px;
}
.tab-btn {
  flex: none;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--glass-border);
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.tab-btn.active {
  background: var(--lavender);
  color: #fff;
  border-color: transparent;
}

.tab-panel { display: none; padding: 20px; }
.tab-panel.active { display: block; }

.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.form-inline {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.from-label { color: var(--muted); font-size: 13px; }

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.field input,
.field select,
.form-inline input,
.form-inline select,
textarea {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--glass-border);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  font-family: var(--mono);
}
textarea { font-family: inherit; resize: vertical; width: 100%; }

.field input:focus,
.field select:focus,
textarea:focus {
  outline: 2px solid var(--lavender);
  outline-offset: 1px;
}

.dropzone {
  position: relative;
  border: 1.5px dashed var(--sakura);
  border-radius: 14px;
  padding: 26px 12px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.dropzone.drag-over { border-color: var(--lavender); color: var(--text); background: rgba(255,255,255,0.5); }
.dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.result {
  margin-top: 16px;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
}
.result.ok { background: rgba(76, 175, 130, 0.12); color: var(--success); }
.result.err { background: rgba(226, 100, 138, 0.12); color: var(--danger); }
.result a { color: inherit; text-decoration: underline; }

.browse-toolbar { display: flex; gap: 8px; margin-bottom: 10px; }
.browse-toolbar input { flex: 1; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 10px; font-family: var(--mono); }

.file-list, .simple-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 320px;
  overflow-y: auto;
}
.file-list li, .simple-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px;
  cursor: pointer;
}
.file-list li:hover, .simple-list li.clickable:hover { background: rgba(255, 255, 255, 0.75); }
.file-list .icon { opacity: 0.7; }
.simple-list .meta { color: var(--muted); font-size: 12px; }
.simple-list a { color: #5b2f73; text-decoration: underline; font-weight: 700; }
.file-list li:focus-visible, .simple-list li:focus-visible, .btn:focus-visible, .tab-btn:focus-visible, a:focus-visible {
  outline: 3px solid #4b2360;
  outline-offset: 2px;
}
.svg-sprite { position: absolute; }

.file-editor { margin-top: 8px; }
.editor-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 10px;
  flex-wrap: wrap;
}
.editor-head strong { font-family: var(--mono); font-size: 13px; word-break: break-all; }
.editor-actions { display: flex; gap: 8px; }
#editorContent {
  width: 100%;
  min-height: 260px;
  font-family: var(--mono);
  font-size: 13px;
}

.checkbox { display: flex; align-items: center; gap: 8px; font-size: 14px; }

.modal {
  border: none;
  border-radius: 18px;
  padding: 22px;
  max-width: 380px;
  width: 90%;
}
.modal::backdrop { background: rgba(74, 59, 82, 0.35); backdrop-filter: blur(2px); }
.modal h2 { margin: 0 0 4px; font-family: ui-rounded, "Trebuchet MS", sans-serif; font-size: 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
