/* ============================================
   FORUM STYLES - Hufeland Community Forum
   ============================================ */

/* Container */
.forum-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* Breadcrumb */
.forum-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.forum-breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

.forum-breadcrumb a:hover {
  text-decoration: underline;
}

.forum-breadcrumb .sep {
  color: var(--border);
}

.forum-breadcrumb .current {
  color: var(--text);
}

/* Forum Header */
.forum-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.forum-header-content h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.forum-subtitle {
  color: var(--muted);
  margin: 0;
}

.forum-stats-box {
  display: flex;
  gap: 2rem;
}

.stat-item {
  text-align: center;
}

.stat-item .stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-item .stat-label {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Category */
.forum-category {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.category-header {
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 70%, purple));
  padding: 1rem 1.5rem;
}

.category-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #0a0e12;
  margin: 0;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.2);
}

.category-description {
  font-size: 0.85rem;
  color: rgba(10, 14, 18, 0.85);
  margin: 0.25rem 0 0;
}

/* Forum List */
.forum-list {
  display: flex;
  flex-direction: column;
}

.forum-row {
  display: grid;
  grid-template-columns: 60px 1fr 150px 200px;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-fast);
}

.forum-row:last-child {
  border-bottom: none;
}

.forum-row:hover {
  background: var(--surface-2);
}

.forum-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.icon-large {
  font-size: 2rem;
}

.forum-locked-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  font-size: 0.75rem;
}

.forum-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.forum-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.forum-title:hover {
  color: var(--accent);
}

.forum-description {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.25rem 0 0;
}

