/* ===================================
   Kolpa.xyz - Design System & Styles
   Mobile-first responsive design
   =================================== */

/* --- CSS Custom Properties --- */
:root {
  --bg-primary: #0a0a1a;
  --bg-secondary: #12122a;
  --bg-card: rgba(25, 25, 55, 0.7);
  --bg-card-hover: rgba(35, 35, 70, 0.8);
  --bg-input: rgba(20, 20, 45, 0.8);
  --bg-glass: rgba(255, 255, 255, 0.04);

  --text-primary: #e8e8f0;
  --text-secondary: #8888aa;
  --text-muted: #555577;
  --text-link: #a78bfa;

  --accent-primary: #7c3aed;
  --accent-secondary: #a78bfa;
  --accent-gradient: linear-gradient(135deg, #7c3aed 0%, #a78bfa 50%, #c084fc 100%);
  --accent-glow: 0 0 20px rgba(124, 58, 237, 0.3);

  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.1);
  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.1);
  --warning: #f59e0b;

  --border-color: rgba(124, 58, 237, 0.15);
  --border-light: rgba(255, 255, 255, 0.06);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Global --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Animated background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(124, 58, 237, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(167, 139, 250, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(192, 132, 252, 0.03) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-secondary);
}

img {
  max-width: 100%;
  display: block;
}

/* --- Layout --- */
.app-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
}

.container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 16px;
}

/* --- Auth Pages (Login/Register) --- */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  box-shadow: var(--shadow-lg), var(--accent-glow);
  animation: slideUp 0.6s var(--transition-slow);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo h1 {
  font-size: 3.2rem;
  font-weight: 800;
  font-family: 'Permanent Marker', cursive;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.auth-logo p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 6px;
}

/* --- Forms --- */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-input);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: all var(--transition-normal);
  outline: none;
}

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

.form-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
  background: rgba(25, 25, 55, 1);
}

.form-input.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.field-error {
  display: none;
  font-size: 0.8rem;
  color: var(--danger);
  margin-top: 5px;
  animation: fadeIn 0.2s ease;
}

.field-error.visible {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  outline: none;
  -webkit-appearance: none;
  min-height: 48px;
  min-width: 48px;
}

.btn-primary {
  width: 100%;
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: var(--accent-glow);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(124, 58, 237, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 8px 14px;
  font-size: 0.85rem;
  min-height: 36px;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 14px;
  font-size: 0.85rem;
  min-height: 36px;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-glass);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
  min-height: 36px;
}

/* Loading spinner on button */
.btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn.loading::after {
  content: '';
  width: 18px;
  height: 18px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.auth-footer a {
  font-weight: 600;
}

/* --- Header / Navbar --- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 26, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  padding: 0 16px;
}

.navbar-inner {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: 'Permanent Marker', cursive;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-glass);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-primary);
  text-decoration: none;
}

.navbar-user:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.user-avatar-sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.navbar-username {
  font-size: 0.85rem;
  font-weight: 600;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-logout {
  background: none;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 36px;
}

.btn-logout:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: var(--danger-bg);
}

/* --- Notification Bell --- */
.navbar-notif {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  font-size: 1.15rem;
  line-height: 1;
  transition: all var(--transition-fast);
  border-radius: 50%;
}

.navbar-notif:hover {
  background: rgba(255, 255, 255, 0.06);
}

.notif-icon {
  display: block;
}

.notif-badge {
  position: absolute;
  top: 0;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: #f43f5e;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  animation: badgePop 0.3s ease;
  box-shadow: 0 0 8px rgba(244, 63, 94, 0.5);
}

@keyframes badgePop {
  0% {
    transform: scale(0);
  }

  60% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
  }
}

