/* عجلة الحظ - التصميم */
.wheel-section {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  margin: 30px auto;
  padding: 25px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  text-align: center;
}

.section-title {
  color: #1e293b;
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 20px;
  text-align: center;
}

.section-title i {
  color: #f59e0b;
  margin-left: 10px;
}

/* حاوية العجلة */
.wheel-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.wheel-wrapper {
  position: relative;
  width: 300px;
  height: 300px;
}

/* العجلة نفسها */
.wheel {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  border: 8px solid #fbbf24;
  box-shadow: 0 0 30px rgba(251, 191, 36, 0.4);
  transition: transform 4s cubic-bezier(0.23, 1, 0.32, 1);
  background: conic-gradient(
    from 0deg,
    #ef4444 0deg 60deg,
    #f97316 60deg 120deg,
    #eab308 120deg 180deg,
    #22c55e 180deg 240deg,
    #3b82f6 240deg 300deg,
    #8b5cf6 300deg 360deg
  );
}

/* أقسام العجلة */
.wheel .wheel-section {
  position: absolute;
  width: 50%;
  height: 50%;
  transform-origin: 100% 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  color: white;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.wheel .wheel-section:nth-child(1) {
  transform: rotate(0deg);
  background: #ef4444;
}

.wheel .wheel-section:nth-child(2) {
  transform: rotate(60deg);
  background: #f97316;
}

.wheel .wheel-section:nth-child(3) {
  transform: rotate(120deg);
  background: #eab308;
}

.wheel .wheel-section:nth-child(4) {
  transform: rotate(180deg);
  background: #22c55e;
}

.wheel .wheel-section:nth-child(5) {
  transform: rotate(240deg);
  background: #3b82f6;
}

.wheel .wheel-section:nth-child(6) {
  transform: rotate(300deg);
  background: #8b5cf6;
}

/* مؤشر العجلة */
.wheel-pointer {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 25px solid #dc2626;
  z-index: 10;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* زر التدوير */
.spin-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 50px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.spin-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6);
}

.spin-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* عرض النتيجة للمستخدمين الذين لعبوا من قبل */
.wheel-result-display {
  text-align: center;
}

.already-spun {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.already-spun i {
  font-size: 48px;
  margin-bottom: 15px;
  display: block;
}

.already-spun h4 {
  margin: 15px 0;
  font-size: 20px;
}

.already-spun p {
  font-size: 18px;
  margin: 10px 0;
}

.already-spun small {
  opacity: 0.8;
  font-size: 14px;
}

/* رسالة تسجيل الدخول */
.wheel-login-required {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  padding: 40px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.wheel-login-required i {
  font-size: 48px;
  margin-bottom: 20px;
  display: block;
}

.wheel-login-required h4 {
  margin: 15px 0;
  font-size: 22px;
}

.wheel-login-required p {
  margin: 15px 0;
  opacity: 0.9;
  font-size: 16px;
}

.wheel-login-required .btn {
  background: white;
  color: #3b82f6;
  border: none;
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: bold;
  margin-top: 15px;
  transition: all 0.3s ease;
}

.wheel-login-required .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

/* نافذة النتيجة المنبثقة */
.wheel-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.wheel-modal-content {
  background: white;
  margin: 10% auto;
  padding: 0;
  border-radius: 20px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

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

.wheel-modal-header {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  padding: 20px;
  border-radius: 20px 20px 0 0;
  text-align: center;
}

.wheel-modal-header h3 {
  margin: 0;
  font-size: 24px;
}

.wheel-modal-header i {
  font-size: 28px;
  margin-left: 10px;
}

.wheel-modal-body {
  padding: 30px;
  text-align: center;
}

.prize-display {
  text-align: center;
}

.prize-icon {
  font-size: 60px;
  margin-bottom: 20px;
}

.prize-display h4 {
  color: #374151;
  margin: 15px 0;
  font-size: 18px;
}

.prize-name {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 28px;
  font-weight: bold;
  margin: 20px 0;
}

.wheel-modal-footer {
  padding: 20px;
  text-align: center;
  border-top: 1px solid #e5e7eb;
}

.wheel-modal-footer .btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.wheel-modal-footer .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

/* تصميم متجاوب */
@media (max-width: 768px) {
  .wheel-section {
    margin: 20px 15px;
    padding: 20px;
  }
  
  .wheel-wrapper {
    width: 250px;
    height: 250px;
  }
  
  .wheel {
    width: 250px;
    height: 250px;
  }
  
  .wheel .wheel-section {
    font-size: 12px;
  }
  
  .spin-btn {
    padding: 12px 25px;
    font-size: 16px;
  }
  
  .wheel-modal-content {
    width: 95%;
    margin: 20% auto;
  }
  
  .prize-name {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .wheel-wrapper {
    width: 200px;
    height: 200px;
  }
  
  .wheel {
    width: 200px;
    height: 200px;
  }
  
  .wheel .wheel-section {
    font-size: 10px;
  }
  
  .section-title {
    font-size: 20px;
  }
  
  .already-spun, .wheel-login-required {
    padding: 25px;
  }
}