/* Subforums */
.subforums {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.subforums-label {
  font-size: 0.75rem;
  color: var(--muted);
}

.subforum-link {
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
  padding: 0.15rem 0.5rem;
  background: var(--surface-2);
  border-radius: 4px;
}

.subforum-link:hover {
  background: var(--accent);
  color: white;
}

.subforum-sep {
  color: var(--border);
  font-size: 0.6rem;
}

.forum-stats {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
}

.forum-stats .stat {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.forum-stats .stat-number {
  font-weight: 600;
  color: var(--text);
}

.forum-stats .stat-text {
  font-size: 0.8rem;
  color: var(--muted);
}

.forum-last-post {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.last-post-info {
  font-size: 0.85rem;
}

.last-topic-title {
  color: var(--text);
  text-decoration: none;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.last-topic-title:hover {
  color: var(--accent);
}

.last-post-meta {
  display: flex;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.no-posts {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
}

/* Forum View Header */
.forum-view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.forum-view-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.forum-view-icon {
  font-size: 2.5rem;
}

.forum-view-info h1 {
  font-size: 1.5rem;
  margin: 0;
}

.forum-view-description {
  color: var(--muted);
  margin: 0.25rem 0 0;
}

/* Subforums Section */
.subforums-section {
  margin-bottom: 2rem;
}

.subforums-section h3 {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.subforums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.subforum-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.subforum-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.subforum-icon {
  font-size: 1.5rem;
}

.subforum-name {
  font-weight: 600;
  color: var(--text);
}

.subforum-count {
  font-size: 0.75rem;
  color: var(--muted);
}

/* Topics Section */
.topics-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.topics-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.topics-header h3 {
  margin: 0;
  font-size: 1rem;
}

.topics-sort {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.topics-sort select {
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.85rem;
}

/* Topic Row */
.topics-list {
  display: flex;
  flex-direction: column;
}

.topic-row {
  display: grid;
  grid-template-columns: 40px 50px 1fr 120px 150px;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-fast);
}

.topic-row:last-child {
  border-bottom: none;
}

.topic-row:hover {
  background: var(--surface-2);
}

.topic-row.pinned {
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.05), transparent);
}

.topic-row.locked {
  opacity: 0.7;
}

.topic-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.topic-badge {
  font-size: 0.9rem;
}

.topic-avatar .avatar,
.topic-avatar .avatar-placeholder {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, purple));
  color: white;
  font-weight: 600;
  font-size: 1rem;
}

.topic-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.topic-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.topic-title:hover {
  color: var(--accent);
}

.topic-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.topic-meta a {
  color: var(--accent);
  text-decoration: none;
}

.topic-stats {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
}

.stat-cell {
  text-align: center;
}

.stat-cell .stat-value {
  font-weight: 600;
  color: var(--text);
}

.stat-cell .stat-label {
  font-size: 0.7rem;
  color: var(--muted);
  display: block;
}

.topic-last-post {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.last-reply {
  font-size: 0.85rem;
}

.last-reply-user {
  display: block;
  color: var(--text);
  font-weight: 500;
}

.last-reply-time {
  font-size: 0.75rem;
  color: var(--muted);
}

.no-replies {
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
}

/* Pagination */
.forum-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
}

.page-btn,
.page-num {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.page-btn:hover,
.page-num:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.page-current {
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: white;
  border-radius: 6px;
  font-weight: 600;
}

.page-numbers {
  display: flex;
  gap: 0.25rem;
}

.page-ellipsis {
  padding: 0.5rem;
  color: var(--muted);
}

/* Page Jump Dropdown (IPB Style) */
.page-jump-dropdown {
  position: relative;
  margin-left: 1rem;
}

.page-jump-btn {
  padding: 0.5rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.page-jump-btn:hover {
  background: var(--surface);
  border-color: var(--accent);
}

.page-jump-menu {
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: 0.5rem;
  padding: 0.75rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  display: none;
  gap: 0.5rem;
  z-index: 100;
}

.page-jump-menu.active {
  display: flex;
}

.page-jump-input {
  width: 100px;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.9rem;
}

.page-jump-input:focus {
  outline: none;
  border-color: var(--accent);
}

.page-jump-input.error {
  border-color: var(--danger);
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.page-jump-go {
  padding: 0.5rem 1rem;
  background: var(--accent);
  border: none;
  border-radius: 6px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.page-jump-go:hover {
  opacity: 0.9;
}

/* Follow Topic Toggle */
.topic-actions-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.follow-topic-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 24px;
  transition: all var(--transition-fast);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  bottom: 2px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition-fast);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--accent);
  border-color: var(--accent);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.toggle-label {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Toast Notification */
.toast-notification {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 0.75rem 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  color: var(--text);
  font-size: 0.9rem;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
}

.toast-notification.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-notification.success {
  border-color: #4ade80;
}

.toast-notification.error {
  border-color: var(--danger);
}

/* Topic View */
.topic-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.topic-header-info h1 {
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
}

.topic-header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.topic-mod-actions {
  display: flex;
  gap: 0.5rem;
}

/* Posts List */
.posts-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.post-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all var(--transition-fast);
}

.post-item.first-post {
  border-color: var(--accent);
  border-width: 2px;
}

.post-item.highlighted {
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.3);
}

.post-author-sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 1rem;
  background: var(--surface-2);
  text-align: center;
}

.post-avatar .avatar-large,
.avatar-placeholder.large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-placeholder.large {
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, purple));
  color: white;
}

.post-author-name {
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.post-author-name:hover {
  color: var(--accent);
}

.post-author-rank {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  background: var(--accent);
  color: white;
  border-radius: 4px;
}

.post-author-stats {
  font-size: 0.75rem;
  color: var(--muted);
}

.post-author-stats span {
  display: block;
}

.post-content-area {
  display: flex;
  flex-direction: column;
}

.post-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
}

.post-permalink {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.post-permalink:hover {
  text-decoration: underline;
}

.post-edited {
  margin-left: auto;
  font-style: italic;
}

.post-body {
  flex: 1;
  padding: 1.5rem;
  line-height: 1.7;
  color: var(--text);
}

.post-body p {
  margin: 0 0 1rem;
}

.post-body blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin: 1rem 0;
  color: var(--muted);
  font-style: italic;
}

.post-body code {
  background: var(--surface-2);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: 'Fira Code', monospace;
  font-size: 0.9em;
}

