@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100;200;300;400;500;600;700;800;900&display=swap');

:root {
  --bg-dark: #0a0a0a;
  --bg-card: #111111;
  --bg-card-hover: #1a1a1a;
  --primary-blue: #00a8ff;
  --primary-blue-hover: #0097e6;
  --accent-blue: #2e86de;
  --text-light: #ffffff;
  --text-gray: #b0b0b0;
  --border-radius: 16px;
  --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --glow: 0 0 20px rgba(0, 168, 255, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Vazirmatn', sans-serif;
}

body {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #1a1a2e 50%, #16213e 100%);
  color: var(--text-light);
  direction: rtl;
  min-height: 100vh;
  overflow-x: hidden;
}

.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.8s ease;
}

.loading-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.logo-animation {
  position: relative;
  text-align: center;
}

.logo-text {
  font-size: 4rem;
  font-weight: 900;
  background: linear-gradient(45deg, var(--primary-blue), var(--accent-blue), #00a8ff);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 3s ease infinite, glow 2s ease-in-out infinite alternate;
}

.logo-subtitle {
  color: var(--text-gray);
  margin-top: 10px;
  font-size: 1.2rem;
  opacity: 0;
  animation: fadeInUp 1s ease 1.5s forwards;
}

.loading-bar {
  width: 200px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  margin: 30px auto 0;
  overflow: hidden;
  position: relative;
}

.loading-progress {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary-blue), var(--accent-blue));
  border-radius: 10px;
  animation: loading 2s ease-in-out forwards;
}

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s ease 0.5s forwards;
}

.header {
  text-align: center;
  margin-bottom: 50px;
  position: relative;
}

.header h1 {
  font-size: 3.5rem;
  margin-bottom: 15px;
  background: linear-gradient(45deg, var(--primary-blue), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(0, 168, 255, 0.5);
  animation: float 6s ease-in-out infinite;
}

.header p {
  color: var(--text-gray);
  font-size: 1.3rem;
  max-width: 600px;
  margin: 0 auto;
}

.main-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 1200px) {
  .main-content {
    grid-template-columns: 400px 1fr;
  }
}

.server-panel {
  background: rgba(17, 17, 17, 0.8);
  backdrop-filter: blur(20px);
  border-radius: var(--border-radius);
  padding: 30px;
  border: 1px solid rgba(0, 168, 255, 0.2);
  box-shadow: var(--glow);
  animation: slideInLeft 1s ease;
  position: relative;
  overflow: hidden;
}

.server-panel::before {
  z-index: 1;
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent, rgba(0, 168, 255, 0.1), transparent);
  transform: translateX(-100%);
  animation: shimmer 3s infinite;
}

.server-header {
  z-index: 100;
  display: flex;
  align-items: center;
  margin-bottom: 25px;
}

.server-icon {
    z-index: 100;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  margin-left: 20px;
  background: linear-gradient(135deg, var(--primary-blue), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 20px rgba(0, 168, 255, 0.4);
  animation: pulse 2s infinite;
}

.server-icon img {
  width: 100%;
  border-radius: 50px;
}

.server-title h2 {
  font-size: 1.8rem;
  margin-bottom: 5px;
}

.server-status {
  z-index: 100;
  display: flex;
  align-items: center;
  color: #4caf50;
  font-size: 1rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #4caf50;
  margin-left: 8px;
  animation: pulse 2s infinite;
  box-shadow: 0 0 10px #4caf50;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 25px;
}

.stat-card {
  background: rgba(0, 168, 255, 0.1);
  border-radius: 12px;
  padding: 15px;
  text-align: center;
  border: 1px solid rgba(0, 168, 255, 0.3);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 168, 255, 0.2);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-blue);
  text-shadow: 0 0 10px rgba(0, 168, 255, 0.5);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-gray);
  margin-top: 5px;
}

.ip-section {
  z-index: 100;
  margin-bottom: 25px;
}

.ip-display {
  background: rgba(0, 168, 255, 0.1);
  border: 1px solid rgba(0, 168, 255, 0.3);
  border-radius: var(--border-radius);
  padding: 18px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.ip-display:hover {
  background: rgba(0, 168, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 168, 255, 0.3);
}

.ip-display::after {
  content: 'کلیک برای کپی';
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--primary-blue);
  color: white;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  opacity: 0;
  transition: var(--transition);
}

.ip-display:hover::after {
  opacity: 1;
}

.ip-text {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-light);
}

.quick-actions {
  z-index: 100;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.action-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 15px 10px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.action-btn::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 168, 255, 0.1), transparent);
  opacity: 0;
  transition: var(--transition);
}

.action-btn:hover {
  background: rgba(0, 168, 255, 0.1);
  border-color: var(--primary-blue);
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 168, 255, 0.2);
}

.action-btn:hover::before {
  opacity: 1;
}

.action-btn i {
  font-size: 1.8rem;
  color: var(--primary-blue);
  margin-bottom: 8px;
  transition: var(--transition);
}

