/*
 * links.css — Styles for the public links page and admin link forms
 */

/* ── Public links page ──────────────────────────────────── */

.links-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem;
}

.links-header {
  margin-bottom: 2.5rem;
}

.links-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 1.8rem;
  color: #1c1f26;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.links-subtitle {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: #6b7a8a;
}

/* ── Link cards ─────────────────────────────────────────── */

.links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.link-card {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(60, 70, 90, 0.10);
  border-radius: 2px;
  padding: 1.2rem 1.5rem;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 1px 4px rgba(28, 31, 38, 0.06);
}

.link-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: #3d6b8f;
  opacity: 0.5;
  border-radius: 2px 0 0 2px;
}

.link-card:hover {
  transform: translateX(3px);
  box-shadow: 0 2px 12px rgba(28, 31, 38, 0.10);
}

.link-card__meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.5rem;
}

.link-card__category {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: #3d6b8f;
  padding: 0.15em 0.6em;
  border-radius: 2px;
  opacity: 0.85;
}

.link-card__date {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: #9ca3af;
}

.link-card__title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: #1c1f26;
  text-decoration: none;
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}

.link-card__title:hover {
  color: #3d6b8f;
}

.link-card__arrow {
  font-size: 0.85em;
  opacity: 0.5;
  transition: opacity 0.2s, transform 0.2s;
}

.link-card__title:hover .link-card__arrow {
  opacity: 1;
  transform: translate(2px, -2px);
}

.link-card__desc {
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 1rem;
  color: #4a5568;
  line-height: 1.6;
  margin: 0;
}

/* ── Load more ──────────────────────────────────────────── */

.links-more {
  text-align: center;
  margin-top: 2rem;
}

.btn-load-more {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #3d6b8f;
  background: transparent;
  border: 1px solid #3d6b8f;
  padding: 0.6em 1.8em;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s;
}

.btn-load-more:hover:not(:disabled) {
  background: #3d6b8f;
  color: #fff;
}

.btn-load-more:disabled {
  opacity: 0.5;
  cursor: wait;
}

.links-empty {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.82rem;
  color: #9ca3af;
  letter-spacing: 0.1em;
  text-align: center;
  padding: 3rem 0;
}

/* ── Admin: links ───────────────────────────────────────── */

.admin-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.admin-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: #1c1f26;
  letter-spacing: 0.05em;
}

.btn-admin-add {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: #3d6b8f;
  color: #fff;
  padding: 0.5em 1.2em;
  text-decoration: none;
  border-radius: 2px;
  transition: background 0.2s;
}

.btn-admin-add:hover { background: #2d5070; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.78rem;
}

.admin-table th {
  text-align: left;
  padding: 0.6rem 0.8rem;
  border-bottom: 2px solid rgba(60, 70, 90, 0.15);
  color: #6b7a8a;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-table td {
  padding: 0.8rem;
  border-bottom: 1px solid rgba(60, 70, 90, 0.08);
  color: #1c1f26;
  vertical-align: top;
}

.admin-table tr:hover td {
  background: rgba(61, 107, 143, 0.04);
}

.admin-link-url {
  color: #3d6b8f;
  text-decoration: none;
}

.admin-link-url:hover { text-decoration: underline; }

.admin-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.admin-actions a {
  color: #3d6b8f;
  text-decoration: none;
  font-size: 0.75rem;
}

.btn-admin-delete {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.72rem;
  color: #cc4444;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  letter-spacing: 0.05em;
}

.btn-admin-delete:hover { text-decoration: underline; }

.admin-empty {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.82rem;
  color: #9ca3af;
  padding: 2rem 0;
}

.admin-error {
  background: rgba(204, 68, 68, 0.1);
  border: 1px solid rgba(204, 68, 68, 0.3);
  color: #cc4444;
  padding: 0.8rem 1rem;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.78rem;
  margin-bottom: 1.5rem;
  border-radius: 2px;
}

.admin-back {
  margin-top: 2rem;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.75rem;
}

.admin-back a {
  color: #6b7a8a;
  text-decoration: none;
}

/* ── Admin form ─────────────────────────────────────────── */

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  max-width: 600px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b7a8a;
}

.form-group input,
.form-group textarea {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.85rem;
  color: #1c1f26;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(60, 70, 90, 0.2);
  border-radius: 2px;
  padding: 0.6rem 0.8rem;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #3d6b8f;
}

.form-group textarea {
  resize: vertical;
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 0.95rem;
  line-height: 1.6;
}

.form-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 0.5rem;
}

.btn-admin-save {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: #3d6b8f;
  color: #fff;
  border: none;
  padding: 0.6em 1.6em;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.2s;
}

.btn-admin-save:hover { background: #2d5070; }

.btn-admin-cancel {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6b7a8a;
  text-decoration: none;
  transition: color 0.2s;
}

.btn-admin-cancel:hover { color: #1c1f26; }