.notif-dropdown {
  display: none;
  position: absolute;
  top: 55px;
  right: 16px;
  width: 320px;
  max-width: calc(100vw - 32px);
  background: rgba(15, 15, 35, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  z-index: 300;
  animation: fadeInUp 0.2s ease;
  overflow: hidden;
}

.notif-dropdown.active {
  display: block;
}

.notif-header {
  padding: 14px 16px;
  font-weight: 700;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
}

.notif-list {
  max-height: 300px;
  overflow-y: auto;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition-fast);
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.notif-item-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.notif-item-text {
  flex: 1;
  min-width: 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.notif-item-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

.notif-item-text .notif-snippet {
  color: var(--text-muted);
  font-style: italic;
}

.notif-item-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.notif-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.notif-unread {
  background: rgba(124, 58, 237, 0.06);
  border-left: 3px solid var(--accent-primary);
}

/* --- @Mention Autocomplete --- */
.mention-dropdown {
  display: none;
  position: absolute;
  bottom: calc(100% + 4px);
  left: 0;
  right: 0;
  background: rgba(15, 15, 35, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-height: 200px;
  overflow-y: auto;
  z-index: 200;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
  animation: fadeInUp 0.15s ease;
}

.mention-dropdown.active {
  display: block;
}

.mention-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.mention-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.mention-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.mention-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mention-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.mention-handle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --- @Mention Link in Content --- */
.mention-link {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition-fast);
}

.mention-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* --- Search Bar --- */
.search-wrapper {
  background: rgba(10, 10, 26, 0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  padding: 8px 16px;
  position: sticky;
  top: 60px;
  z-index: 99;
}

.search-box {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  pointer-events: none;
  z-index: 2;
  opacity: 0.5;
}

.search-input {
  width: 100%;
  padding: 10px 16px 10px 38px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  outline: none;
  transition: all var(--transition-fast);
}

.search-input:focus {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.15);
}

.search-input::placeholder {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.search-results {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: rgba(15, 15, 35, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-height: 400px;
  overflow-y: auto;
  z-index: 200;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 0.2s ease;
}

.search-results.active {
  display: block;
}

.search-section-title {
  padding: 10px 16px 6px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background var(--transition-fast);
  text-decoration: none;
  color: var(--text-primary);
}

.search-result-item:hover {
  background: var(--bg-glass);
  color: var(--text-primary);
}

.search-result-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.search-result-info {
  min-width: 0;
  flex: 1;
}

.search-result-name {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-meta {
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-no-results {
  padding: 20px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* --- Like Button --- */
.kolpa-like {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  color: rgba(244, 63, 94, 0.5);
  cursor: pointer;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-family: var(--font-sans);
  transition: all var(--transition-fast);
  min-height: 32px;
}

.kolpa-like:hover {
  color: #f43f5e;
  background: rgba(244, 63, 94, 0.08);
}

.kolpa-like.liked {
  color: #f43f5e;
}

.kolpa-like.liked .like-icon {
  animation: likePopIn 0.3s ease;
}

@keyframes likePopIn {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.4);
  }

  100% {
    transform: scale(1);
  }
}

.like-icon {
  font-size: 1.2rem;
  line-height: 1;
  font-style: normal;
  transition: transform var(--transition-fast);
}

.like-count {
  font-weight: 600;
  font-size: 0.8rem;
}

.kolpa-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* --- Feed Page --- */
.feed-header {
  text-align: center;
  padding: 28px 0 20px;
}

.feed-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
}

.feed-header h2 span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: 'Permanent Marker', cursive;
  letter-spacing: 2px;
}

/* --- Compose Box --- */
.compose-box {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-normal);
}

.compose-box:focus-within {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-sm), 0 0 0 1px rgba(124, 58, 237, 0.2);
}

.compose-textarea {
  width: 100%;
  min-height: 80px;
  max-height: 200px;
  resize: vertical;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.5;
  outline: none;
  padding: 0;
}

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

.compose-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}

.char-counter {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.char-counter.warning {
  color: var(--warning);
}

.char-counter.danger {
  color: var(--danger);
}

.char-counter.over {
  color: var(--danger);
  font-weight: 700;
}

.btn-kolpa {
  padding: 10px 24px;
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--accent-glow);
  min-height: 44px;
}

.btn-kolpa:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 24px rgba(124, 58, 237, 0.4);
}

.btn-kolpa:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

/* --- Kolpa Cards --- */
.kolpa-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kolpa-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  transition: all var(--transition-normal);
  animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.kolpa-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color);
}

.kolpa-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.kolpa-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.kolpa-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.kolpa-names {
  min-width: 0;
}

