@import url("https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&display=swap");

:root {
  --bg-top: #a8edea;
  --bg-bottom: #fed6e3;
  --surface: rgba(255, 255, 255, 0.92);
  --border: #ffeaa7;
  --text: #2d3436;
  --muted: #636e72;
  --accent: #6c5ce7;
  --accent-hover: #5b4cdb;
  --sun: #ffd93d;
  --success: #27ae60;
  --error: #e74c3c;
  font-family: "Baloo 2", "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  line-height: 1.5;
  background: linear-gradient(165deg, var(--bg-top) 0%, var(--bg-bottom) 50%, #ffecd2 100%);
  background-attachment: fixed;
}

.layout {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.layout.center {
  text-align: center;
  padding-top: 4rem;
}

.hero {
  text-align: center;
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 5vw, 2.35rem);
  font-weight: 800;
  color: var(--accent);
  text-shadow: 2px 2px 0 #fff;
}

.hero .emoji-row {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.hero p {
  color: var(--muted);
  margin: 0 0 2rem;
  font-weight: 600;
  font-size: 1.05rem;
}

.hero code {
  background: #fff;
  padding: 0.15rem 0.45rem;
  border-radius: 8px;
  font-size: 0.9em;
  border: 2px solid #81ecec;
}

.card {
  background: var(--surface);
  border: 4px solid var(--border);
  border-radius: 20px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 24px rgba(108, 92, 231, 0.12);
}

.card h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: #fd79a8;
}

label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  font-weight: 600;
}

input[type="text"],
input[type="file"],
textarea {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.6rem 0.75rem;
  border: 3px solid #81ecec;
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  font-weight: 600;
}

textarea {
  resize: vertical;
  min-height: 5rem;
  line-height: 1.45;
}

.hint {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}

.preview-url {
  font-size: 0.95rem;
  color: var(--accent);
  word-break: break-all;
  font-weight: 700;
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  border: none;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: transform 0.12s;
}

.btn:active {
  transform: translateY(2px);
}

.btn.primary {
  background: var(--sun);
  color: var(--text);
  box-shadow: 0 5px 0 #f9ca24;
}

.btn.primary:hover {
  background: #ffe066;
}

.message {
  margin-top: 1rem;
  min-height: 1.5rem;
  font-weight: 600;
}

.message.ok {
  color: var(--success);
}

.message.err {
  color: var(--error);
}

.model-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.model-item {
  padding: 0.85rem;
  background: #fff;
  border-radius: 16px;
  border: 3px solid #dfe6e9;
}

.model-item-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}

.model-item-main strong {
  font-size: 1.1rem;
  color: var(--accent);
}

.model-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-left: auto;
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  background: #dfe6e9;
  border: none;
  border-radius: 10px;
  box-shadow: 0 3px 0 #b2bec3;
}

.btn-copy-link {
  background: #ffd93d;
  box-shadow: 0 3px 0 #f9ca24;
}

.btn-sm.primary {
  background: var(--sun);
  color: var(--text);
  box-shadow: 0 3px 0 #f9ca24;
}

.btn-danger {
  background: #fab1a0;
  box-shadow: 0 3px 0 #e17055;
  color: #2d3436;
}

.model-edit-form {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 3px dashed #dfe6e9;
}

.model-edit-form label {
  margin-bottom: 0.75rem;
}

.edit-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.model-item a {
  color: #0984e3;
  font-weight: 700;
}

.model-item .meta {
  font-size: 0.85rem;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}
