/* ======================
   جلوگیری از اسکرول عمودی
====================== */
html, body {
  height: var(--app-height);     /* کل ارتفاع صفحه */
  margin: 0;
  padding: 0;
  overflow: hidden;  /* غیرفعال کردن اسکرول عمودی */
}

/* ======================
   استایل کلی پروژه
====================== */
body {
  background: #f0fdf4; /* Tailwind bg-green-50 */
  color: #1f2937;      /* Tailwind text-gray-800 */
  font-family: sans-serif;
}

/* قفل کامل orientation - روش قطعی */
html, body {
  position: fixed;
  overflow: hidden;
  width: 100%;
  height: 100%;
  -webkit-overflow-scrolling: touch;
}

/* استایل مستقل برای لوگوی مودال ورود */
.login-logo {
  width: 60px;
  height: 60px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-top: -25px;
}

/* بک‌گراند تار برای وقتی مودال بازه */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgb(82 90 255 / 39%);
  backdrop-filter: blur(6px);
  z-index: 900;
  display: none;
  pointer-events: all;
}


/* === مودال کلی === */
.login-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  background-color: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  max-height: 87vh;  
  overflow-y: auto;  
}

/* === جعبه‌ی داخلی === */
.login-box {
  background: #fff;
  padding: 10px;
  border-radius: 10px;
  text-align: center;
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* === ورودی‌ها === */
.login-box input {
  width: 100%;
  padding: 10px;
  border: solid 1px;
  border-radius: 8px;
  font-size: 14px;
  text-align: center;
  margin: 5px 0;
}

/* === دکمه‌های مخصوص ورود/ثبت‌نام (صفحه‌ها) === */
#signupPage button,
#loginPage button {
  padding: 10px;
  background-color: #059669;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s ease;
}
#signupPage button:hover,
#loginPage button:hover {
  background-color: #047857;
}

/* === لینک‌ها === */
#signupPage a,
#loginPage a {
  color: #f94141;
  text-decoration: none;
  font-weight: bold;
}
#signupPage a:hover,
#loginPage a:hover {
  text-decoration: underline;
}

/* === تیترها === */
#signupPage h2,
#loginPage h2 {
  font-size: 20px;
  margin-bottom: 10px;
  text-align: center;
  color: #333;
}

/* === دکمه loginBtn (داخل مودال ورود) === */
#loginBtn {
  width: 100%;
  padding: 10px;
  margin-top: 25px;
  background-color: #059669;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s ease;
}
#loginBtn:disabled {
  background-color: #8eff9d;;
  opacity: 0.6;
  cursor: not-allowed;
}
#loginBtn:hover:not(:disabled) {
  background-color: #047857;
}

/* ======================
   مسیر اصلی (pathCanvas)
====================== */
#pathTitle {
  margin-bottom: -5px !important;
}

#chatForm {
  margin-bottom: 15px !important;
}

#pathCanvas {
  position: relative;
  width: 100%;
  height: 100%;          
  min-height: 240px;
  box-sizing: border-box;
  border: 2px solid #a7f3d0;
  border-radius: 20px;
  overflow: hidden;
}

/* استایل مخصوص مسیر شهری */
.path-NamNam {
  background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)), 
              url('/static/backgrounds/NamNam.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 4px solid #a7f3d0;
  border-radius: 20px;
}

/* استایل مخصوص مسیر شهری */
.path-Sokoot {
  background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)), 
              url('/static/backgrounds/Sokoot.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 4px solid #a7f3d0;
  border-radius: 20px;
}

/* استایل مخصوص مسیر شهری */
.path-Tanha {
  background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)), 
              url('/static/backgrounds/Tanha.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 4px solid #a7f3d0;
  border-radius: 20px;
}

/* استایل مخصوص مسیر ساحلی */
.path-FazBala {
  background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)), 
              url('/static/backgrounds/FazBala.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 4px solid #a7f3d0;
  border-radius: 20px;
}

/* استایل مخصوص مسیر ساحلی */
.path-Tapesh {
  background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)), 
              url('/static/backgrounds/Tapesh.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 4px solid #a7f3d0;
  border-radius: 20px;
}

/* استایل مخصوص مسیر ساحلی */
.path-Bazigoosh {
  background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)), 
              url('/static/backgrounds/Bazigoosh.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 4px solid #a7f3d0;
  border-radius: 20px;
}