.action-btn:hover i {
  transform: scale(1.2);
}

.action-btn h3 {
  font-size: 0.9rem;
  margin-bottom: 5px;
}

.action-btn p {
  font-size: 0.7rem;
  color: var(--text-gray);
}

.gamemodes-panel {
  background: rgba(17, 17, 17, 0.8);
  backdrop-filter: blur(20px);
  border-radius: var(--border-radius);
  padding: 30px;
  border: 1px solid rgba(0, 168, 255, 0.2);
  box-shadow: var(--glow);
  animation: slideInRight 1s ease;
}

.gamemodes-panel h2 {
  font-size: 2rem;
  margin-bottom: 25px;
  text-align: center;
  color: var(--primary-blue);
  position: relative;
}

.gamemodes-panel h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  right: 50%;
  transform: translateX(50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-blue), var(--accent-blue));
  border-radius: 2px;
}

.gamemodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.gamemode-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius);
  padding: 25px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.gamemode-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 168, 255, 0.1), transparent);
  opacity: 0;
  transition: var(--transition);
}

.gamemode-card:hover {
  background: rgba(0, 168, 255, 0.1);
  border-color: var(--primary-blue);
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 168, 255, 0.3);
}

.gamemode-card:hover::before {
  opacity: 1;
}

.gamemode-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.gamemode-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-blue), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 15px;
  box-shadow: 0 5px 15px rgba(0, 168, 255, 0.4);
}

.gamemode-icon i {
  font-size: 1.5rem;
  color: white;
}

.gamemode-title h3 {
  font-size: 1.3rem;
  margin-bottom: 5px;
}

.gamemode-status {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
}

.gamemode-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.players-count {
  display: flex;
  align-items: center;
  color: #4caf50;
  font-weight: 600;
}

.players-count i {
  margin-left: 5px;
}

.gamemode-description {
  color: var(--text-gray);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-top: 10px;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: rgba(17, 17, 17, 0.95);
  border-radius: var(--border-radius);
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 30px;
  border: 1px solid var(--primary-blue);
  box-shadow: 0 0 50px rgba(0, 168, 255, 0.5);
  animation: modalSlideIn 0.4s ease;
  position: relative;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(0, 168, 255, 0.3);
}

.modal-header h2 {
  color: var(--primary-blue);
  font-size: 1.8rem;
  display: flex;
  align-items: center;
}

.modal-header h2 i {
  margin-left: 10px;
}

.close-modal {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 2rem;
  cursor: pointer;
  transition: var(--transition);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-modal:hover {
  color: var(--primary-blue);
  background: rgba(0, 168, 255, 0.1);
}

.modal-body {
  line-height: 1.6;
}

.modal-body p {
  margin-bottom: 15px;
  color: var(--text-gray);
}

.command-box {
  background: rgba(0, 168, 255, 0.1);
  border: 1px solid rgba(0, 168, 255, 0.3);
  border-radius: 12px;
  padding: 15px;
  text-align: center;
  margin: 20px 0;
  cursor: pointer;
  transition: var(--transition);
  direction: ltr;
}

.command-box:hover {
  background: rgba(0, 168, 255, 0.2);
  transform: translateY(-2px);
}

.trust-badges {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 25px;
}

.trust-badge {
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition);
}

.trust-badge:hover {
  transform: scale(1.1);
  border-color: var(--primary-blue);
}

.trust-badge img {
  width: 100%;
}

.toast {
  position: fixed;
  top: 30px;
  left: 30px;
  background: linear-gradient(135deg, var(--primary-blue), var(--accent-blue));
  color: white;
  padding: 15px 25px;
  border-radius: var(--border-radius);
  box-shadow: 0 10px 30px rgba(0, 168, 255, 0.4);
  z-index: 1100;
  transform: translateX(-150%);
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.show {
  transform: translateX(0);
}

.toast i {
  font-size: 1.2rem;
}

.footer {
  text-align: center;
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px solid rgba(0, 168, 255, 0.2);
  color: var(--text-gray);
  font-size: 0.9rem;
  opacity: 0;
  animation: fadeIn 1s ease 1s forwards;
}

.footer p {
  margin-bottom: 10px;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

.social-link {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-gray);
  text-decoration: none;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-link:hover {
  background: var(--primary-blue);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 168, 255, 0.4);
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes glow {
  from { text-shadow: 0 0 20px rgba(0, 168, 255, 0.5); }
  to { text-shadow: 0 0 30px rgba(0, 168, 255, 0.8), 0 0 40px rgba(0, 168, 255, 0.6); }
}

@keyframes loading {
  0% { width: 0%; }
  100% { width: 100%; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(-50px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 768px) {
  .header h1 {
    font-size: 2.5rem;
  }
  
  .main-content {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .quick-actions {
    grid-template-columns: 1fr;
  }
  
  .gamemodes-grid {
    grid-template-columns: 1fr;
  }
  
  .logo-text {
    font-size: 3rem;
  }
}