.post-body pre {
  background: var(--surface-2);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
}

.post-body pre code {
  background: none;
  padding: 0;
}

.post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
}

.post-actions {
  display: flex;
  gap: 0.5rem;
}

.post-action-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  transition: all var(--transition-fast);
}

.post-action-btn:hover {
  background: var(--surface);
  color: var(--text);
}

.post-action-btn.danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* Reply Form */
.reply-form-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.reply-form-section h3 {
  margin: 0 0 1rem;
}

.reply-form textarea {
  width: 100%;
  min-height: 150px;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.6;
  resize: vertical;
}

.reply-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.topic-locked-notice,
.login-to-reply {
  text-align: center;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-top: 1.5rem;
  color: var(--muted);
}

.topic-locked-notice .icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
}

.login-to-reply a {
  color: var(--accent);
}

/* New Topic Form */
.new-topic-form-container {
  max-width: 800px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
}

.new-topic-form-container h1 {
  margin: 0 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-subtitle {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.new-topic-form .form-group {
  margin-bottom: 1.5rem;
}

.new-topic-form label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.new-topic-form input[type="text"],
.new-topic-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 1rem;
}

.new-topic-form input[type="text"]:focus,
.new-topic-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.editor-toolbar {
  display: flex;
  gap: 0.25rem;
  padding: 0.5rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
}

.editor-toolbar + textarea {
  border-radius: 0 0 8px 8px;
}

.editor-toolbar button {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

.editor-toolbar button:hover {
  background: var(--surface);
  border-color: var(--border);
}

.toolbar-sep {
  width: 1px;
  background: var(--border);
  margin: 0 0.5rem;
}

.form-inline {
  display: flex;
  align-items: center;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--muted);
}

.empty-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}

