* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, "Malgun Gothic", "맑은 고딕", sans-serif;
  background: #f5f7fb;
  color: #222;
}

h1, h2 {
  margin-top: 0;
}

a {
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: #1f2937;
  color: white;
}

.admin-link {
  background: #2563eb;
  color: white;
  padding: 10px 14px;
  border-radius: 8px;
}

.admin-link:hover {
  background: #1d4ed8;
}

.container {
  max-width: 1100px;
  margin: 24px auto;
  padding: 0 16px;
}

.card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.muted {
  color: #666;
}

.message {
  margin-top: 12px;
  color: #0f766e;
  white-space: pre-line;
}

.menu-section,
.code-section {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
}

.menu-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.menu-buttons button {
  border: none;
  background: #e5e7eb;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
}

.menu-buttons button.active {
  background: #2563eb;
  color: white;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.copy-btn {
  border: none;
  background: #111827;
  color: white;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
}

.copy-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.code-block {
  background: #0b1020;
  color: #e5f0ff;
  padding: 16px;
  border-radius: 10px;
  overflow-x: auto;
  min-height: 280px;
  margin-top: 16px;
}

.admin-container {
  max-width: 1280px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.stack-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stack-form input[type="text"],
.stack-form input[type="password"],
.stack-form textarea,
.stack-form label input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}

.stack-form textarea {
  resize: vertical;
  min-height: 280px;
  font-family: Consolas, Monaco, monospace;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

button {
  border: none;
  background: #2563eb;
  color: white;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
}

button:hover {
  background: #1d4ed8;
}

button.secondary {
  background: #6b7280;
}

button.secondary:hover {
  background: #4b5563;
}

button.danger {
  background: #dc2626;
}

button.danger:hover {
  background: #b91c1c;
}

button.danger-light {
  background: #ef4444;
}

button.danger-light:hover {
  background: #dc2626;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-item {
  border: 1px solid #dbeafe;
  background: #f8fbff;
  border-radius: 10px;
  padding: 14px;
}

.admin-item-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.admin-item-title {
  font-weight: bold;
  margin-bottom: 6px;
}

.admin-item-meta {
  font-size: 14px;
  color: #555;
}

.admin-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

@media (max-width: 900px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .top-bar,
  .code-header,
  .admin-list-header,
  .admin-item-top {
    flex-direction: column;
    align-items: stretch;
  }
}