/* ===== Main CSS File - Minimal Version ===== */
/* Path: /assets/css/main.css */

/* Import fonts from CDN */
@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

/* ===== Enhanced Trust Box ===== */
#trustBox {
  position: fixed;
  bottom: 15px;
  left: 15px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  color: white;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  width: 60px;
  font-size: 8px;
  display: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0);
  border: 1px solid rgba(255, 255, 255, 0.1);
  user-select: none;
  margin: 0;
  box-sizing: border-box;
}

#trustBox:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  background: rgba(0, 0, 0, 0.9);
}

/* ===== Enhanced Install Box ===== */
#installBox {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.95) 0%, rgba(56, 142, 60, 0.95) 100%);
  backdrop-filter: blur(15px);
  border-radius: 16px;
  color: white;
  text-align: center;
  box-shadow: 0 10px 35px rgba(76, 175, 80, 0.3);
  z-index: 1000;
  width: 140px;
  font-size: 10px;
  display: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0) scale(1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  user-select: none;
  margin: 0;
  box-sizing: border-box;
}

#installBox:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 45px rgba(76, 175, 80, 0.4);
}

/* ===== Enhanced Close Buttons ===== */
.close-btn {
  position: absolute;
  cursor: pointer;
  font-weight: bold;
  color: #ff4444;
  text-align: center;
  background: linear-gradient(135deg, white 0%, #f8f8f8 100%);
  border-radius: 50%;
  transition: all 0.2s ease;
  border: 2px solid rgba(255, 68, 68, 0.2);
  user-select: none;
}

.close-btn:hover {
  color: #cc0000;
  background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 4px 12px rgba(255, 68, 68, 0.3);
}

#trustBox .close-btn {
  top: -12px;
  right: -12px;
  width: 24px;
  height: 24px;
  font-size: 16px;
  line-height: 20px;
}

#installBox .close-btn {
  top: -10px;
  right: -10px;
  width: 20px;
  height: 20px;
  font-size: 14px;
  line-height: 16px;
}

/* ===== Enhanced Images ===== */
#trustBox img, #installBox img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  transition: transform 0.3s ease;
}

#trustBox img:hover, #installBox img:hover {
  transform: scale(1.05);
}

#trustBox .enamad {
  filter: brightness(1.5) contrast(2) saturate(1.2);
}

/* ===== Enhanced Install Button ===== */
#installBox span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.install-btn {
  display: block;
  width: 100%;
  padding: 8px 0;
  background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
  color: #2e7d32;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0.2, 0.2, 1);
  margin: 0 auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  user-select: none;
}

.install-btn:hover {
  background: linear-gradient(135deg, #f8f8f8 0%, #e8e8e8 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  color: #1b5e20;
}

.install-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ===== Loading Animation ===== */
.loading-indicator {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid #4CAF50;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 9999;
  display: none;
  margin: 0;
  box-sizing: border-box;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ===== Enhanced Update Notification ===== */
.update-notification {
  position: fixed;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
  color: white;
  padding: 16px 28px;
  border-radius: 25px;
  box-shadow: 0 8px 25px rgba(33, 150, 243, 0.3);
  z-index: 10000;
  transition: top 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 14px;
  font-weight: 500;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  min-width: 300px;
  text-align: center;
  user-select: none;
  margin: 0;
  box-sizing: border-box;
}

.update-notification.show {
  top: 20px;
}

.update-notification .version-info {
  font-size: 12px;
  opacity: 0.9;
  margin-bottom: 8px;
}

.update-notification .reason {
  font-size: 11px;
  opacity: 0.7;
  margin-bottom: 12px;
  font-style: italic;
}

.update-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 8px 16px;
  margin: 0 6px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
  display: inline-block;
  user-select: none;
}

.update-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.update-btn.dismiss {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ===== Social Media Widget Styles ===== */
.social-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999999;
  user-select: none;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Header برای توضیح واضح */
.social-header {
  position: absolute;
  bottom: 75px;
  right: -10px;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 5px 20px rgba(30, 60, 114, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateY(10px) scale(0.8);
}

.social-widget.active .social-header {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  animation: headerBounce 0.6s ease-out;
}

@keyframes headerBounce {
  0% { transform: translateY(10px) scale(0.8); }
  60% { transform: translateY(-5px) scale(1.05); }
  100% { transform: translateY(0) scale(1); }
}

.header-icon {
  font-size: 16px;
  animation: iconPulse 2s ease-in-out infinite;
}

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

.header-text {
  font-size: 12px;
  letter-spacing: 0.5px;
}

/* Toggle Button */
.social-toggle {
  width: 65px;
  height: 65px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border: none;
}

.social-toggle::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
  transform: scale(0);
  transition: transform 0.5s ease;
}

.social-toggle:hover::before {
  transform: scale(1.5);
}

.social-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 30px rgba(102, 126, 234, 0.6);
}

.social-toggle:active {
  transform: scale(0.95);
}

.social-toggle svg {
  width: 30px;
  height: 30px;
  fill: white;
  z-index: 2;
  transition: transform 0.3s ease;
}

.social-widget.active .social-toggle svg {
  transform: rotate(180deg);
}

/* Toggle Badge */
.toggle-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  background: #4CAF50;
  border-radius: 50%;
  border: 3px solid white;
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { 
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
  }
  50% { 
    transform: scale(1.1);
    box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
  }
}

/* Social Items Container */
.social-items {
  position: absolute;
  bottom: 80px;
  right: 5px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  list-style: none;
}

.social-widget.active .social-items {
  opacity: 1;
  visibility: visible;
}

/* Social Items */
.social-item {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  transform: translateY(20px) scale(0);
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: none;
}

