@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700&display=swap");

:root {
  color-scheme: dark;
  --bg: #05070d;
  --bg-alt: #0a0f1f;
  --primary: #0c1b3a;
  --primary-strong: #10224f;
  --accent: #1f3a7a;
  --text: #e6ecff;
  --muted: #a3b1d4;
  --border: rgba(125, 140, 180, 0.2);
  --glow: rgba(35, 70, 150, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at top left, #0c1b3a 0%, #05070d 40%, #000 100%);
  color: var(--text);
  min-height: 100vh;
}

.panel {
  max-width: 980px;
  margin: 0 auto;
  padding: 80px 24px;
}

.login-card,
.panel-card {
  background: linear-gradient(135deg, rgba(16, 34, 79, 0.9), rgba(5, 7, 13, 0.95));
  border-radius: 24px;
  border: 1px solid var(--border);
  padding: 32px;
  box-shadow: 0 25px 80px rgba(2, 6, 20, 0.7);
}

.hidden {
  display: none;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.card-header h1 {
  font-size: clamp(1.8rem, 2.6vw, 2.4rem);
}

.card-header p {
  color: var(--muted);
}

.card-form {
  display: grid;
  gap: 18px;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 500;
}

input,
textarea {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 0.95rem;
}

input:focus,
textarea:focus {
  outline: 2px solid rgba(31, 58, 122, 0.5);
  border-color: rgba(31, 58, 122, 0.5);
}

button {
  border: none;
  border-radius: 999px;
  padding: 12px 24px;
  font-weight: 600;
  background: linear-gradient(120deg, #1f3a7a, #10224f);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 30px var(--glow);
}

button:hover {
  transform: translateY(-2px);
}

button.ghost {
  background: transparent;
  border: 1px solid var(--border);
  box-shadow: none;
}

.hint {
  color: var(--muted);
  font-size: 0.85rem;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.posts {
  margin-top: 32px;
}

.posts h2 {
  margin-bottom: 16px;
}

.posts-list {
  display: grid;
  gap: 16px;
}

.tag-input {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
}

.tag-input input {
  border: none;
  background: transparent;
  padding: 6px 4px;
  min-width: 160px;
  flex: 1;
}

.tag-input input:focus {
  outline: none;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(10, 15, 31, 0.5);
  font-size: 0.85rem;
}

.tag button {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  box-shadow: none;
}

.tag button:hover {
  color: var(--text);
}

.post-item {
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  display: grid;
  gap: 6px;
}

.post-item h3 {
  font-size: 1.1rem;
}

.post-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.post-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.post-actions button {
  padding: 8px 16px;
  font-size: 0.85rem;
}

@media (max-width: 720px) {
  .card-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
