/* ===== Braun × Apple Inspired Monochromatic Theme ===== */
:root {
  --background: #fcfcfc;
  --foreground: #171717;
  --card: #fcfcfc;
  --card-foreground: #171717;
  --primary: #171717;
  --primary-foreground: #fcfcfc;
  --secondary: #f5f5f5;
  --secondary-foreground: #171717;
  --muted: #f5f5f5;
  --muted-foreground: #737373;
  --accent: #525252;
  --accent-foreground: #fcfcfc;
  --border: #e5e5e5;
  --border-subtle: rgba(229, 229, 229, 0.4);
  --error: #dc2626;
  --success: #16a34a;
  --radius: 1rem;
}

[data-theme="dark"] {
  --background: #171717;
  --foreground: #f5f5f5;
  --card: #1f1f1f;
  --card-foreground: #f5f5f5;
  --primary: #f5f5f5;
  --primary-foreground: #171717;
  --secondary: #262626;
  --secondary-foreground: #f5f5f5;
  --muted: #262626;
  --muted-foreground: #a3a3a3;
  --accent: #a3a3a3;
  --accent-foreground: #171717;
  --border: #333333;
  --border-subtle: rgba(51, 51, 51, 0.4);
  --error: #ef4444;
  --success: #22c55e;
}

[data-theme="retro"] {
  --background: #0a0a0f;
  --foreground: #00ff9f;
  --card: #12121a;
  --card-foreground: #00ff9f;
  --primary: #00ff9f;
  --primary-foreground: #0a0a0f;
  --secondary: #1a1a2e;
  --secondary-foreground: #00ff9f;
  --muted: #1a1a2e;
  --muted-foreground: #00d9ff;
  --accent: #ff00ff;
  --accent-foreground: #0a0a0f;
  --border: #ff00ff;
  --border-subtle: rgba(255, 0, 255, 0.3);
  --error: #ff0055;
  --success: #00ff9f;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--foreground);
}

/* ===== Retro Theme Special Effects ===== */
[data-theme="retro"] body {
  font-family: "SF Mono", "Courier New", monospace;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.15) 2px,
      rgba(0, 0, 0, 0.15) 4px
    );
}

[data-theme="retro"] .nav-logo,
[data-theme="retro"] h1,
[data-theme="retro"] h2 {
  text-shadow:
    0 0 5px var(--foreground),
    0 0 10px var(--foreground),
    0 0 20px var(--foreground);
}

[data-theme="retro"] .btn-primary {
  box-shadow:
    0 0 10px var(--primary),
    0 0 20px var(--primary);
}

[data-theme="retro"] .meep {
  box-shadow: 0 0 15px var(--border-subtle);
}

/* ===== Layout ===== */
.app-layout {
  display: flex;
  max-width: 1280px;
  margin: 0 auto;
  min-height: 100vh;
}

/* ===== Sidebar ===== */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-right: 1px solid var(--border-subtle);
  padding: 2rem 0;
}

@media (min-width: 1024px) {
  .sidebar {
    width: 260px;
    align-items: flex-start;
    padding: 2rem 1.5rem;
  }
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  margin-bottom: 2rem;
  border-radius: 9999px;
  transition: background-color 0.2s;
}

.sidebar-logo:hover {
  background-color: var(--secondary);
}

.sidebar-logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  background-color: var(--foreground);
  color: var(--background);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.125rem;
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar-logo-text {
  display: none;
}

@media (min-width: 1024px) {
  .sidebar-logo-text {
    display: block;
  }
  .sidebar-logo-name {
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: -0.02em;
  }
  .sidebar-logo-handle {
    font-size: 0.8rem;
    color: var(--muted-foreground);
  }
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 9999px;
  color: var(--muted-foreground);
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  transition: all 0.2s;
  border: none;
  background: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  background-color: var(--secondary);
  color: var(--foreground);
}

.nav-item.active {
  background-color: var(--foreground);
  color: var(--background);
  font-weight: 500;
}

.nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-item span {
  display: none;
}

@media (min-width: 1024px) {
  .nav-item span {
    display: inline;
  }
}

.notification-badge {
  background-color: var(--primary);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 9999px;
  min-width: 1rem;
  text-align: center;
}

/* ===== Main Content ===== */
.main-content {
  flex: 1;
  min-height: 100vh;
  border-right: 1px solid var(--border-subtle);
  max-width: 600px;
}

