@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;700&display=swap');

:root {
  color-scheme: dark;
  color: #111;
  background: #f7f6f2;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  background: #f7f6f2;
  color: #111;
}

.page {
  min-height: 100vh;
  padding: 1.5rem 0 3rem;
}

.container {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 0 1rem;
}

.cover {
  background: #fff;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(15, 15, 15, 0.12);
}

.cover__image {
  width: 100%;
  height: min(45vh, 320px);
  object-fit: cover;
  display: block;
}

.cover__text {
  padding: 1.75rem 1.5rem 2rem;
  text-align: center;
}

.cover__brand {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cover__logo {
  width: 200px;
  height: auto;
  display: block;
}

.cover__text h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.04em;
}

.cover__text p {
  margin: 1rem auto 0;
  max-width: 42rem;
  color: #555;
  line-height: 1.7;
}

.links {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.link-button {
  display: block;
  width: 100%;
  text-decoration: none;
  background: #111;
  color: #fff;
  padding: 1.15rem 1.25rem;
  border-radius: 6px;
  font-weight: 400;
  font-family: 'Montserrat', sans-serif;
  text-align: center;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 18px 42px rgba(15, 15, 15, 0.12);
}

.link-button:hover {
  transform: translateY(-1px);
  background: #222;
}

.empty {
  color: #666;
  text-align: center;
  padding: 1.5rem 0;
  border-radius: 22px;
  background: #fff;
  border: 1px solid #eee;
}

.admin-shell {
  background: #fff;
  border-radius: 30px;
  padding: 1.5rem;
  box-shadow: 0 20px 60px rgba(15, 15, 15, 0.12);
}

.admin-section {
  margin-bottom: 1.75rem;
  padding: 1.25rem;
  border: 1px solid #eee;
  border-radius: 24px;
  background: #fafafa;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-header--space-between {
  justify-content: space-between;
  flex-wrap: wrap;
}

.section-header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.section-description {
  margin: 0.35rem 0 0;
  color: #555;
  font-size: 0.95rem;
}

.admin-field {
  margin-bottom: 1rem;
}

.admin-field label {
  display: block;
  margin-bottom: 0.55rem;
  color: #333;
  font-weight: 600;
}

.admin-field input,
.admin-field textarea,
.admin-field button,
.admin-field select {
  width: 100%;
  border: 1px solid #e2e2e2;
  border-radius: 16px;
  padding: 0.95rem 1rem;
  font: inherit;
}

.admin-field textarea {
  min-height: 110px;
  resize: vertical;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.admin-actions button {
  flex: 1 1 auto;
  min-width: 160px;
  border: none;
  border-radius: 18px;
  background: #111;
  color: #fff;
  cursor: pointer;
  padding: 0.95rem 1.1rem;
  font-weight: 700;
}

.admin-actions button.secondary {
  background: #f4f4f4;
  color: #111;
}

.message {
  margin-top: 0.5rem;
  font-weight: 600;
}

.message.error {
  color: #b00020;
}

.message.success {
  color: #116530;
}

.link-card {
  border: 1px solid #ececec;
  border-radius: 22px;
  overflow: hidden;
  display: grid;
  gap: 0;
  margin-bottom: 1rem;
}

.link-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: #f5f5f5;
  cursor: pointer;
}

.link-card-title {
  font-weight: 700;
  color: #111;
}

.toggle-card {
  border: none;
  background: transparent;
  color: #3182ce;
  font-weight: 700;
  cursor: pointer;
}

.link-card-body {
  display: none;
  padding: 1rem 1.25rem 1.25rem;
  background: #fff;
}

.link-card:not(.collapsed) .link-card-body {
  display: block;
}

.link-card:not(.collapsed) .toggle-card {
  color: #c53030;
}

.link-card .link-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: center;
}

.link-card .link-row button,
.link-card .link-actions button {
  border: 1px solid #ddd;
  background: #fafafa;
  color: #111;
  border-radius: 14px;
  padding: 0.7rem 0.95rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.link-card .link-row button:hover,
.link-card .link-actions button:hover {
  background: #f0f0f0;
}

.link-card .link-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.link-card .link-actions button.move-up {
  border-color: #2f855a;
  background: #e6ffed;
  color: #2f855a;
}

.link-card .link-actions button.move-down {
  border-color: #3182ce;
  background: #e7f0ff;
  color: #2b6cb0;
}

.link-card .link-actions button.remove-link {
  border-color: #e53e3e;
  background: #ffe8e8;
  color: #c53030;
}

.link-card .link-actions button.move-up:hover {
  background: #d3f5d9;
}

.link-card .link-actions button.move-down:hover {
  background: #dbeeff;
}

.link-card .link-actions button.remove-link:hover {
  background: #ffd6d6;
}

.link-card small {
  color: #666;
}

.message {
  min-height: 1.4rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.message.error {
  color: #b00020;
}

.message.success {
  color: #116530;
}

.preview-image {
  width: 100%;
  border-radius: 18px;
  object-fit: cover;
  margin-top: 0.5rem;
}

button[type="submit"] {
  width: 100%;
}

@media (max-width: 720px) {
  .cover__text {
    padding: 1.25rem 1rem 1.5rem;
  }

  .admin-actions {
    flex-direction: column;
  }
}