/* استایل مخصوص مسیر جنگلی */
.path-Zharfa {
  background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)), 
              url('/static/backgrounds/Zharfa.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 4px solid #a7f3d0;
  border-radius: 20px;
}

/* استایل مخصوص مسیر جنگلی */
.path-BiKalam {
  background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)), 
              url('/static/backgrounds/BiKalam.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 4px solid #a7f3d0;
  border-radius: 20px;
}

/* استایل مخصوص مسیر جنگلی */
.path-Mana {
  background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)), 
              url('/static/backgrounds/Mana.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 4px solid #a7f3d0;
  border-radius: 20px;
}

/* استایل مخصوص مسیر کوهستانی */
.path-Hayahoo {
  background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)), 
              url('/static/backgrounds/Hayahoo.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 4px solid #a7f3d0;
  border-radius: 20px;
}

/* استایل مخصوص مسیر کوهستانی */
.path-Hayajan {
  background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)), 
              url('/static/backgrounds/Hayajan.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 4px solid #a7f3d0;
  border-radius: 20px;
}

/* استایل مخصوص مسیر کوهستانی */
.path-Raha {
  background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)), 
              url('/static/backgrounds/Raha.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 4px solid #a7f3d0;
  border-radius: 20px;
}

/* استایل مخصوص مسیر بیابانی */
.path-Khiyal {
  background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)), 
              url('/static/backgrounds/Khiyal.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 4px solid #a7f3d0;
  border-radius: 20px;
}

/* استایل مخصوص مسیر بیابانی */
.path-Roya {
  background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)), 
              url('/static/backgrounds/Roya.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 4px solid #a7f3d0;
  border-radius: 20px;
}

/* استایل مخصوص مسیر بیابانی */
.path-Noor {
  background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)), 
              url('/static/backgrounds/Noor.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 4px solid #a7f3d0;
  border-radius: 20px;
}

/* ======================
   آواتار کاربران
====================== */
.avatar {
  position: absolute;
  width: 30px;   
  height: 30px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  background: white;
  box-shadow: 0 8px 16px rgba(0,0,0,0.08);
  border: 2px solid #86efac;
  user-select: none;
  transition: transform 0.06s linear;
}
.avatar.me {
  border-color: #60a5fa;
}

/* انیمیشن تپش قلب */
@keyframes heart-beat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.2); }
  50% { transform: scale(0.9); }
  75% { transform: scale(1.1); }
}

.heart-icon {
  animation: heart-beat 1s infinite;
  transform-origin: center;
}


/* ======================
   استیکرها
====================== */
.sticker-row {
  display: flex;
  justify-content: space-around;
  margin: 10px 0;
}
.sticker-option {
  width: 40px;
  height: 40px;
  cursor: pointer;
  border-radius: 8px;
  transition: transform 0.2s, border 0.2s;
}
.sticker-option:hover {
  transform: scale(1.1);
  border: 2px solid #60a5fa;
}
.sticker-option.selected {
  border: 2px solid #2563eb; 
}

/* ---------- استایل استیکرها (گرید 5 ستونه) ---------- */
.sticker-selection {
  max-height: 150px;
  overflow-y: auto;
  margin: 10px 0;
  padding: 4px;
  border-radius: 8px;
  border: solid 1px;
  }

#stickerTitle {text-align: center;margin-bottom: -10px;margin-top: -10px;font-size: 14px;color: #4b5563;font-weight: 600;}

/* گرید 5 ستونه (در صفحه‌های کوچک به 3 یا 2 تغییر می‌کند) */
.sticker-grid {
  display: grid;
  grid-template-columns: repeat(4, 2fr);
  gap: 2px;
  align-items: center;
  justify-items: center;
  padding: 6px;
  max-height: 320px;
}

/* هر آیتم استیکر */
.sticker-item {
  width: 100%;
  max-width: 72px;
  height: 60px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
  border: 2px solid transparent;
  box-sizing: border-box;
  border: solid 1px;
}

/* تصویر درون آیتم */
.sticker-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* وقتی انتخاب شده */
.sticker-item.selected {
  box-shadow: 0 6px 14px rgba(16, 185, 129, 0.12);
  transform: translateY(-3px);
  border-color: #2563eb;
  background: rgb(66 255 149 / 22%);
}