/* ===== Page Header ===== */
.page-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: rgba(252, 252, 252, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

[data-theme="dark"] .page-header {
  background-color: rgba(23, 23, 23, 0.8);
}

[data-theme="retro"] .page-header {
  background-color: rgba(10, 10, 15, 0.9);
}

.page-header-title {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
}

.page-header-title h1 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* ===== Compose Form ===== */
.compose-section {
  padding: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.compose-form {
  display: flex;
  gap: 1rem;
}

.compose-avatar {
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  background-color: var(--secondary);
  flex-shrink: 0;
  object-fit: cover;
}

.compose-content {
  flex: 1;
}

.compose-textarea {
  width: 100%;
  min-height: 60px;
  background: transparent;
  border: none;
  color: var(--foreground);
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  resize: none;
  font-family: inherit;
}

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

.compose-textarea:focus {
  outline: none;
}

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

.char-counter {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.char-counter.warning {
  color: #f59e0b;
}

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

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background-color: var(--foreground);
  color: var(--background);
}

.btn-primary:hover {
  transform: scale(1.02);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  background-color: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background-color: var(--secondary);
}

.btn-large {
  padding: 0.875rem 2rem;
  font-size: 1rem;
}

.btn-full {
  width: 100%;
}

.btn-small {
  padding: 0.375rem 1rem;
  font-size: 0.8rem;
}

/* ===== Meep Card ===== */
.meep {
  padding: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.2s;
}

.meep:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .meep:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

.meep-inner {
  display: flex;
  gap: 0.75rem;
}

.meep-avatar {
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  background-color: var(--secondary);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--muted-foreground);
  overflow: hidden;
  text-decoration: none;
}

.meep-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.meep-body {
  flex: 1;
  min-width: 0;
}

.meep-header {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
}

.meep-displayname {
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--foreground);
}

.meep-username {
  color: var(--muted-foreground);
  font-size: 0.9rem;
}

.meep-dot {
  color: var(--muted-foreground);
}

.meep-time {
  color: var(--muted-foreground);
  font-size: 0.9rem;
}

.meep-content {
  margin-top: 0.25rem;
  font-size: 0.95rem;
  line-height: 1.5;
  letter-spacing: -0.01em;
  word-wrap: break-word;
}

.meep-actions {
  display: flex;
  justify-content: flex-start;
  gap: 1rem;
  margin-top: 0.75rem;
}

.meep-action {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--muted-foreground);
  font-size: 0.8rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.375rem;
  border-radius: 9999px;
  transition: all 0.2s;
}

.meep-action:hover {
  color: var(--accent);
  background-color: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .meep-action:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.meep-action.delete:hover {
  color: var(--error);
}

.meep-action.liked {
  color: #e0245e;
}

.meep-action.liked:hover {
  color: #e0245e;
  background-color: rgba(224, 36, 94, 0.1);
}

.meep-action.reply-link {
  text-decoration: none;
}

.meep-action.remeeped {
  color: #17bf63;
}

.meep-action.remeeped:hover {
  color: #17bf63;
  background-color: rgba(23, 191, 99, 0.1);
}

/* ===== Remeep Indicator ===== */
.meep-remeep-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted-foreground);
  margin-bottom: 0.5rem;
}

.meep-remeep-indicator svg {
  color: #17bf63;
}

.meep-remeep-indicator a {
  color: var(--muted-foreground);
  text-decoration: none;
}

.meep-remeep-indicator a:hover {
  text-decoration: underline;
}

/* ===== Reply To Indicator ===== */
.meep-reply-to {
  font-size: 0.8rem;
  color: var(--muted-foreground);
  margin-bottom: 0.25rem;
}

.meep-reply-to a {
  color: var(--primary);
  text-decoration: none;
}

.meep-reply-to a:hover {
  text-decoration: underline;
}

/* ===== Thread View ===== */
.back-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--foreground);
  text-decoration: none;
  margin-right: 1rem;
}

.back-link:hover {
  background-color: var(--secondary);
}

.thread-parent {
  position: relative;
}

.thread-connector {
  position: absolute;
  left: 2.25rem;
  bottom: 0;
  width: 2px;
  height: 1rem;
  background-color: var(--border);
}

.meep-detail {
  border-bottom: 1px solid var(--border-subtle);
}

.reply-form-container {
  padding: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.reply-form-header {
  font-size: 0.85rem;
  color: var(--muted-foreground);
  margin-bottom: 0.75rem;
}

.reply-form-header a {
  color: var(--primary);
  text-decoration: none;
}

.reply-form-header a:hover {
  text-decoration: underline;
}

.replies-section {
  border-top: 1px solid var(--border-subtle);
}

.replies-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.replies-header h2 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--muted-foreground);
}

.empty-state p {
  margin-bottom: 0.5rem;
}

/* ===== Right Panel ===== */
.right-panel {
  display: none;
  width: 320px;
  padding: 1rem;
}