.kolpa-display-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kolpa-username-link {
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: none;
}

.kolpa-username-link:hover {
  color: var(--accent-secondary);
  text-decoration: underline;
}

.kolpa-content {
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--text-primary);
  word-wrap: break-word;
  overflow-wrap: break-word;
  margin-bottom: 10px;
  white-space: pre-wrap;
}

.kolpa-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kolpa-time {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.kolpa-edit,
.kolpa-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: var(--font-sans);
  transition: all var(--transition-fast);
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.kolpa-edit:hover {
  color: var(--accent-primary);
  background: rgba(124, 58, 237, 0.1);
}

.kolpa-delete:hover {
  color: var(--danger);
  background: var(--danger-bg);
}

/* --- Edit Modal --- */
.edit-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.15s ease;
}

.edit-modal {
  background: rgba(15, 15, 40, 0.95);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 480px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(124, 58, 237, 0.15);
  animation: fadeInUp 0.2s ease;
}

.edit-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 12px;
  border-bottom: 1px solid var(--border-color);
}

.edit-modal-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}

.edit-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  line-height: 1;
}

.edit-modal-close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.edit-modal-textarea {
  width: 100%;
  min-height: 100px;
  padding: 16px 20px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  box-sizing: border-box;
}

.edit-modal-textarea:focus {
  background: rgba(124, 58, 237, 0.03);
}

.edit-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border-color);
}

.edit-modal-counter {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.edit-modal-buttons {
  display: flex;
  gap: 8px;
}

.edit-modal-btn {
  padding: 8px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
}

.edit-modal-btn.cancel {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

.edit-modal-btn.cancel:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.edit-modal-btn.save {
  background: var(--accent-gradient);
  color: #fff;
}

.edit-modal-btn.save:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.edit-modal-btn.save:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* --- Profile Page --- */
.profile-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  text-align: center;
  margin: 24px 0;
  box-shadow: var(--shadow-md);
  animation: slideUp 0.4s ease;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  margin: 0 auto 16px;
  box-shadow: var(--accent-glow);
}

.profile-display-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.profile-username {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.profile-bio {
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.5;
}

.profile-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.profile-actions {
  margin-top: 16px;
}

/* --- Edit Profile Modal --- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  width: 100%;
  max-width: 420px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.modal-actions .btn {
  flex: 1;
}

/* --- Toast Notifications --- */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
  width: calc(100% - 40px);
}

.toast {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  animation: toastIn 0.3s ease;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.toast::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  animation: toastTimer 3s linear forwards;
}

@keyframes toastTimer {
  from {
    width: 100%;
  }

  to {
    width: 0;
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(40px);
  }
}

.toast-success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: var(--success);
}

.toast-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger);
}

/* --- Loading States --- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, rgba(50, 50, 80, 0.5) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.feed-loading,
.feed-empty {
  text-align: center;
  padding: 48px 0;
  color: var(--text-muted);
}

.feed-empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.load-more-container {
  text-align: center;
  padding: 24px 0 48px;
}

.btn-load-more {
  padding: 12px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--accent-secondary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  min-height: 44px;
}

.btn-load-more:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
}

/* --- Safe Area (iOS notch) --- */
.feed-page {
  padding-bottom: env(safe-area-inset-bottom, 24px);
}

/* --- Responsive Breakpoints --- */

/* Small phones (< 380px) */
@media (max-width: 380px) {
  .auth-card {
    padding: 28px 20px;
  }

  .auth-logo h1 {
    font-size: 2rem;
  }

  .compose-box {
    padding: 14px;
  }

  .kolpa-card {
    padding: 12px 14px;
  }

  .navbar-username {
    display: none;
  }
}

/* Tablets (768px+) */
@media (min-width: 768px) {
  .auth-card {
    padding: 48px 40px;
  }

  .feed-header h2 {
    font-size: 1.5rem;
  }

  .compose-textarea {
    font-size: 1.1rem;
  }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
  .container {
    max-width: 640px;
  }

  .kolpa-card:hover {
    transform: translateX(2px);
  }
}

/* Dark mode scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(124, 58, 237, 0.5);
}

/* Utility */
.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}