.social-widget.active .social-item {
  transform: translateY(0) scale(1);
}

.social-widget.active .social-item:nth-child(1) { 
  transition-delay: 0.1s; 
  animation: slideInRight 0.5s ease-out 0.1s;
}
.social-widget.active .social-item:nth-child(2) { 
  transition-delay: 0.2s;
  animation: slideInRight 0.5s ease-out 0.2s;
}
.social-widget.active .social-item:nth-child(3) { 
  transition-delay: 0.3s;
  animation: slideInRight 0.5s ease-out 0.3s;
}

@keyframes slideInRight {
  0% {
    opacity: 0;
    transform: translateX(30px) scale(0.5);
  }
  60% {
    transform: translateX(-5px) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.social-item:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.social-item:active {
  transform: scale(0.95);
}

/* Social Icons */
.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.social-icon svg {
  width: 28px;
  height: 28px;
  fill: white;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* Social Labels */
.social-label {
  position: absolute;
  bottom: -20px;
  font-size: 11px;
  font-weight: 500;
  color: #333;
  background: white;
  padding: 2px 8px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  opacity: 0;
  transition: opacity 0.3s ease;
  white-space: nowrap;
}

.social-item:hover .social-label {
  opacity: 1;
}

/* WhatsApp Style */
.social-item.whatsapp {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

.social-item.whatsapp:hover {
  background: linear-gradient(135deg, #128C7E 0%, #075E54 100%);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
}

/* Telegram Style */
.social-item.telegram {
  background: linear-gradient(135deg, #2AABEE 0%, #0088cc 100%);
  box-shadow: 0 4px 15px rgba(42, 171, 238, 0.4);
}

.social-item.telegram:hover {
  background: linear-gradient(135deg, #0088cc 0%, #0066aa 100%);
  box-shadow: 0 8px 25px rgba(42, 171, 238, 0.6);
}

/* Telegram Channel Style */
.social-item.telegram-channel {
  background: linear-gradient(135deg, #FF6B6B 0%, #EE5A24 100%);
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
  position: relative;
  overflow: visible;
}

.social-item.telegram-channel:hover {
  background: linear-gradient(135deg, #EE5A24 0%, #C44569 100%);
  box-shadow: 0 8px 25px rgba(255, 107, 107, 0.6);
}

/* Channel Badge */
.channel-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #FFD93D;
  color: #333;
  font-size: 9px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  animation: badgeShake 3s ease-in-out infinite;
}

@keyframes badgeShake {
  0%, 90%, 100% { transform: rotate(0deg) scale(1); }
  92% { transform: rotate(-5deg) scale(1.1); }
  94% { transform: rotate(5deg) scale(1.1); }
  96% { transform: rotate(-5deg) scale(1.1); }
  98% { transform: rotate(5deg) scale(1.1); }
}

/* Pulse Ring Animation */
.pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0;
  animation: pulseRing 2s ease-out infinite;
}

.social-item.whatsapp .pulse-ring {
  border-color: #25D366;
}

.social-item.telegram .pulse-ring {
  border-color: #2AABEE;
}

@keyframes pulseRing {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* Tooltips */
.social-item::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 70px;
  top: 50%;
  transform: translateY(-50%) translateX(10px);
  background: #333;
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.social-item::before {
  content: '';
  position: absolute;
  right: 62px;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: #333;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.social-item:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

.social-item:hover::before {
  opacity: 1;
  visibility: visible;
}

/* Entrance Animation */
@keyframes widgetEntrance {
  0% {
    opacity: 0;
    transform: scale(0) rotate(-180deg);
  }
  50% {
    transform: scale(1.1) rotate(10deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.social-widget {
  animation: widgetEntrance 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.5s both;
}

/* ===== Performance optimizations ===== */
.will-change-transform {
  will-change: transform;
}

.gpu-accelerated {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  #trustBox { 
    width: 70px; 
    font-size: 9px; 
    bottom: 20px;
    left: 20px;
  }
  #installBox { 
    width: 120px; 
    font-size: 9px;
    top: 15px;
    right: 15px;
  }
  .install-btn { font-size: 0.7rem; }
  .update-notification {
    font-size: 12px;
    padding: 12px 20px;
    min-width: 250px;
  }
  
  .social-widget {
    bottom: 15px;
    right: 15px;
  }
  
  .social-toggle {
    width: 60px;
    height: 60px;
  }
  
  .social-item {
    width: 50px;
    height: 50px;
  }
  
  .social-icon svg {
    width: 25px;
    height: 25px;
  }
  
  .social-header {
    font-size: 12px;
    padding: 6px 12px;
  }
  
  .social-item::after,
  .social-item::before {
    display: none;
  }
}

@media (max-width: 480px) {
  #trustBox { 
    width: 60px; 
    font-size: 7px;
    padding: 6px;
  }
  #installBox { 
    width: 100px; 
    font-size: 8px;
    padding: 10px;
  }
  .install-btn { 
    font-size: 0.6rem;
    padding: 6px 0;
  }
  .update-notification {
    font-size: 11px;
    padding: 10px 16px;
    min-width: 200px;
  }
  
  .social-widget {
    bottom: 10px;
    right: 10px;
  }
  
  .social-toggle {
    width: 55px;
    height: 55px;
  }
  
  .social-toggle svg {
    width: 25px;
    height: 25px;
  }
  
  .social-item {
    width: 45px;
    height: 45px;
  }
  
  .social-items {
    gap: 10px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .social-label {
    background: #333;
    color: white;
  }
}

/* RTL support for Persian */
.social-widget {
  direction: ltr;
}

.social-header,
.social-label {
  direction: rtl;
}