@media (min-width: 1200px) {
  .right-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
}

.search-box {
  position: relative;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  background-color: var(--secondary);
  border: none;
  border-radius: 9999px;
  color: var(--foreground);
  font-size: 0.9rem;
  letter-spacing: -0.01em;
}

.search-input::placeholder {
  color: var(--muted-foreground);
}

.search-input:focus {
  outline: none;
  background-color: var(--background);
  box-shadow: 0 0 0 1px var(--border);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted-foreground);
}

.panel-card {
  background-color: rgba(0, 0, 0, 0.02);
  border-radius: var(--radius);
  padding: 1rem;
}

[data-theme="dark"] .panel-card {
  background-color: rgba(255, 255, 255, 0.03);
}

.panel-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

/* ===== Notifications ===== */
.notifications-list {
  display: flex;
  flex-direction: column;
}

.notification-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.15s ease;
}

.notification-item:hover {
  background-color: var(--secondary);
}

.notification-item.unread {
  background-color: rgba(29, 161, 242, 0.05);
}

[data-theme="dark"] .notification-item.unread {
  background-color: rgba(29, 161, 242, 0.1);
}

.notification-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--secondary);
  border-radius: 50%;
}

.notification-content {
  flex: 1;
  font-size: 0.95rem;
  line-height: 1.5;
}

.notification-user {
  font-weight: 600;
  color: var(--foreground);
  text-decoration: none;
}

.notification-user:hover {
  text-decoration: underline;
}

.notification-content a {
  color: var(--primary);
  text-decoration: none;
}

.notification-content a:hover {
  text-decoration: underline;
}

.notification-time {
  display: block;
  font-size: 0.8rem;
  color: var(--muted-foreground);
  margin-top: 0.25rem;
}

/* ===== Profile Page ===== */
.profile-header {
  padding: 1.5rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.profile-avatar-large {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background-color: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--muted-foreground);
  overflow: hidden;
  margin-bottom: 1rem;
}

.profile-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-info {
  margin-bottom: 1rem;
}