/* پیش‌نمایش انتخاب‌شده */
.sticker-preview {
  margin-top: 8px;
  text-align: center;
  min-height: 48px;
}
.sticker-preview img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
}


/* ======================
   پنل نزدیکی به صورت overlay
====================== */
#proximityToast {
  position: absolute;
  transform: translate(-50%, 50%);
  left: 9%;
  top: 5%;
  z-index: 1200;
  pointer-events: none;
  display: none;
  font-size: 12px;
  color: red;
}

#proximityToast.hidden {
  display: none !important;
}

/* استایل برای بخش استیکرها */
.sticker-section {
  margin: 15px 0;
}

/* ======================
انتخاب مسیرها (path selector)
====================== */
.path-container {
  max-height: 180px; 
  overflow-y: auto; 
  margin: 10px 10px;
  padding: 4px;
  border-radius: 8px;
  border: solid 1px;
}

.path-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr); 
  gap: 2px;
  align-items: center;
}

.path-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 8px 4px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease;
  user-select: none;
  background: transparent;
  box-sizing: border-box;
  border: solid 1px;
}

.path-option .path-icon {
  width: 60px;
  height: 50px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.path-option:hover .path-icon {
  border-color: #60a5fa;
  transform: scale(1.05);
}

.path-option.selected .path-icon {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
}

.path-option .path-label {
  font-size: 12px;
  color: #374151;
  white-space: nowrap;
  margin-top: 4px;
}

/* افکت ها */
.path-option:hover {
  transform: translateY(-4px);
}

/* حالت انتخاب‌شده */
.path-option.selected {
  border-color: #2563eb;
  background: rgb(66 255 149 / 22%);
}
  

.sticker-title {
  text-align: center;
  margin-bottom: 0px;
  margin-top: -58px;
  font-size: 14px;
  color: #4b5563; /* رنگ خاکستری */
  font-weight: 600;
}

.sticker-row {
  display: flex;
  justify-content: space-around;
  margin: 5px 0;
}

#chatArea > div {
  direction: rtl !important;
  text-align: right !important;
  unicode-bidi: plaintext !important;
  width: 100%;
}

#chatArea div {
  word-break: break-word;  
  white-space: normal;  
  overflow-wrap: break-word; 
}


#chatArea {
  direction: rtl !important;
  text-align: right !important;
  unicode-bidi: plaintext !important;
  border-radius: 0.75rem !important;
  padding: 0.5rem !important;
}

.user-count {
  font-size: 11px;
  color: #6b7280;
  margin-top: 4px;
  text-align: center;
}

.total-users-count {
  text-align: center;
  font-size: 10px;
  color: #374151;
  background: #f9fafb;
  padding: 5px 16px;
  border-radius: 8px;
  font-weight: 500;
  margin-bottom: -20px;
  margin-top: -10px;
}

.validation-hint {
  font-size: 12px;
  margin-top: 6px;
  text-align: center;
  min-height: 18px;
  color: #6b7280; 
  transition: color 0.18s ease;
}

.validation-hint.valid {
  font-size: 12px;
  margin-top: 4px;
  text-align: center;
  color: #10b981;
  min-height: 16px;
  transition: color 0.2s ease;
}

.validation-hint.invalid {
  font-size: 12px;
  margin-top: 4px;
  text-align: center;
  color: #ef4444;
  min-height: 16px;
  transition: color 0.2s ease;
}

.validation-hint.checking {
  color: #f59e0b;
  font-style: italic;
}

#nameInput:invalid {
  border-color: #ef4444;
}

#nameInput:valid {
  border-color: #10b981;
}

#gameControls {
  pointer-events: none;
  top: 65%; /* تغییر از bottom به top */
  right: -5rem;
  align-items: center !important;
  gap: 1rem;
  transform: translateY(-50%); /* برای وسط چین عمودی */
}

#joystick {
  pointer-events: auto;
}

.system-message {
  opacity: 1;
  transition: opacity 0.5s ease;
}

.system-message.fade-out {
  opacity: 0;
}

/* استایل برای تایمر ویس */
.voice-timer {
  display: none;
  position: absolute;
  top: -35px;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  z-index: 1000;
  pointer-events: none;
}

/* استایل برای دکمه ویس در حالت ضبط */
.voice-recording {
  background: #ef4444 !important;
  border-color: #dc2626 !important;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

/* برای تضمین عملکرد در موبایل */
#voiceBtn {
  transition: all 0.3s ease;
}