/* Online Users */
.forum-online-users {
  margin-top: 2rem;
  padding: 1rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.forum-online-users h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.online-dot {
  width: 10px;
  height: 10px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse-online 2s ease-in-out infinite;
}

@keyframes pulse-online {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.online-count {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.online-list {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  line-height: 1.6;
}

.online-user {
  color: var(--accent);
  text-decoration: none;
}

.online-user:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 900px) {
  .forum-header {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
  
  .forum-row {
    grid-template-columns: 50px 1fr;
    gap: 0.75rem;
  }
  
  .forum-stats,
  .forum-last-post {
    display: none;
  }
  
  .topic-row {
    grid-template-columns: 40px 1fr;
  }
  
  .topic-status,
  .topic-stats,
  .topic-last-post {
    display: none;
  }
  
  .post-item {
    grid-template-columns: 1fr;
  }
  
  .post-author-sidebar {
    flex-direction: row;
    padding: 1rem;
    gap: 1rem;
  }
  
  .post-avatar .avatar-large,
  .avatar-placeholder.large {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }
  
  .post-author-stats,
  .post-author-details {
    display: none;
  }
}

@media (max-width: 600px) {
  .forum-container {
    padding: 1rem;
  }
  
  .category-header,
  .forum-row,
  .topics-header,
  .topic-row {
    padding: 0.75rem 1rem;
  }
  
  .forum-view-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .topic-header {
    flex-direction: column;
    gap: 1rem;
  }
  
  .topic-actions-right {
    width: 100%;
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .follow-topic-toggle {
    order: 2;
  }
  
  .topic-mod-actions {
    width: 100%;
    justify-content: flex-end;
    order: 1;
  }
  
  .forum-pagination {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem;
  }
  
  .page-jump-dropdown {
    width: 100%;
    margin: 0.5rem 0 0;
    order: 10;
  }
  
  .page-jump-btn {
    width: 100%;
    text-align: center;
  }
  
  .page-jump-menu {
    left: 0;
    right: 0;
    bottom: auto;
    top: 100%;
    margin-top: 0.5rem;
    margin-bottom: 0;
  }
  
  .post-actions {
    flex-wrap: wrap;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .form-actions .btn {
    width: 100%;
  }
  
  .editor-toolbar {
    flex-wrap: wrap;
  }
}

/* ============================================
   IPB-STYLE ENHANCED SIDEBAR & QUOTE
   ============================================ */

/* Author Details in Sidebar */
.post-author-details {
  width: 100%;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.author-stat {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  padding: 0.25rem 0;
}

.author-stat-icon {
  font-size: 0.85rem;
  width: 1.2rem;
  text-align: center;
}

.author-stat-label {
  color: var(--muted);
  flex: 1;
}

.author-stat-value {
  font-weight: 500;
  color: var(--text);
}

.author-stat-value.online {
  color: #4ade80;
}

.author-stat-value.offline {
  color: var(--muted);
}

.post-author-group {
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-author-group.admin {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.post-author-group.member {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
}

/* Online Indicator */
.post-avatar {
  position: relative;
}

.online-indicator {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 14px;
  height: 14px;
  background: #4ade80;
  border: 2px solid var(--surface);
  border-radius: 50%;
  animation: pulse-online 2s infinite;
}

@keyframes pulse-online {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ============================================
   IPB-STYLE QUOTE BOX - Preview in editor
   ============================================ */
.quote-preview {
  background: var(--surface);
  border: 0 solid color-mix(in srgb, var(--surface) 85%, var(--text));
  border-inline-start-width: 4px;
  border-radius: 6px;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.quote-preview .quote-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1rem;
  background: transparent;
  border-bottom: none;
  font-size: 0.9rem;
}

.quote-preview .quote-header::before {
  content: '💬';
  margin-inline-end: 0.5rem;
  font-size: 1rem;
}

.quote-preview .quote-info {
  color: var(--text);
  flex: 1;
}

.quote-preview .quote-info strong {
  color: var(--accent);
  font-weight: 700;
}

.quote-preview .quote-date {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.quote-remove {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.quote-remove:hover {
  background: var(--surface-hover, rgba(255,255,255,0.1));
  color: var(--text);
}

.quote-preview .quote-content {
  padding: 0.5rem 1rem 0.75rem 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-style: normal;
  max-height: 100px;
  overflow-y: auto;
  line-height: 1.5;
}

/* ============================================
   IPB-STYLE QUOTE (ipsQuote)
   ============================================ */
.ipsQuote,
blockquote.ipsQuote,
.post-body blockquote,
.message-content-view blockquote {
  display: flow-root;
  width: 100%;
  overflow: hidden;
  border-radius: 6px;
  border: 0 solid color-mix(in srgb, var(--surface) 85%, var(--text));
  background: var(--surface);
  border-inline-start-width: 4px;
  position: relative;
  z-index: 1;
  padding: 0;
  margin: 1rem 0;
}

.ipsQuote_citation,
.ipsQuote .ipsQuote_citation {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  flex-wrap: wrap;
}

.ipsQuote_citation::before {
  content: '💬';
  margin-inline-end: 0.5rem;
  font-size: 1rem;
}

.ipsQuote_citation a,
.ipsQuote_citation .quote-author-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.ipsQuote_citation a:hover,
.ipsQuote_citation .quote-author-link:hover {
  text-decoration: underline;
}

.ipsQuote_contents,
.ipsQuote .ipsQuote_contents {
  padding: 0 1rem 1rem 1rem;
  margin: 0;
  color: var(--text-secondary);
  font-style: normal;
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Nested quotes */
.ipsQuote .ipsQuote {
  margin: 0.75rem 0;
  background: color-mix(in srgb, var(--surface) 80%, var(--bg));
}

/* Quote selection tooltip */
.quote-selection-tooltip {
  position: absolute;
  z-index: 1000;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: none;
  animation: tooltipFadeIn 0.15s ease-out;
}

.quote-selection-tooltip a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}

.quote-selection-tooltip a:hover {
  color: var(--accent);
}

@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Legacy support - keep old quote-block class working */
.quote-block {
  display: flow-root;
  width: 100%;
  overflow: hidden;
  border-radius: 6px;
  border: 0 solid color-mix(in srgb, var(--surface) 85%, var(--text));
  background: var(--surface);
  border-inline-start-width: 4px;
  position: relative;
  z-index: 1;
  padding: 0;
  margin: 1rem 0;
}

.quote-block .quote-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border-bottom: none;
}

.quote-block .quote-header::before {
  content: '💬';
  margin-inline-end: 0.5rem;
  font-size: 1rem;
}

.quote-block .quote-author {
  color: var(--accent);
  font-weight: 700;
}

.quote-block .quote-wrote {
  color: var(--text-secondary);
  font-weight: 400;
}

.quote-block .quote-date {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 400;
}

.quote-block .quote-text {
  padding: 0 1rem 1rem 1rem;
  margin: 0;
  color: var(--text-secondary);
  font-style: normal;
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Nested quotes */
.quote-block .quote-block {
  margin: 0.75rem 0;
  background: color-mix(in srgb, var(--surface) 80%, var(--bg));
}

/* ============================================
   RICH EDITOR TOOLBAR
   ============================================ */
.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  flex-wrap: wrap;
}

.toolbar-group {
  display: flex;
  gap: 0.25rem;
}

.toolbar-sep {
  width: 1px;
  height: 24px;
  background: var(--border);
  margin: 0 0.5rem;
}

.toolbar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  color: var(--text);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.toolbar-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.toolbar-select {
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
}

.reply-form textarea {
  border-radius: 0 0 8px 8px !important;
  border-top: none !important;
}

.editor-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 0.8rem;
}

.char-count {
  color: var(--muted);
}

.checkbox-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--muted);
}

.checkbox-option input {
  accent-color: var(--accent);
}

/* Post Preview Modal */
.post-preview-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
}

.post-preview-content {
  background: var(--surface);
  border-radius: 12px;
  max-width: 700px;
  width: 100%;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.post-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.post-preview-header h4 {
  margin: 0;
}

.post-preview-header button {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.25rem;
  padding: 0.25rem;
}

.post-preview-body {
  padding: 1.5rem;
  overflow-y: auto;
  line-height: 1.6;
}

/* ============================================
   IPB-STYLE FORUM HOMEPAGE
   ============================================ */

/* Forum Header with Actions */
.forum-header-actions {
  display: flex;
  gap: 0.75rem;
}

/* IPB Style Category */
.forum-category.ipb-style {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.forum-list-ipb {
  display: flex;
  flex-direction: column;
}

.forum-row-ipb {
  display: grid;
  grid-template-columns: 120px 280px 1fr;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-fast);
}

.forum-row-ipb:last-child {
  border-bottom: none;
}

.forum-row-ipb:hover {
  background: var(--surface-2);
}

/* Forum Cover */
.forum-cover {
  position: relative;
  width: 120px;
  height: 90px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.forum-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.forum-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
}

.forum-icon-large {
  font-size: 2.5rem;
}

.forum-cover .forum-locked-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.6);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
}

/* Forum Info IPB */
.forum-info-ipb {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.forum-title-ipb {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 0.35rem;
}

.forum-title-ipb:hover {
  text-decoration: underline;
}

.forum-description-ipb {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.forum-meta-ipb {
  display: flex;
  gap: 1rem;
}

.forum-stat-mini {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Recent Topics Column */
.forum-recent-topics {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: 320px;
  overflow: hidden;
}

.recent-topic-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  transition: background var(--transition-fast);
  border: 1px solid transparent;
}

.recent-topic-row:hover {
  background: var(--surface);
  border-color: var(--border);
}

.recent-topic-avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
}

.mini-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, purple));
  border: 2px solid var(--border);
}

/* Fallback quando l'immagine non carica */
.mini-avatar[alt]::after {
  content: attr(alt);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, purple));
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 50%;
}

.mini-avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, purple));
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  border: 2px solid var(--border);
  text-transform: uppercase;
}