.profile-displayname {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.profile-username {
  color: var(--muted-foreground);
  margin-bottom: 0.75rem;
}

.profile-bio {
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.profile-joined {
  color: var(--muted-foreground);
  font-size: 0.9rem;
}

.profile-stats {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
}

.stat {
  color: var(--muted-foreground);
  font-size: 0.9rem;
}

.stat strong {
  color: var(--foreground);
  font-weight: 600;
}

.profile-actions {
  margin-top: 1rem;
}

.profile-meeps h2 {
  padding: 1rem;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  border-bottom: 1px solid var(--border-subtle);
}

/* ===== Auth Pages ===== */
.auth-page {
  max-width: 400px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.auth-page h1 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

.form-group label {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.form-group input,
.form-group textarea {
  padding: 0.75rem 1rem;
  background-color: var(--secondary);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 4px);
  color: var(--foreground);
  font-size: 1rem;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--foreground);
}

.form-group small {
  font-size: 0.8rem;
  color: var(--muted-foreground);
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--muted-foreground);
  font-size: 0.9rem;
}

/* ===== Alerts ===== */
.alert {
  padding: 0.75rem 1rem;
  border-radius: calc(var(--radius) - 4px);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.alert-error {
  background-color: rgba(220, 38, 38, 0.1);
  border: 1px solid var(--error);
  color: var(--error);
}

.alert-success {
  background-color: rgba(22, 163, 74, 0.1);
  border: 1px solid var(--success);
  color: var(--success);
}

/* ===== Settings Page ===== */
.settings-page {
  padding: 1.5rem 1rem;
}

.settings-page h1 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.theme-options {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.theme-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.2s;
  border: 2px solid transparent;
}

.theme-option:hover {
  background-color: var(--secondary);
}

.theme-option:has(input:checked) {
  border-color: var(--foreground);
}

.theme-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.theme-preview {
  width: 64px;
  height: 44px;
  border-radius: calc(var(--radius) - 4px);
  border: 1px solid var(--border);
}

.theme-preview-light {
  background: linear-gradient(135deg, #fcfcfc 50%, #f5f5f5 50%);
}

.theme-preview-dark {
  background: linear-gradient(135deg, #171717 50%, #262626 50%);
}

.theme-preview-retro {
  background: linear-gradient(135deg, #0a0a0f 50%, #1a1a2e 50%);
  border-color: #ff00ff;
}

.theme-label {
  font-size: 0.8rem;
  color: var(--muted-foreground);
}

/* ===== Avatar Upload ===== */
.avatar-upload-section {
  margin-bottom: 1.5rem;
}

.avatar-upload-section > label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}

.avatar-upload-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.avatar-preview {
  width: 80px;
  height: 80px;
  border-radius: 9999px;
  background-color: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-initial {
  font-size: 2rem;
  font-weight: 600;
  color: var(--muted-foreground);
}

.avatar-upload-controls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.avatar-upload-status {
  font-size: 0.85rem;
  min-height: 1.25rem;
}

.upload-progress {
  color: var(--muted-foreground);
}

.upload-success {
  color: var(--success);
}

.upload-error {
  color: var(--error);
}

/* Sidebar avatar image */
.sidebar-logo-icon img,
.sidebar-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 9999px;
}

/* ===== Home Page ===== */
.home-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  text-align: center;
  padding: 2rem;
}

.home-title {
  font-size: 3rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.home-subtitle {
  font-size: 1.25rem;
  color: var(--muted-foreground);
  margin-bottom: 2.5rem;
  max-width: 400px;
}

.home-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ===== 404 Page ===== */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 2rem;
}

.error-page h1 {
  font-size: 6rem;
  font-weight: 600;
  color: var(--muted-foreground);
  letter-spacing: -0.03em;
}

.error-message {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  margin-bottom: 2rem;
}

/* ===== Footer ===== */
.footer {
  padding: 1.5rem;
  text-align: center;
  color: var(--muted-foreground);
  font-size: 0.8rem;
  border-top: 1px solid var(--border-subtle);
}

.footer-quote {
  font-style: italic;
  margin-bottom: 0.5rem;
}

/* ===== Mobile Navigation ===== */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--background);
  border-top: 1px solid var(--border-subtle);
  padding: 0.5rem 1rem;
  z-index: 100;
}

@media (max-width: 767px) {
  .mobile-nav {
    display: flex;
    justify-content: space-around;
  }

  .sidebar {
    display: none;
  }

  .right-panel {
    display: none;
  }

  .main-content {
    max-width: 100%;
    border-right: none;
  }

  body {
    padding-bottom: 60px;
  }
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: var(--muted-foreground);
  font-size: 0.7rem;
  text-decoration: none;
  padding: 0.5rem;
}

.mobile-nav-item.active {
  color: var(--foreground);
}

.mobile-nav-item svg {
  width: 24px;
  height: 24px;
}

/* ===== Compose FAB (Mobile) ===== */
.compose-fab {
  display: none;
  position: fixed;
  bottom: 80px;
  right: 1rem;
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  background-color: var(--foreground);
  color: var(--background);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s;
  align-items: center;
  justify-content: center;
}

@media (max-width: 767px) {
  .compose-fab {
    display: flex;
  }

  .compose-section {
    display: none;
  }
}

.compose-fab:hover {
  transform: scale(1.05);
}

.compose-fab:active {
  transform: scale(0.95);
}

.compose-fab svg {
  width: 24px;
  height: 24px;
}

/* ===== Mobile Compose Modal ===== */
.compose-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: flex-start;
  justify-content: center;
  padding-top: 2rem;
}

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

.compose-modal-content {
  background-color: var(--background);
  border-radius: 1rem;
  width: calc(100% - 2rem);
  max-width: 500px;
  max-height: calc(100vh - 4rem);
  overflow: auto;
}

.compose-modal-header {
  display: flex;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  gap: 1rem;
}

.compose-modal-header h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
}

.compose-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--foreground);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.compose-modal-form {
  padding: 1rem;
}

.compose-modal-form .compose-textarea {
  min-height: 120px;
}

/* ===== Utility Classes ===== */
.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;
}

/* ===== Image Upload ===== */
.compose-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.image-upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  cursor: pointer;
  color: var(--muted-foreground);
  transition: all 0.2s;
}

.image-upload-btn:hover {
  background-color: var(--secondary);
  color: var(--foreground);
}

.image-preview {
  position: relative;
  margin-top: 0.75rem;
  max-width: 300px;
}

.image-preview img {
  width: 100%;
  border-radius: calc(var(--radius) - 4px);
  border: 1px solid var(--border-subtle);
}

.remove-image {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.remove-image:hover {
  background-color: rgba(0, 0, 0, 0.9);
}

/* ===== Meep Image ===== */
.meep-image {
  margin-top: 0.75rem;
  max-width: 100%;
}

.meep-image img {
  max-width: 100%;
  max-height: 400px;
  border-radius: calc(var(--radius) - 4px);
  border: 1px solid var(--border-subtle);
  object-fit: contain;
}

[data-theme="retro"] .meep-image img {
  box-shadow: 0 0 20px var(--border-subtle);
}