#voiceBtn img {
  transition: filter 0.3s ease;
}

/* استایل‌های مدال دوربین */
.camera-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:rgb(127 39 39 / 74%);
  z-index: 10000;
  display: none;
}

.camera-container {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 40px 20px 20px 20px;
}

.content-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-bottom: 20px;
}

.controls-container {
  width: 100%;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mode-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* پیش‌نمایش دوربین دایره‌ای */
.camera-preview,
.photo-preview {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fd0000;
}

.photo-preview {
  border-color: #10b981;
}

.controls-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  width: 100%;
  height: 100%;
}

/* کنترل‌های اصلی دوربین */
.camera-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  width: 100%;
  padding: 20px 0;
}

/* دکمه‌های کنترل (کنسل و تغییر) */
.control-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #000000;
  border: 2px solid #f60000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.control-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.control-btn img {
  width: 50px;
  height: 47px;
}

/* دکمه شاتر */
.shutter-btn {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: #000000;
  border: 2px solid #f60000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.shutter-btn:hover {
  background: #f0f0f0;
  transform: scale(1.1);
}

.shutter-btn img {
  width: 50px;
  height: 50px;
}

/* بخش بررسی عکس */
.photo-review {
  width: 100%;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.review-controls {
  display: flex;
  gap: 40px;
  justify-content: center;
}

.review-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #000000;
  border: 2px solid #10b981;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.review-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.review-btn img {
  width: 50px;
  height: 47px;
}

/* استایل نمایش عکس در چت */
.photo-message {
  text-align: left !important;
  direction: ltr !important;
  margin: 8px 0;
}

.circle-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #86efac;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.circle-photo:hover {
  transform: scale(1.05);
}

/* ---- Vibe Modal ---- */
#vibeModal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex; justify-content: center; align-items: center;
  z-index: 1000;
}

.textarea-container {
  position: relative;
  display: inline-block;
  width: 100%;
  margin-bottom: 20px;
}

/* استایل برای شمارنده */
.vibeCounter {
  position: absolute;
  bottom: -20px;
  left: 10px;
  font-size: 10px;
  color: #666;
  background: rgba(255, 255, 255, 0.9);
  padding: 2px 6px;
  border-radius: 10px;
  z-index: 10;
}

#vibeModal .modal-content {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  width: 300px;
  text-align: center;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

#vibeModal h3 {
  margin-bottom: 8px;
}

#vibeModal textarea {
  width: 100%;
  height: 50px;
  resize: none;
  border-radius: 8px;
  border: 1px solid #ccc;
  padding: 6px;
  font-family: inherit;
  text-align: center;
}

#vibeModal .vibe-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}

#vibeModal .vibe-btn {
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}

#vibeModal .vibe-close {
  margin-top: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.confirmationVibe{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 135px;
}

.confirmation{
  max-width: 70%;
}

.kancel{
  max-width: 70%;
}

.vibe-info-container {
  animation: fadeInUp 0.3s ease;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

@keyframes fadeOutUp {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

.vibe-info-container.fade-out {
  animation: fadeOutUp 0.5s ease forwards;
}

/* استایل متمایز برای پیام‌های Vibe */
.system-message.vibe {
  background: #e6fff5;
  border-right: 4px solid #00cc88;
  border-radius: 8px;
  padding: 8px 12px;
  margin: 4px 0;
  font-weight: 500;
}

/* انیمیشن پالس برای آواتار */
.avatar.vibePulse {
  animation: vibePulse 1s ease-in-out;
}

@keyframes vibePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 204, 136, 0.7);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(0, 204, 136, 0.3);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 204, 136, 0);
  }
}

