@font-face {
    font-family: 'Vazir';
    src: url('/static/fonts/Vazir-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Vazir';
    src: url('/static/fonts/Vazir-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

.lottery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    font-family: 'Vazir', system-ui, sans-serif;
    background-color: #F5F3FF;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header {
    text-align: center;
    margin-bottom: 2rem;
}

.header-heading {
    color: #6B46C1;
    font-size: 2rem;
    font-weight: bold;
}

.messages {
    margin-bottom: 1.5rem;
}

.message-success {
    color: #2ECC71;
    background-color: #E8F5E9;
    padding: 1rem;
    border-radius: 5px;
    text-align: center;
}

.message-error {
    color: #E74C3C;
    background-color: #FEE2E2;
    padding: 1rem;
    border-radius: 5px;
    text-align: center;
}

.no-messages {
    color: #777;
    text-align: center;
}

.wheel-section {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}

.wheel-container {
    position: relative;
    width: 100%;
    max-width: 450px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.wheel {
    width: 100%;
    height: 100%;
    transform-origin: 50% 50%;
}

.wheel-segments {
    transform-origin: 50% 50%;
}

.pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 40px;
    background-color: #6B46C1;
    clip-path: polygon(50% 100%, 75% 0, 25% 0);
    z-index: 10;
    border: 2px solid #fff;
}

.spin-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #6B46C1;
    color: #fff;
    border: none;
    border-radius: 50%; /* دایره‌ای کردن دکمه */
    width: 80px;
    height: 80px;
    font-size: 1.2rem;
    font-family: 'Vazir', system-ui, sans-serif;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s; /* فقط تغییر رنگ هنگام هاور */
    z-index: 10;
}

.spin-button:hover {
    background-color: #9F7AEA; /* فقط تغییر رنگ، بدون جابه‌جایی */
}

.spin-button:disabled {
    background-color: #B794F4;
    cursor: not-allowed;
}

.info-section {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.winners-table, .countdown {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.winners-table h2, .countdown h2 {
    color: #6B46C1;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.ticket-table {
    width: 100%;
    border-collapse: collapse;
}

.ticket-table th, .ticket-table td {
    padding: 0.75rem;
    text-align: right;
    border-bottom: 1px solid #D6BCFA;
}

.ticket-table th {
    background-color: #6B46C1;
    color: #fff;
    font-weight: bold;
}

.ticket-table td {
    color: #333;
}

.countdown p {
    font-size: 1.5rem;
    color: #b74fcc;
    font-weight: bold;
    text-align: center;
}

.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.popup-content {
    background-color: #fff;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    text-align: center;
    font-family: 'Vazir', system-ui, sans-serif;
}

.popup-content h2 {
    color: #6B46C1;
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.close-popup {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6B46C1;
}

.ticket-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.form-label {
    color: #333;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #D6BCFA;
    border-radius: 5px;
    font-family: 'Vazir', system-ui, sans-serif;
    font-size: 1rem;
}

.submit-button {
    background-color: #6B46C1;
    color: #fff;
    border: none;
    /*padding: 0.75rem 1.5rem;*/
    border-radius: 100px;
    font-family: 'Vazir', system-ui, sans-serif;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
  align-items: flex-end;
}

.submit-button:hover {
    background-color: #9F7AEA;
}

@media (max-width: 768px) {
    .wheel-section {
        flex-direction: column;
        align-items: center;
    }
    .wheel-container {
        max-width: 350px;
    }
}
/* 🎯 شمارش‌گر زیباتر */
.time-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
  flex-direction: row-reverse; /* 👈 معکوس کردن ترتیب — ثانیه سمت راست، روز سمت چپ */

}

.time-box {
  background-color: #111827;
  color: #fff;
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  width: 65px;
  text-align: center;
  box-shadow: inset 0 -2px 0 rgba(255,255,255,0.08);
  transition: transform 0.2s;
}
.time-box:hover {
  transform: translateY(-3px);
}
.time-box span {
  display: block;
  font-weight: bold;
  font-size: 1.3rem;
  font-family: 'Vazir', sans-serif;
  line-height: 1.2;
}
.time-box small {
  display: block;
  font-size: 0.75rem;
  opacity: 0.85;
  margin-top: 0.2rem;
}

/* 📝 بخش توضیحات پایین صفحه */
.notes {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  padding: 1.5rem;
  margin-top: 2rem;
  line-height: 1.8;
  text-align: justify;
  font-family: 'Vazir', sans-serif;
  color: #333;
}

.notes p {
  margin: 0.5rem 0;
  font-size: 1rem;
}

.notes a.button-link {
  display: inline-block;
  background-color: #6B46C1;
  color: #fff;
  font-weight: bold;
  padding: 0.8rem 1.6rem;
  border-radius: 50px;
  text-decoration: none;
  margin-top: 1rem;
  transition: background-color 0.3s ease, transform 0.15s ease;
  box-shadow: 0 4px 15px rgba(107,70,193,0.3);
}

.notes a.button-link:hover {
  background-color: #9F7AEA;
  transform: translateY(-2px);
}

/* 📱 واکنش‌گرا برای موبایل */
@media (max-width: 600px) {
  .notes {
    padding: 1.2rem;
    font-size: 0.95rem;
    text-align: right;
  }
  .notes a.button-link {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 1rem;
  }
  .time-box {
    width: 55px;
    padding: 0.5rem 0.6rem;
  }
  .time-box span {
    font-size: 1.1rem;
  }
}
