:root {
  --bg-body: #f3f4f9;
  --bg-card: #ffffff;
  --border-subtle: #e1e4f0;
  --text-main: #14172a;
  --text-muted: #6b7280;
  --accent: #2563eb;
  --accent-soft: #e0edff;
  --danger-soft: #ffe4e6;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.08);
  --radius-lg: 18px;
  --radius-pill: 999px;
  --spacing: 1.2rem;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--text-main);
  background: radial-gradient(circle at top, #e0edff 0, #f9fafb 45%, #f3f4f9 100%);
}

.page {
  max-width: 820px;
  margin: 2.5rem auto;
  padding: 0 1rem 3rem;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.page-header h1 {
  margin: 0;
  font-size: 1.8rem;
  color: blue;
}

.subtitle {
  margin: 0.15rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* === Cards === */

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: var(--spacing);
  margin-bottom: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

/* === New post composer === */

.compose-card h2 {
  margin-top: 0;
  margin-bottom: 0.6rem;
  font-size: 1.1rem;
}

.compose-form textarea {
  width: 100%;
  resize: vertical;
}

.compose-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 0.6rem;
  flex-wrap: wrap;
}

.file-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.9rem;
  cursor: pointer;
}

.file-input {
  display: none;
}

/* === Posts === */

.post-card {
  padding-bottom: 0.7rem;
}

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

.post-author {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.avatar-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
}

.author-name {
  font-weight: 600;
}

.muted {
  color: var(--text-muted);
}

.small {
  font-size: 0.8rem;
}

.post-body p {
  margin: 0.4rem 0 0.6rem;
}

.post-image {
  display: flex;
  justify-content: center;
}

.post-image img {
  max-width: 100%;
  border-radius: 12px;
  margin-top: 0.4rem;
}

.post-image img.is-portrait {
  max-width: min(360px, 70%);
  width: auto;
}

.post-footer {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 0.3rem;
}

.comments {
  margin-top: 0.4rem;
}

.comments.is-collapsed {
  display: none;
}

.comment-form {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

/* === Inputs & Buttons === */

.input {
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  padding: 0.5rem 0.7rem;
  font: inherit;
  width: 100%;
  box-sizing: border-box;
}

.input:focus {
  outline: 2px solid rgba(37, 99, 235, 0.5);
  border-color: transparent;
}

.btn {
  border-radius: var(--radius-pill);
  border: none;
  padding: 0.35rem 0.9rem;
  font: inherit;
  cursor: pointer;
  background: #e5e7eb;
  color: #111827;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.btn.primary {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: white;
}

.btn.ghost {
  background: transparent;
  border: 1px solid #cbd5e1;
  color: var(--text-muted);
}

.btn.small {
  padding: 0.25rem 0.7rem;
  font-size: 0.85rem;
}

.btn-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* container kolem pilulky + menu */
.user-menu {
  position: relative;
}

/* tlačítko s pilulkou */
.user-menu-btn {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

/* už existuje .user-pill, jen aby to bylo jisté */
.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
}

/* dropdown */
.user-menu-dropdown {
  position: absolute;
  right: 0;
  margin-top: 0.5rem;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
  padding: 0.3rem 0;
  min-width: 180px;
  z-index: 200;
  display: none; /* defaultně schované */
}

.user-menu-dropdown a,
.user-menu-link-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.9rem;
  font-size: 0.9rem;
  text-decoration: none;
  color: #111827;
  background: transparent;
  border: none;
  cursor: pointer;
}

.user-menu-dropdown a:hover,
.user-menu-link-btn:hover {
  background: #f3f4f6;
}