/* استایل برای دکمه غیرفعال */
button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 🎨 Aura picker */
.aura-picker { margin-top: 10px; text-align: center; }
.aura-label {font-size: 12px;color: #333;margin-top: 25px;margin-bottom: 15px;}
.aura-options { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.aura-color {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.08);
  cursor: pointer;
  transition: transform 0.2s;
}
.aura-color.selected {
  transform: scale(1.15);
  box-shadow: 0 0 8px 2px rgba(0,0,0,0.15);
}

/* ✨ Avatar aura animation */
.avatar.aura-active {
  --aura-color: #34c759;
  box-shadow: 0 0 8px 2px var(--aura-color);
  animation: pulseAura 2.8s infinite ease-in-out;
}
@keyframes pulseAura {
  0% { box-shadow: 0 0 6px 2px var(--aura-color); }
  50% { box-shadow: 0 0 18px 6px var(--aura-color); }
  100% { box-shadow: 0 0 6px 2px var(--aura-color); }
}

.record-icon {
  width: 50px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.recording-pulse {
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.play-icon, .change-icon {
  width: 32px;
  cursor: pointer;
  margin-right: -2px;
}

.voice-preview {
  margin-top: 10px;
  align-items: center;
  gap: 10px;
}

.voice-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.recordCounter {
  position: relative;
  font-size: 10px;
  color: #666;
  background: transparent;
  padding: 2px 6px;
  border-radius: 10px;
  z-index: 10;
  margin-left: -10px;
}



/* ======================
   استایل‌های سیستم تبلیغات
====================== */

.ad-container {
  width: 100%;
  height: 80px;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid #000000;
  border-radius: 12px;
  position: sticky;
  top: 0;
  z-index: 100;
  overflow: hidden;
  display: none;
  position: -webkit-sticky; 
}

.ad-slider {
  display: grid;
  grid-template-columns: repeat(var(--slide-count, 1), 100%);
  height: 100%;
  width: 100%;
  transition: transform 0.5s ease-in-out;
}

.ad-slide {
  display: flex;
  width: 100%;
  height: 100%;
  padding: 8px;
  box-sizing: border-box;
  align-items: center;
  cursor: pointer;
  grid-column: 1;
  grid-row: 1;
}

.ad-image {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  margin-left: -6px; 
  flex-shrink: 0; 
}

.ad-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  text-align: right; 
}

.ad-title {
  font-size: 14px;
  font-weight: bold;
  color: #1f2937;
  margin: 0;
  line-height: 1.2;
}

.ad-description {
  font-size: 12px;
  color: #6b7280;
  margin: 2px 0;
  line-height: 1.3;
}

/* پنل مدیریت تبلیغات */
.admin-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  z-index: 2000;
  display: none;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.admin-panel h3 {
  text-align: center;
  margin-bottom: 20px;
  color: #1f2937;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-form input,
.admin-form textarea {
  width: 100%;
  padding: 10px;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
}

.admin-form textarea {
  height: 80px;
  resize: vertical;
}

.paths-selection {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 10px 0;
}

.path-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.admin-buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 15px;
}

.admin-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

.btn-primary {
  background: #059669;
  color: white;
}

.btn-secondary {
  background: #6b7280;
  color: white;
}

.btn-danger {
  background: #ef4444;
  color: white;
}

.ads-list {
  margin-top: 20px;
  max-height: 300px;
  overflow-y: auto;
}

.ad-item {
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
}

.ad-item:hover {
  background: #f9fafb;
}

.ad-item.active {
  border-color: #059669;
  background: #f0fdf4;
}

.admin-icons-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: transparent;
  padding: 10px;
}

.admin-icon-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.admin-icon-btn:hover {
  background: transparent;
  transform: scale(1.1);
}

.admin-icon {
  width: 35px;
  height: 35px;
}

/* ======================
   افکت‌های موسیقی برای آواتار Zee2Rel
====================== */

.avatar.music-playing {
  animation: gentlePulse 2s ease-in-out infinite;
  box-shadow: 0 0 15px rgba(74, 222, 128, 0.6);
  position: relative;
}

.avatar.music-paused {
  animation: none;
  box-shadow: 0 0 8px rgba(156, 163, 175, 0.4);
  opacity: 0.8;
}

.avatar.music-stopped {
  animation: none;
  box-shadow: none;
}

/* نماد موسیقی برای حالت پخش */
.avatar.music-playing::before {
  content: '♪';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  color: #4ade80;
  font-size: 14px;
  font-weight: bold;
  animation: floatNote 3s ease-in-out infinite;
  z-index: 1000;
  text-shadow: 0 0 8px rgba(74, 222, 128, 0.8);
}

/* انیمیشن پالس ملایم */
@keyframes gentlePulse {
  0%, 100% { 
      transform: scale(1);
      box-shadow: 0 0 10px rgba(74, 222, 128, 0.4);
  }
  50% { 
      transform: scale(1.05);
      box-shadow: 0 0 20px rgba(74, 222, 128, 0.8);
  }
}

/* انیمیشن شناور برای نت موسیقی */
@keyframes floatNote {
  0%, 100% { 
      transform: translateX(-50%) translateY(0) rotate(0deg);
      opacity: 0.7;
  }
  25% { 
      transform: translateX(-50%) translateY(-5px) rotate(90deg);
      opacity: 1;
  }
  50% { 
      transform: translateX(-50%) translateY(-10px) rotate(180deg);
      opacity: 0.8;
  }
  75% { 
      transform: translateX(-50%) translateY(-5px) rotate(270deg);
      opacity: 1;
  }
}

/* استایل‌های سیستم ریپلای */
.reply-preview {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 8px;
  transform: translateX(-50%);
  margin-right: -100px;
  direction: rtl;
  text-align: right;
  width: 250px;
}

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

.reply-label {
  font-size: 12px;
  color: #6b7280;
  font-weight: bold;
}

.reply-cancel-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  font-size: 14px;
  padding: 2px 6px;
  border-radius: 4px;
}

