/* Base Elements */
[id^="forumpost"] {
  scroll-margin-top: 130px;
}

/* Date Information Styling */
.date-info {
  font-size: 0.8rem !important;
  opacity: 0.8;
  margin: 0.2rem 0 !important;
}

.date-info strong {
  font-size: 0.85rem !important;
}

.date-info-container {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

/* Button Styling */
.btn.button-peach img, 
.btn.button-dark img,
.xforum_button img,
.forum_button img {
  max-width: 22px !important;
  max-height: 22px !important;
  width: auto !important;
  height: auto !important;
}

.btn .fa, 
.btn .fas, 
.btn .far, 
.btn .fab {
  font-size: 1.1rem !important;
}

.btn-xs {
  padding: 0.25rem 0.5rem !important;
  font-size: 0.85rem !important;
  line-height: 1.3 !important;
}

/* User Profile Elements */
.custom-user-data .btn.button-peach {
  border-radius: 8px !important;
}

.custom-user-data .collapse {
  border-radius: 0 0 8px 8px !important;
  overflow: hidden;
}

.custom-user-data, 
.col-12.col-md-3,
.newbb-user-data {
  border-radius: 15px !important;
  overflow: hidden;
  padding: 10px !important;
}

/* User Profile Image - تعامل‌گرایی ساده و شیک */

.user-profile-image {
position: relative;
max-width: 85%;
padding: 0.25rem;
transition: transform 0.3s ease;

}

.user-profile-image img {
border-radius: 50%;
transition: all 0.3s ease;
max-width: 100%;
height: auto;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.user-profile-image:hover img {
transform: scale(1.05);
box-shadow: 0 4px 15px rgba(159, 90, 253, 0.5);
}

/* Custom User Title - پس‌زمینه بهبود یافته */

.custom-user-title {
background-color: rgba(0, 0, 0, 0.6);
padding: 5px 15px;
border-radius: 20px;
color: white !important;
margin: 0;
text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

/* نشان‌های وفاداری - پس‌زمینه بهبود یافته */

.user-profile-head .d-flex.flex-wrap.gap-1 {
background-color: rgba(0, 0, 0, 0.4);
padding: 5px;
border-radius: 12px;
margin: 3px 0;
}

body.dark-mode .custom-user-data,
body.dark-mode .col-12.col-md-3,
body.dark-mode .newbb-user-data,
body:not(.dark-mode) .custom-user-data,
body:not(.dark-mode) .col-12.col-md-3,
body:not(.dark-mode) .newbb-user-data {
  border-radius: 15px !important;
  overflow: hidden;
}

/* Signature Styling */
.signature-container {
  margin-top: 20px;
  padding: 15px;
  margin-bottom: 10px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--signature-bg, rgba(0, 0, 0, 0.03));
  position: relative;
  border: 1px solid var(--signature-border, rgba(0, 0, 0, 0.1));
}

.signature-separator {
  height: 3px;
  margin-bottom: 10px;
  background: var(--signature-color, rgba(159, 90, 253, 0.6));
  border-radius: 2px;
}

/* Hogwarts House Signature Styles */
.gryffindor-signature .signature-separator {
  background: linear-gradient(90deg, #740001 0%, #ae0001 50%, #eeba30 100%);
}

.slytherin-signature .signature-separator {
  background: linear-gradient(90deg, #1a472a 0%, #2a623d 50%, #5d5d5d 100%);
}

.ravenclaw-signature .signature-separator {
  background: linear-gradient(90deg, #0e1a40 0%, #222f5b 50%, #bebebe 100%);
}

.hufflepuff-signature .signature-separator {
  background: linear-gradient(90deg, #ecb939 0%, #f0c75e 50%, #726255 100%);
}

/* Container and Message Styling */
.container.main-card {
  border-radius: 15px !important;
  overflow: hidden;
}

.newbb-message-area {
  border-radius: 15px !important;
  overflow: hidden;
  margin-bottom: 12px;
  background-color: var(--message-bg, rgba(255, 255, 255, 0.03));
}

/* Signature Image Controls */
.signature-container img,
.signature-container img[width], 
.signature-container img[height] {
  max-width: 300px !important;
  max-height: 300px !important;
  width: auto !important;
  height: auto !important;
  display: inline-block;
}

/* Theme Mode Adaptations */
@media (prefers-color-scheme: dark) {
  .signature-container {
    --signature-bg: rgba(255, 255, 255, 0.05);
    --signature-border: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
  }
}

@media (prefers-color-scheme: light) {
  .signature-container {
    --signature-bg: rgba(0, 0, 0, 0.03);
    --signature-border: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.8);
  }
}

[data-theme="light"] .signature-container { color: #666; }
[data-theme="dark"] .signature-container { color: #aaa; }

.light-theme .signature-container { color: #666; }
.dark-theme .signature-container { color: #aaa; }

/* Animations */
@keyframes rotate360 {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.briefcase-icon {
  transition: transform 0.3s ease;
}

.briefcase-icon:hover {
  animation: rotate360 0.5s ease-in-out;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .btn-xs {
    padding: 0.2rem 0.4rem !important;
    font-size: 0.8rem !important;
  }
  
  .btn .fa, .btn .fas, .btn .far, .btn .fab {
    font-size: 1rem !important;
  }
  
  .btn.button-peach img, 
  .btn.button-dark img,
  .xforum_button img,
  .forum_button img {
    max-width: 20px !important;
    max-height: 20px !important;
  }
  
  .signature-container img {
    max-width: 300px !important;
    max-height: 300px !important;
  }
}

/* ارتفاع کمتر در موبایل */

.user-profile-head {
min-height: 200px;
}

.user-profile-image {
max-width: 80%;
}
.user-profile-image { position: relative; display: inline-block; }

.user-badge-stack {
  position: absolute;
  left: 4px;
  bottom: 4px;
  display: flex;
  gap: 6px;
  z-index: 10;
}

.user-badge-stack img {
  width: 40px;
  height: 40px;
}

/* 🔹 ساختار کلی */
.post-like {
  --like-color: var(--xoops-link-color, #7b5cd6);
  --like-bg: rgba(123, 92, 214, 0.08);
  --like-border: rgba(123, 92, 214, 0.25);
  font-family: inherit;
}

/* 🔸 دکمه لایک - طراحی مدرن و شکیل */
.btn-like {
  background: linear-gradient(135deg, var(--like-bg) 0%, rgba(123, 92, 214, 0.12) 100%);
  border: 1.5px solid var(--like-border);
  border-radius: 20px;
  padding: 6px 14px;
  color: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(123, 92, 214, 0.1);
  position: relative;
  overflow: hidden;
}

.btn-like::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(123, 92, 214, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-like:hover::before {
  width: 300px;
  height: 300px;
}

.btn-like:hover {
  background: linear-gradient(135deg, rgba(123, 92, 214, 0.15) 0%, rgba(123, 92, 214, 0.22) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(123, 92, 214, 0.3);
  border-color: var(--like-color);
}

.btn-like:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 2px 6px rgba(123, 92, 214, 0.2);
}

/* 🔹 آیکون قلب - انیمیشن زیبا */
.like-icon {
  width: 20px;
  height: 20px;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  filter: drop-shadow(0 1px 3px rgba(123, 92, 214, 0.3));
  position: relative;
  z-index: 1;
}

.btn-like.liked .like-icon {
  filter: drop-shadow(0 0 8px rgba(255, 80, 150, 0.8));
  transform: scale(1.3) rotate(10deg);
  animation: heartBeat 0.6s ease-in-out;
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1.3) rotate(10deg); }
  25% { transform: scale(1.5) rotate(15deg); }
  50% { transform: scale(1.2) rotate(5deg); }
}

/* 🔸 شمارنده لایک - فونت فارسی زیبا */
.like-count {
  font-weight: 600;
  color: inherit;
  min-width: 1.8em;
  text-align: center;
  position: relative;
  z-index: 1;
  font-family: 'Vazirmatn', 'Tahoma', sans-serif;
  font-feature-settings: 'ss01' 1;
}

/* 🔹 دکمه نمایش لایک‌کننده‌ها */
.btn-show-likers {
  background: transparent;
  border: 1px solid var(--like-border);
  border-radius: 15px;
  padding: 4px 10px;
  color: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 6px;
  font-family: 'Vazir';
}

.btn-show-likers:hover {
  background: var(--like-bg);
  border-color: var(--like-color);
  transform: translateX(-2px);
}

/* 🔸 Popup لایک‌کننده‌ها - مدال زیبا */
.likers-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}

.likers-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.likers-content {
  background: #ffffff;
  color: #333333;
  border-radius: 16px;
  padding: 24px;
  max-width: 450px;
  width: 90%;
  max-height: 70vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  border: 2px solid var(--like-border);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.likers-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--like-border);
}

.likers-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #333333;
  margin: 0;
  font-family: 'Vazir';
}

.btn-close-modal {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: #666666;
  cursor: pointer;
  opacity: 0.7;
  transition: all 0.3s ease;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-close-modal:hover {
  opacity: 1;
  background: rgba(123, 92, 214, 0.1);
  color: #333333;
  transform: rotate(90deg);
}

/* 🔹 لیست لایک‌کننده‌ها در مودال */
.likers-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.liker-item {
  display: flex;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  transition: all 0.3s ease;
  text-decoration: none;
  color: #444444;
  background: rgba(123, 92, 214, 0.06);
}

.liker-item:hover {
  background: rgba(123, 92, 214, 0.15);
  transform: translateX(-4px);
  box-shadow: 0 2px 8px rgba(123, 92, 214, 0.2);
  color: #333333;
}

/* 🔸 آواتار لایک‌کننده */
.like-avatar {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--like-border);
  transition: all 0.3s ease;
  margin-left: 12px;
}

.liker-item:hover .like-avatar {
  transform: scale(1.1);
  border-color: var(--like-color);
  box-shadow: 0 0 12px rgba(123, 92, 214, 0.4);
}

/* 🔸 نام کاربران */
.liker-name {
  color: #555555;
  font-weight: 500;
  transition: color 0.2s ease;
  font-size: 0.95rem;
  font-family: 'Vazirmatn', 'Tahoma', sans-serif;
}

.liker-item:hover .liker-name {
  color: var(--like-color);
}

/* 🔹 نوشته پیش‌فرض */
.no-likers {
  opacity: 0.6;
  font-style: italic;
  text-align: center;
  padding: 20px;
  color: #666666;
  font-family: 'Vazirmatn', 'Tahoma', sans-serif;
}

/* 🔸 اسکرول بار سفارشی برای مودال */
.likers-content::-webkit-scrollbar {
  width: 6px;
}

.likers-content::-webkit-scrollbar-track {
  background: rgba(123, 92, 214, 0.05);
  border-radius: 10px;
}

.likers-content::-webkit-scrollbar-thumb {
  background: var(--like-color);
  border-radius: 10px;
}

/* 🔸 حالت تیره / شب */
@media (prefers-color-scheme: dark) {
  .post-like {
    --like-bg: rgba(123, 92, 214, 0.15);
    --like-border: rgba(123, 92, 214, 0.4);
  }
  
  .likers-content {
    background: #1a1a1a;
    color: #e0e0e0;
    border: 2px solid rgba(123, 92, 214, 0.5);
  }
  
  .likers-title {
    color: #ffffff;
  }
  
  .btn-close-modal {
    color: #cccccc;
  }
  
  .btn-close-modal:hover {
    background: rgba(123, 92, 214, 0.25);
    color: #ffffff;
  }
  
  .liker-item {
    background: rgba(123, 92, 214, 0.12);
    color: #e0e0e0;
  }
  
  .liker-item:hover {
    background: rgba(123, 92, 214, 0.25);
    color: #ffffff;
  }
  
  .liker-name {
    color: #d0d0d0;
  }
  
  .liker-item:hover .liker-name {
    color: #bb86fc;
  }
  
  .no-likers {
    color: #999999;
  }
}

/* 🔹 کلاس برای حالت دارک دستی */
[data-theme="dark"] .likers-content {
  background: #1a1a1a;
  color: #e0e0e0;
  border: 2px solid rgba(123, 92, 214, 0.5);
}

[data-theme="dark"] .likers-title {
  color: #ffffff;
}

[data-theme="dark"] .btn-close-modal {
  color: #cccccc;
}

[data-theme="dark"] .btn-close-modal:hover {
  background: rgba(123, 92, 214, 0.25);
  color: #ffffff;
}

[data-theme="dark"] .liker-item {
  background: rgba(123, 92, 214, 0.12);
  color: #e0e0e0;
}

[data-theme="dark"] .liker-item:hover {
  background: rgba(123, 92, 214, 0.25);
  color: #ffffff;
}

[data-theme="dark"] .liker-name {
  color: #d0d0d0;
}

[data-theme="dark"] .liker-item:hover .liker-name {
  color: #bb86fc;
}

[data-theme="dark"] .no-likers {
  color: #999999;
}

/* 🔹 انیمیشن برای موبایل */
@media (max-width: 768px) {
  .likers-content {
    max-width: 95%;
    padding: 20px;
  }
  
  .like-avatar {
    width: 32px;
    height: 32px;
  }
}
