:root {
  --elw-primary: #1e73be;
  --elw-secondary: #27ae60;
  --elw-bg: #ffffff;
  --elw-text: #333;
  --elw-gray-light: #f9f9f9;
  --elw-gray-border: #ddd;
  --elw-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.spin-page {
  max-width: 900px;
  margin: 5px auto;
  font-family: inherit;
  line-height: 1.6;
}

.spin-card {
  display: flex;
  background: var(--elw-bg);
  border-radius: 24px;
  box-shadow: var(--elw-shadow);
  overflow: hidden;
  border: 1px solid #eee;
  flex-wrap: wrap;
}

/* بخش اطلاعات و فرم */
.spin-card__info {
  flex: 1.2;
  padding: 10px;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.spin-card__info h2 {
  margin-top: 5;
  color: var(--elw-primary);
  font-size: 1.8rem;
}

/* بخش گردونه */
.spin-card__wheel {
  flex: 1;
  background: var(--elw-gray-light);
  display: flex;
  align-items: center;
  justify-content: center;
padding: 40px 0px;
  min-width: 300px;
  position: relative;
}

/* استایل فرم و ورودی‌ها */
.spin-form {
  margin-top: 25px;
}

.spin-form__input {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
}

.spin-form input[type="tel"],
.spin-form input[type="text"] {
  flex: 1;
  padding: 14px;
  border: 2px solid var(--elw-gray-border);
  border-radius: 12px;
  font-size: 16px;
  text-align: center;
  transition: all 0.3s;
  direction: ltr; /* برای شماره موبایل و کد */
}

.spin-form input:focus {
  border-color: var(--elw-primary);
  outline: none;
  box-shadow: 0 0 0 4px rgba(30, 115, 190, 0.1);
}

.spin-form button:not(.text-btn) {
  background: var(--elw-primary);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s;
  white-space: nowrap;
}

.spin-form button:not(.text-btn):hover {
  background: #165a9a;
  transform: translateY(-2px);
}

/* بخش تایمر و دکمه‌های متنی */
.otp-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  margin-top: 10px;
}

.text-btn {
  background: none;
  border: none;
  color: var(--elw-primary);
  cursor: pointer;
  font-weight: bold;
}

.text-btn:disabled {
  color: #ccc;
  cursor: not-allowed;
}

/* استایل نتیجه نهایی (Step 3) */
.step-result {
  text-align: center;
  animation: fadeIn 0.6s ease-out;
}

.congrats-text {
  color: var(--elw-secondary);
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.coupon-box {
  background: #f0fdf4;
  border: 2px dashed var(--elw-secondary);
  padding: 20px;
  border-radius: 16px;
  margin-top: 20px;
}

.coupon-code-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 15px 0;
}

#final-coupon-code {
  font-family: monospace;
  font-size: 1.6rem;
  background: #fff;
  padding: 5px 15px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  color: var(--elw-text);
}

.copy-btn {
  background: #333 !important;
  padding: 8px 12px !important;
  font-size: 1.2rem !important;
}

/* استایل گردونه */
.wheel-wrapper {
  width: 320px;
  height: 320px;
  position: relative;
}

.wheel-pointer {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 40px;
  background: var(--elw-primary);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
  z-index: 10;
}

.wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 10px solid #fff;
  box-shadow: 0 0 20px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
  transition: transform 4s cubic-bezier(0.15, 0, 0.15, 1);
}

/* رنگ‌بندی داینامیک تکه‌ها */
.wheel-layer--1 {
  width: 100%;
  height: 100%;
  background: conic-gradient(
    #ef4444 0 72deg,
    #3b82f6 72deg 144deg,
    #10b981 144deg 216deg,
    #f59e0b 216deg 288deg,
    #8b5cf6 288deg 360deg
  );
}

.wheel-text {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  transform: rotate(calc(var(--i) * 72deg + 50deg));
}

.wheel-text span {
  display: block;
  transform: translate(-50%, -120px);
  color: #fff;
  font-weight: bold;
  font-size: 1.1rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.wheel-cap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

/* اعلان‌ها (Toast) */
.toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  padding: 15px 25px;
  border-radius: 12px;
  color: white;
  font-weight: bold;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  z-index: 10000;
  
  /* تغییرات برای حل مشکل حباب خالی */
  visibility: hidden;      /* کاملا مخفی می‌شود */
  opacity: 0;              /* کاملا شفاف می‌شود */
  transform: translateY(20px); /* کمی پایین‌تر قرار می‌گیرد */
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.show { 
  visibility: visible;     /* نمایان می‌شود */
  opacity: 1;              /* خودرنگ می‌شود */
  transform: translateY(0); /* به جای اصلی برمی‌گردد */
}

.toast.success { background: var(--elw-secondary); }
.toast.error { background: #ef4444; }

/* کلاس کمکی مخفی‌سازی */
.hidden { display: none !important; }

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

/* ریسپانسیو */
@media (max-width: 768px) {
  .spin-card { flex-direction: column; margin:0px; }
  .wheel-wrapper { width: 270px; height: 270px;margin-left:13px; }
  .wheel-text span { transform: translate(-50%, -100px); }
  .spin-card__info { padding: 10px; }
  .spin-form__input { flex-direction: column; }
.spin-card__info {
  min-width: 100%;
width:100%;

}
.spin-card__wheel{
padding: 20px 0px !important;
}
}