.reply-cancel-btn:hover {
  background: #e5e7eb;
  color: #374151;
}

.reply-content {
  font-size: 13px;
  color: #4b5563;
  line-height: 1.4;
}

.reply-preview-message {
  background: #fef3c7;
  padding: 6px 8px;
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 12px;
  color: #92400e;
  cursor: pointer;
  border-right: 3px solid #f59e0b;
}

.reply-preview-message:hover {
  background: #fde68a;
}

.message-separator {
  height: 1px;
  background: #e5e7eb;
  margin: 4px 0;
}

/* ✴️ افکت لرزش هنگام ورود کاراکتر غیرمجاز */
.invalid-vibe {
  animation: shake 0.2s ease-in-out;
  border: 1px solid #ef4444 !important;
  background-color: #fee2e2 !important;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  50% { transform: translateX(3px); }
  75% { transform: translateX(-3px); }
}

/* 🌟 نوتیف ملایم بالای textarea */
.vibe-toast {
  position: absolute;
  background: rgba(30, 41, 59, 0.95); /* خاکستری تیره */
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  transform: translateX(-50%) scale(0.9);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 1000;
}
.vibe-toast.show {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* استایل‌های دکمه برگشت به بالا */
#scrollToTopBtn {
  transition: all 0.3s ease-in-out;
}

#scrollToTopBtn:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 8px 25px rgba(34, 197, 94, 0.3);
}

#scrollToTopBtn.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(20px);
  pointer-events: none;
}

/* استایل برای دایره‌های فعال */
.filter-active div {
  transform: scale(1.1);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3);
  transition: all 0.3s ease-in-out;
}

/* انیمیشن برای پنل فیلتر */
#vibeFilterPanel {
  transition: max-height 0.3s ease-in-out;
  overflow: hidden;
}

/* انیمیشن برای دکمه فیلتر */
#vibeFilterBtn {
  transition: all 0.2s ease-in-out;
}

/* انیمیشن برای دایره‌های فیلتر */
.vibe-filter-bubble {
  transition: all 0.2s ease-in-out;
}

.vibe-filter-bubble div {
  transition: all 0.3s ease-in-out;
}

/* استایل بهینه برای دکمه‌های مسیر */
.vibe-path-bubble {
  min-width: 80px;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 12px;
  text-align: center;
}

.vibe-path-bubble:hover {
  border-color: #3b82f6;
  background: #eff6ff;
  transform: translateY(-1px);
}

.vibe-path-bubble.path-active {
  border-color: #10b981;
  background: #ecfdf5;
  color: #047857;
  font-weight: 600;
}

/* استایل اسکرول بار زیبا برای پنل فیلتر */
#pathFilterPanel::-webkit-scrollbar {
  width: 6px;
}

#pathFilterPanel::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

#pathFilterPanel::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

#pathFilterPanel::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.date-filter-btn.date-active {
  border-color: #8b5cf6;
  background: #faf5ff;
  color: #7c3aed;
  font-weight: 600;
}

/* ======================
   ریسپانسیو برای موبایل
====================== */
@media (max-width: 600px) {
  .login-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background-color: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    max-height: 100vh;
    overflow-y: auto;
}