.recent-topic-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.recent-topic-title {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.recent-topic-title:hover {
  color: var(--accent);
}

.recent-topic-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.2;
}

.recent-topic-author {
  color: var(--accent);
  font-weight: 500;
}

.recent-topic-sep {
  color: var(--muted);
  opacity: 0.5;
}

.recent-topic-date {
  opacity: 0.8;
}

.recent-topic-comments {
  display: none; /* Nascosto per risparmiare spazio */
  flex-direction: column;
  align-items: center;
  padding: 0 0.5rem;
}

.comments-count {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.comments-label {
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
}

.no-recent-topics {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  gap: 0.5rem;
}

.no-topics-icon {
  font-size: 1.5rem;
  opacity: 0.5;
}

/* Forum Footer Section */
.forum-footer-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.forum-stats-summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.stats-box {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stats-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.stats-icon {
  font-size: 1.25rem;
}

.stats-text {
  font-size: 0.9rem;
  color: var(--muted);
}

.stats-text strong {
  color: var(--accent);
  font-weight: 600;
}

/* Online Users IPB Style */
.forum-online-users-ipb {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.online-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.online-header h3 {
  margin: 0;
  font-size: 1rem;
  flex: 1;
}

.online-count-badge {
  background: var(--accent);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 10px;
}

.online-list-ipb {
  font-size: 0.85rem;
  line-height: 1.8;
}

.online-user-ipb {
  color: var(--text);
  text-decoration: none;
}

.online-user-ipb:hover {
  color: var(--accent);
  text-decoration: underline;
}

.online-status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #4ade80;
  border-radius: 50%;
  margin-right: 4px;
}

.online-empty {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0;
}

/* Responsive IPB Style */
@media (max-width: 1100px) {
  .forum-row-ipb {
    grid-template-columns: 120px 1fr 260px;
    gap: 1rem;
  }
  
  .forum-recent-topics {
    max-width: 260px;
  }
}

@media (max-width: 900px) {
  .forum-row-ipb {
    grid-template-columns: 100px 1fr;
    gap: 1rem;
  }
  
  .forum-recent-topics {
    display: none;
  }
  
  .forum-footer-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .forum-row-ipb {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
  
  .forum-cover {
    width: 100%;
    height: 80px;
  }
  
  .forum-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .forum-info-ipb {
    padding: 0;
  }
  
  .forum-title-ipb {
    font-size: 1rem;
  }
  
  .forum-description-ipb {
    font-size: 0.85rem;
  }
}

/* PM Badge */
.pm-badge {
  background: var(--danger, #ef4444);
  color: white;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-left: auto;
  min-width: 18px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Profile Actions */
.profile-actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
}

.profile-actions .btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

/* Embedded Music Content */
.embedded-album,
.embedded-track,
.embedded-playlist {
  background: var(--surface-2, #1a1a2e);
  border: 1px solid var(--border, #333);
  border-radius: 12px;
  padding: 15px;
  margin: 15px 0;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: background 0.2s ease;
}

.embedded-album:hover,
.embedded-track:hover,
.embedded-playlist:hover {
  background: var(--surface-3, #242444);
}

.embedded-cover {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.embedded-info {
  flex: 1;
  min-width: 0;
}

.embedded-type {
  font-size: 0.75rem;
  color: var(--accent, #6366f1);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 4px;
}

.embedded-title {
  font-weight: 600;
  color: var(--text, #fff);
  font-size: 1rem;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.embedded-artist {
  color: var(--muted, #888);
  font-size: 0.85rem;
}

.embedded-play-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent, #6366f1);
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s, background 0.2s;
}

.embedded-play-btn:hover {
  transform: scale(1.1);
  background: color-mix(in srgb, var(--accent, #6366f1) 80%, white);
}

.embedded-link {
  text-decoration: none;
  color: inherit;
}

.embedded-link:hover .embedded-title {
  color: var(--accent, #6366f1);
}

/* Embed loading/error states */
.embed-loading {
  color: var(--muted, #888);
  font-size: 0.9rem;
  padding: 10px;
}

.embed-error {
  color: var(--danger, #ef4444);
  font-size: 0.85rem;
  background: rgba(239, 68, 68, 0.1);
  padding: 8px 15px;
  border-radius: 6px;
  display: inline-block;
}

/* Image Modal */
.image-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

.image-modal-img {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.image-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.image-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Post image styling */
.post-image {
  max-width: 100%;
  max-height: 500px;
  border-radius: 8px;
  cursor: zoom-in;
  margin: 10px 0;
  transition: opacity 0.2s;
}

.post-image:hover {
  opacity: 0.9;
}

/* Playlist cover placeholder */
.embedded-cover.playlist-cover {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent, #6366f1), #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}

/* ============ POST REACTIONS ============ */

.post-reactions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.reactions-display {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.reaction-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reaction-badge:hover {
  background: var(--surface-hover, rgba(var(--accent-rgb, 99, 102, 241), 0.1));
  border-color: var(--accent);
  transform: scale(1.05);
}

.reaction-badge.active {
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  border-color: var(--accent);
}

.reaction-badge .emoji {
  font-size: 1rem;
}

.reaction-badge .count {
  font-weight: 600;
  color: var(--text-secondary);
}

.reaction-badge.active .count {
  color: var(--accent);
}

.reaction-picker-wrapper {
  position: relative;
}

.reaction-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.25rem 0.5rem;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.reaction-add-btn:hover {
  background: var(--surface);
  border-style: solid;
  border-color: var(--accent);
  color: var(--accent);
}

.reaction-add-btn .icon {
  font-size: 1rem;
}

.reaction-add-btn .icon-plus {
  font-size: 0.75rem;
  font-weight: bold;
}

.reaction-picker {
  position: absolute;
  bottom: 100%;
  left: 0;
  display: flex;
  gap: 0.25rem;
  padding: 0.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  z-index: 100;
  margin-bottom: 0.5rem;
}

.reaction-option {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.reaction-option:hover {
  background: var(--surface);
  transform: scale(1.2);
}

.reaction-option.active {
  background: color-mix(in srgb, var(--accent) 25%, transparent);
  box-shadow: 0 0 0 2px var(--accent);
}

/* Mobile adjustments for reactions */
@media (max-width: 768px) {
  .reaction-picker {
    left: auto;
    right: 0;
  }
  
  .reaction-option {
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
  }
}

/* Animate reaction badges appearing */
@keyframes reactionPop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.reaction-badge {
  animation: reactionPop 0.3s ease-out;
}

/* ========== NOTIFICATIONS PAGE ========== */
.notifications-page-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.notification-page-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  transition: all var(--transition-fast);
}

.notification-page-item:hover {
  background: var(--surface-2);
  border-color: var(--accent);
}

.notification-page-item.unread {
  background: rgba(var(--accent-rgb, 0, 198, 255), 0.08);
  border-color: rgba(var(--accent-rgb, 0, 198, 255), 0.3);
}

.notification-page-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 40px;
  text-align: center;
}

.notification-page-content {
  flex: 1;
  min-width: 0;
}

.notification-page-title {
  font-weight: 500;
  margin-bottom: 4px;
}

.notification-page-text {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.notification-page-time {
  font-size: 0.75rem;
  color: var(--muted);
}

.notification-unread-dot {
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ========== SUBSCRIPTIONS PAGE ========== */
.subscriptions-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.subscription-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.subscription-item:hover {
  border-color: var(--accent);
}

.subscription-info {
  flex: 1;
  min-width: 0;
}

.subscription-title {
  display: block;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 6px;
}

.subscription-title:hover {
  color: var(--accent);
}

.subscription-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.subscription-meta .sep {
  opacity: 0.5;
}

.subscription-forum {
  color: var(--accent);
}

.subscription-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Page Header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.page-header h1 {
  margin: 0;
  font-size: 1.5rem;
}

/* Responsive Subscriptions */
@media (max-width: 600px) {
  .subscription-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .subscription-actions {
    width: 100%;
  }
  
  .subscription-actions .btn {
    flex: 1;
  }
}