/* جلوگیری از چرخش در حالت landscape */
@media (orientation: landscape) {
  body::before {
      content: "";
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: #000;
      z-index: 9999;
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      font-size: 18px;
      text-align: center;
      padding: 20px;
  }
  
  body::after {
      content: "لطفاً دستگاه خود را به حالت عمودی برگردانید";
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      background: rgba(0, 0, 0, 0.9);
      color: white;
      padding: 20px;
      border-radius: 10px;
      z-index: 10000;
      font-size: 16px;
      text-align: center;
      max-width: 80%;
  }
}

  #chatArea {
    position: relative;
    width: calc(100% - 20%);
    max-width: calc(100% - 20%);
    margin-right: 20%;
    box-sizing: border-box;
    height: 220px !important;
    max-height: 220px !important;
    min-height: 220px !important;
    flex: none !important;
    border-radius: 0.75rem !important;
  }

  #chatArea > *:not(.ad-container):first-child {
    margin-top: 0;
  }

  #gameControls {
    top: 68%; 
    right: 0.8rem;
    gap: 0.2rem;
    transform: translateY(-50%);
  }

  #joystick {
    width: 4rem;
    height: 4rem;
  }

  #stick {
    width: 1.6rem;
    height: 1.6rem;
  }

  .path-FazBala, .path-Tapesh, .path-Bazigoosh,
  .path-Zharfa, .path-BiKalam, .path-Mana,
  .path-Hayahoo, .path-Hayajan, .path-Raha,
  .path-Khiyal, .path-Roya, .path-Noor,
  .path-NamNam, .path-Sokoot, .path-Tanha {
    background-size: cover;
    background-position: center center;
  }

  #proximityToast {
    position: absolute;
    transform: translate(-50%,50%);
    left: 50%;
    top: 46%;
    font-size: 10px;
  }

  .ad-container {
    height: 70px;
  }
  
  .ad-title {
    font-size: 12px;
  }
  
  .ad-description {
    font-size: 11px;
  }

  .ad-image {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    margin-left: -5px;
    margin-top: -6px;
    flex-shrink: 0;
}
  
  .paths-selection {
    grid-template-columns: 1fr;
  }
  
  .admin-panel {
    padding: 15px;
  }

  .reply-preview {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 2px 10px;
    margin-bottom: 8px;
    transform: translateX(-50%);
    margin-right: -50px;
    direction: rtl;
    text-align: right;
    width: 250px;
  }

  #voiceBtn{
    pointer-events: auto !important;
    margin-left: -35px !important;
    margin-top: 10px !important;
    z-index: 999 !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  #photoBtn{
    pointer-events: auto !important;
    margin-left: 35px !important;
    margin-top: -31px !important;
    z-index: 999 !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  #vibeButton{
    pointer-events: auto !important;
    margin-left: -35px !important;
    margin-top: 10px !important;
    z-index: 999 !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  #VibeBook{
    pointer-events: auto !important;
    margin-left: 35px !important;
    margin-top: -31px !important;
    z-index: 999 !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
  }
  
}

/* ======================
   ریسپانسیو برای تبلت
====================== */
@media (min-width: 601px) and (max-width: 1279px) {

/* جلوگیری از چرخش در حالت landscape */
@media (orientation: landscape) {
  body::before {
      content: "";
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: #000;
      z-index: 9999;
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      font-size: 18px;
      text-align: center;
      padding: 20px;
  }
  
  body::after {
      content: "لطفاً دستگاه خود را به حالت عمودی برگردانید";
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      background: rgba(0, 0, 0, 0.9);
      color: white;
      padding: 20px;
      border-radius: 10px;
      z-index: 10000;
      font-size: 16px;
      text-align: center;
      max-width: 80%;
  }
}

#chatArea {
  position: relative;
  width: calc(100% - 20%);
  max-width: calc(100% - 20%);
  margin-right: 20%;
  box-sizing: border-box;
  height: 400px !important;
  max-height: 400px !important;
  min-height: 400px !important;
  flex: none !important;
  border-radius: 0.75rem !important;
}

#gameControls {
  top: 63.5%;
  right: 2rem;
  gap: 0.5rem;
  transform: translateY(-50%);
}

  #proximityToast {
    position: absolute;
    transform: translate(-50%, 50%);
    left: 50%;
    top: 37%;
  }

  .reply-preview {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 2px 10px;
    margin-bottom: 8px;
    transform: translateX(-50%);
    margin-right: 90px;
    direction: rtl;
    text-align: right;
    width: 250px;
  }
}
