* { box-sizing: border-box; margin: 0; padding: 0; }

  @font-face {
  font-family: "Moderna Condensed";
  src: url("files/ModernaSans-RegularCnd.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

 @font-face {
  font-family: "vazir";
  src: url("files/Vazirmatn-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

body {
    background-color: #f2f2f2;
    color: #111;
    font-family: "vazir", sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

input , submit , p , textarea , button {  font-family: "vazir", sans-serif;  }

.app-container {
    width: 100%;
    max-width: 1100px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* --- Header Styles --- */
/* --- Header Styles Optimized --- */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #eaeaea;
    border: 1.5px solid #888;
    border-radius: 12px;
    padding: 10px 25px; /* پدینگ بیشتر برای نسخه دسکتاپ */
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* انیمیشن و استایل آیکون انفجار هدر */
.crash-header-icon {
    color: #e68927;
    animation: chartPulse 1.5s infinite alternate ease-in-out;
}
@keyframes chartPulse {
    0% { transform: scaleY(0.9) translateY(2px); color: #e68927; }
    100% { transform: scaleY(1.1) translateY(-2px); color: #2e7d32; }
}

/* استایل دکمه پروفایل و متن آن */
.profile-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: "vazir", sans-serif;
    color: #111;
}

.profile-text {
    font-size: 0.95rem;
    font-weight: 900;
}

/* استایل هدر بخش سوالات متداول */
.faq-title-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-left {
       display: flex;
    align-items: center;
    gap: 6px;
}

.add-btn {
    background: #000;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.1s;
}
.add-btn:active { transform: scale(0.95); }

.balance-wrapper {
       font-size: 1rem;
    font-weight: 900;
    direction: ltr;
    display: flex;
    align-items: center;
}

.currency { font-size: 0.9rem; margin-right: 5px; }
.game-title { font-size: 1.17rem; font-weight: 900; }

.game-title-link {
    text-decoration: none;
    color: #000;
}

.game-title-link:hover {
    text-decoration: none;
    color: #000;
}

/* --- Layout Structure --- */
.game-layout {
    display: flex;
    gap: 15px;
    align-items: stretch;
}

.canvas-section {
    flex: 2; /* عرض بیشتر برای ناحیه نمودار */
    background: #eaeaea;
    border: 1.5px solid #888;
    border-radius: 12px;
    padding: 3px 6px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.panel-section {
    flex: 1; /* عرض کمتر برای کنترل‌ها */
    background: #eaeaea;
    border: 1.5px solid #888;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* --- Canvas Elements --- */
.status-badge {
    background-color: #333;
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    position: absolute;
    top: 20px;
    z-index: 10;
}

.canvas-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#gameCanvas {
    width: 100%;
    height: 100%;
    max-height: 400px;
}


.multiplier-display {
    position: absolute;
    font-size: 5rem;
    font-weight: 900;
    color: #000;
    z-index: 5;
    font-variant-numeric: tabular-nums;
}
.multiplier-display.crashed { color: #d32f2f; }

/* --- Betting Panel --- */
#actionBtn {
    background: #e68927;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 15px 20px;
    font-size: 2rem;
    font-weight: 900;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s;
    line-height: 1.2;
}

.btn-bet { background: #e68927 !important; }
.btn-cancel { background: #555 !important; }
.btn-cashout { background: #538428 !important; display: flex; flex-direction: column; align-items: center; justify-content: center;}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.input-group label {
    text-align: center;
    font-weight: 900;
    font-size: 1.1rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 20px;
    border: 1.5px solid #888;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: left;
    outline: none;
}

.badge-2x {
    position: absolute;
    right: 10px;
    background: #222;
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}
.badge-2x:active {
    transform: scale(0.9);
    background: #000;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 800px) {
    
    .app-header {
        padding: 5px 12px; /* تنظیم پدینگ هدر برای موبایل */
    }
    
    .profile-text {
        display: none; /* مخفی کردن نوشته حساب کاربری در موبایل */
    }
    
#gameCanvas{
    min-height:290px;
    max-height: 300px;
    height:auto;
}

.canvas-section {

    padding: 2px 3px;
}
    
    
    .game-layout {
        flex-direction: column;
    }
    .canvas-section {
        min-height: 290px;
    }
    .panel-section {
        padding: 15px;
    }
    #actionBtn {
        font-size: 1.6rem;
        padding: 15px;
    }
  
    #multiplier {
        /* تابع clamp باعث می‌شود فونت بین 3rem تا 4.5rem متناسب با عرض صفحه تغییر کند */
        font-size: clamp(3rem, 15vw, 4.5rem) !important;
        transform: translate(-50%, -50%) scale(1, 1);
    }
}


   .canvas-wrapper {
      position: relative;
    width: 100%;
    height: 100%;
       margin: 0px auto 0px auto;
}
#gameCanvas {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    display: block;
    background: #eaeaea;
}
#multiplier {
       position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.30, 1.20);
    font-weight: normal;
    margin: 0;
    z-index: 10;
    font-size: 6.5rem;
    font-family: "Moderna Condensed";
    pointer-events: none;
}


/* --- History Section --- */
.history-layout {
    background: #eaeaea;
    border: 1.5px solid #888;
    border-radius: 12px;
    padding: 3px;
    width: 100%;
}

.table-responsive {
    overflow-x: auto;
    max-height: 330px;
    overflow-y: auto;
}

#historyTable {
    width: 100%;
    border-collapse: separate; /* تغییر حیاتی برای کارکرد صحیح sticky */
    border-spacing: 0;
    text-align: center;
    background: #fff;
    border-radius: 8px;
}
#historyTable th, #historyTable td {
    padding: 12px 10px;
    border-bottom: 1px solid #ddd;
    font-size: 1rem;
}
#historyTable th {
    background: #e0e0e0;
    font-weight: 900;
    color: #333;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 1px 0 #ddd; /* جایگزین حاشیه پایین برای جلوگیری از باگ اسکرول */
}
.crash-lbl {
    font-weight: 900;
}
.text-success , .text-danger  { direction: ltr; display: inline-block; }
.hash-col {
    font-family: monospace;
    font-size: 0.85rem;
    color: #666;
    max-width: 170px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (max-width: 800px) {
    .desktop-only { display: none !important; }
    #historyTable th, #historyTable td { padding: 8px 5px; font-size: 0.9rem; }
}

/* --- Auto Cashout Styles --- */
.auto-cashout-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: -10px;
    align-items: center;
}

.auto-label {
    text-align: right;
    font-weight: 900;
    font-size: 1.1rem;
    color: #999;
}

.auto-controls {
       display: flex;
    align-items: center;
    border: 1.5px solid #a3a3a3;
    background: #fff;
    height: 50px;
        border-radius: 25px;
    padding: 3px 13px;
}

#autoCashoutInput {
    width: 35%;
    height: 100%;
    border: none;
    border-right: 1.5px solid #a3a3a3;
    text-align: center;
    font-size: 1.4rem;
    font-weight: bold;
    outline: none;
    color: #000;
}

.slider-container {
    width: 65%;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 12px;
}

#autoCashoutSlider {
    -webkit-appearance: none;
    width: 100%;
    height: 10px;
    background: #e0e0e0; /* Fallback */
    border-radius: 5px;
    outline: none;
}

#autoCashoutSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #bebebe;
    border: 6px solid #bebebe;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.3);
    cursor: pointer;
}

#autoCashoutSlider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #bebebe;
    border: 6px solid #bebebe;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.3);
    cursor: pointer;
}

.canvas-section, .panel-section {
    position: relative;
    overflow: hidden; 
}

.disconnect-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(234, 234, 234, 0.75);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.disconnected .disconnect-overlay {
    opacity: 1;
    pointer-events: auto;
}

.disconnected > *:not(.disconnect-overlay) {
    filter: blur(6px);
    pointer-events: none;
    user-select: none;
    transition: filter 0.3s ease;
}

.disconnect-icon {
    width: 55px; height: 55px; margin-bottom: 15px;
    fill: #d32f2f;
}

.btn-reconnect {
    background: #d32f2f; color: #fff; border: none;
    padding: 12px 25px; border-radius: 8px;
    font-size: 1.1rem; font-weight: 900; cursor: pointer;
    box-shadow: 0 4px 10px rgba(211, 47, 47, 0.3);
    transition: background 0.2s, transform 0.1s;
    font-family: "vazir", sans-serif;
}

.btn-reconnect:hover { background: #b71c1c; }
.btn-reconnect:active { transform: scale(0.95); }

         /* =========================================
   About Crash Game Section Styles
========================================= */
.about-crash-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    margin-top: 10px;
}

/* A - Banner Styles */
.about-banner {
    display: flex;
    align-items: center;
   background: #f7f7f7;
    border: 1.5px solid #888;
    border-radius: 12px;
    padding: 30px;
    gap: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.about-content {
    flex: 1.8;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.about-subtitle {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e68927;
    font-weight: 900;
    font-size: 0.95rem;
}

.about-title {
    font-size: 1.6rem;
    font-weight: 900;
    color: #111;
    line-height: 1.4;
}

.about-text {
    font-size: 1rem;
    color: #555;
    line-height: 1.8;
    text-align: justify;
}

.about-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-image img {
    max-width: 100%;
    height: auto;
}


.about-features {
    display: flex;
    gap: 15px;
    width: 100%;
}

.feature-box {
    flex: 1;
   background: #ffffff;
    border: 1.5px solid #888;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.feature-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.feature-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* آیکون‌ها بر اساس رنگ‌بندی تصویر شما */
.icon-green { background: #e8f5e9; color: #2e7d32; }
.icon-orange { background: #fff3e0; color: #e65100; }
.icon-blue { background: #e3f2fd; color: #1565c0; }

.feature-title {
    font-size: 1.2rem;
    font-weight: 900;
    color: #111;
}

.feature-number {
    width: 35px;
    height: 35px;
    background: #f0f0f0;
    color: #555;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 900;
    font-size: 1.1rem;
}

.feature-desc {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.7;
    text-align: right;
}

/* Responsive Design for Mobile (کمتر از 800 پیکسل) */
@media (max-width: 800px) {
    .about-banner {
        flex-direction: column-reverse; /* قرار دادن تصویر بالای متن در موبایل */
        padding: 20px;
        text-align: center;
    }
    
    .about-content {
        align-items: center;
    }

    .about-text {
        text-align: center; /* راست‌چین به وسط‌چین در موبایل برای زیبایی */
    }

    .about-features {
        flex-direction: column; /* سه باکس زیر هم قرار می‌گیرند */
    }
}

/* =========================================
   FAQ Section Styles
========================================= */
.faq-section {
    background: #ffffff;
    border: 1.5px solid #888;
    border-radius: 12px;
    padding: 25px;
    margin-top: 10px;
    width: 100%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.faq-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    direction: rtl;
}

.faq-title {
    font-size: 1.3rem;
    font-weight: 900;
    color: #111;
}

.faq-toggle-more {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: #555;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    font-weight: bold;
    transition: color 0.2s;
    flex-direction: row-reverse;
}
.faq-toggle-more:hover { color: #111; }

.faq-toggle-more .chevron-icon {
    transition: transform 0.3s;
}
.faq-toggle-more.is-open .chevron-icon {
    transform: rotate(90deg); /* چرخش فلش دکمه بالایی هنگام باز شدن */
}

.faq-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    border: 1.5px solid #eaeaea;
    border-radius: 10px;
    overflow: hidden;
    background: #fafafa;
    transition: border-color 0.3s;
}
.faq-item.active {
    border-color: #d1d1d1;
    background: #ffffff;
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 15px;
    padding: 18px 20px;
    background: none;
    border: none;
    font-size: 1.05rem;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s, color 0.2s;
    text-align: right;
}
.faq-question:hover { background: #f4f4f4; }

.faq-arrow {
    transition: transform 0.3s ease;
    color: #888;
    min-width: 20px;
}

.faq-item.active .faq-arrow {
    transform: rotate(180deg);
    color: #e68927;
}

.faq-item.active .faq-question {
    color: #e68927;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease-out;
}

.faq-answer p {
    padding: 0 20px 20px 55px; /* فاصله از راست برای هم‌راستایی با متن سوال */
    color: #666;
    font-size: 0.95rem;
    line-height: 1.8;
    text-align: justify;
}

.faq-extra {
    display: none; /* پنهان کردن ۵ سوال دوم در حالت پیش‌فرض */
}

@media (max-width: 800px) {
    .faq-header {
        flex-direction: row; /* در موبایل هم ساختار حفظ شود */
    }
    .faq-question {
        font-size: 0.95rem;
        padding: 15px;
        gap: 10px;
    }
    .faq-answer p {
        padding: 0 15px 15px 40px;
    }
}


.trust-section {
    background: #ebffeb;
    border: 1.5px solid #8ad06e;
    border-radius: 12px;
    padding: 15px 25px;
    margin-top: 10px;
    margin-bottom: 20px;
    width: 100%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    direction: rtl;
}

.trust-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.trust-item {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 10px 15px;
    border-left: 1.5px solid #eaeaea; /* خطوط جداکننده دسکتاپ */
}

.trust-item:last-child {
    border-left: none; /* حذف خط آخرین آیتم در دسکتاپ */
}

.trust-icon {
    background: #e8f5e9; /* پس زمینه سبز ملایم */
    color: #2e7d32; /* رنگ آیکون سبز تیره */
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.trust-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: right;
}

.trust-text h4 {
    font-size: 1.05rem;
    font-weight: 900;
    color: #111;
    margin: 0;
}

.trust-text p {
    font-size: 0.85rem;
    color: #777;
    margin: 0;
}

/* =========================================
   Responsive Rules for Trust Section
========================================= */
@media (max-width: 800px) {
    .trust-container {
        flex-wrap: wrap;
    }

    .trust-item {
        flex: 0 0 50%; /* در موبایل دقیقا ۲ آیتم در هر ردیف */
        border-left: none; 
        justify-content: flex-start;
        padding: 15px 10px;
    }

    /* اعمال خط جداکننده عمودی فقط برای آیتم‌های سمت راست در موبایل */
    .trust-item:nth-child(odd) {
        border-left: 1.5px solid #eaeaea;
    }

    /* اعمال خط جداکننده افقی برای ردیف اول در موبایل */
    .trust-item:nth-child(1),
    .trust-item:nth-child(2) {
        border-bottom: 1.5px solid #eaeaea;
    }
}

/* برای گوشی‌های بسیار کوچک */
@media (max-width: 480px) {
    .trust-item {
        flex: 0 0 100%; /* یک آیتم در هر ردیف */
        border-left: none !important;
        border-bottom: 1.5px solid #eaeaea;
    }
    .trust-item:last-child {
        border-bottom: none;
    }
}

/* =========================================
   Footer & Beating Heart Animation
========================================= */
.site-footer {
    text-align: center;
    padding: 25px 15px 30px; /* فاصله از بالا و پایین */
    margin-top: 20px;
    border-top: 1.5px solid #eaeaea; /* یک خط جداکننده محو و زیبا */
    color: #777; /* رنگ متن هماهنگ با تم */
    font-size: 0.95rem;
    font-weight: 500;
    direction: rtl;
    background-color: transparent;
}

.site-footer p {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px; /* فاصله استاندارد بین متن و قلب */
}

/* کلاس مربوط به قلب */
.beating-heart {
    display: inline-block;
    font-size: 1.2rem; /* کمی بزرگتر برای جلوه بهتر */
    animation: beatheart 1.5s infinite; /* اجرای مداوم انیمیشن */
    transform-origin: center;
}

/* فریم‌های کلیدی برای انیمیشن تپش قلب (دو ضربه‌ای شبیه قلب واقعی) */
@keyframes beatheart {
    0% { transform: scale(1); }
    15% { transform: scale(1.3); }
    30% { transform: scale(1); }
    45% { transform: scale(1.3); }
    70% { transform: scale(1); }
    100% { transform: scale(1); }
}

/* تنظیمات رسپانسیو برای موبایل */
@media (max-width: 480px) {
    .site-footer p {
        font-size: 0.85rem; /* کوچکتر شدن متن در موبایل */
        line-height: 1.6;
        flex-wrap: wrap; /* در صورت طولانی بودن متن، قلب به خط بعد نرود و درست نمایش داده شود */
    }
    
   
     .profile-btn {
border-radius: 50%;
padding:0px;
width: 31px;
    height: 31px;
}
    
}

      /* =========================================
   Header User Profile Refinements
========================================= */


.profile-btn {
    background: #e68927;
    color: #fff;
    border: none;
       border-radius: 10px;
    padding: 7px 10px;
     width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
    box-shadow: 0 3px 8px rgba(230, 137, 39, 0.3);
}
.profile-btn:hover { background: #cf7920; }
.profile-btn:active { transform: scale(0.92); }

.header-left {  }

/* =========================================
   Modal System Styles
========================================= */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    background: #f7f7f7;
    width: 90%;
    max-width: 450px;
        max-height: 90vh;
    border-radius: 16px;
    border: 1.5px solid #888;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.modal-overlay.open .modal-container {
    transform: translateY(0) scale(1);
}

.modal-header {
    background: #eaeaea;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1.5px solid #ddd;
}
.modal-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.modal-header h3 {
    font-size: 1.2rem;
    font-weight: 900;
    color: #111;
    margin: 0;
}

.modal-back-btn, .modal-close-btn {
    background: none; border: none; cursor: pointer; color: #555;
    display: flex; align-items: center; justify-content: center;
    transition: color 0.2s, transform 0.2s;
    padding: 5px;
    border-radius: 8px;
}
.modal-back-btn:hover, .modal-close-btn:hover { color: #111; background: #e0e0e0; }
.modal-back-btn:active, .modal-close-btn:active { transform: scale(0.9); }

.modal-body {
    padding: 20px;
    position: relative;
    min-height: 250px; /* جلوگیری از پرش ارتفاع هنگام تغییر نما */
    overflow-y: auto; /* اگر محتوا زیاد بود اسکرول بخورد */
    overflow-x: hidden;
}

.modal-view {
    display: none;
    flex-direction: column;
    gap: 12px;
    animation: fadeInView 0.3s forwards;
}
.modal-view.active-view { display: flex; }

@keyframes fadeInView {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Modal Option Boxes */
.action-box {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 12px;
    border: 1.5px solid #ddd;
    background: #fff;
    transition: all 0.2s;
}

.action-box.active-box { cursor: pointer; }
.action-box.active-box:hover { border-color: #e68927; box-shadow: 0 4px 10px rgba(0,0,0,0.04); transform: translateY(-2px); }
.action-box.active-box:active { transform: translateY(0); }

.action-box.disabled-box {
    background: #f0f0f0;
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(100%);
}

.box-icon {
    width: 46px; height: 46px; border-radius: 10px;
    display: flex; justify-content: center; align-items: center;
}
.green-icon { background: #e8f5e9; color: #2e7d32; }
.orange-icon { background: #fff3e0; color: #e68927; }
.blue-icon { background: #e3f2fd; color: #1565c0; }
.gray-icon { background: #e0e0e0; color: #666; }

.box-text { display: flex; flex-direction: column; gap: 4px; }
.box-text h4 { font-size: 1.05rem; font-weight: 900; color: #222; margin: 0; }
.box-text span { font-size: 0.85rem; color: #777; }

/* Forms inside Modal */
.form-group { display: flex; flex-direction: column; gap: 10px; }
.form-group label { font-weight: bold; font-size: 0.95rem; }
.form-group input { padding: 12px 15px; border: 1.5px solid #ccc; border-radius: 8px; font-size: 1rem; font-family: "vazir", sans-serif; outline: none; transition: border 0.2s; }
.form-group input:focus { border-color: #e68927; }
.form-hint { font-size: 0.8rem; color: #888; }
.btn-primary { background: #e68927; color: #fff; border: none; padding: 12px; border-radius: 8px; font-weight: bold; font-size: 1rem; cursor: pointer; transition: background 0.2s; margin-top: 10px; }
.btn-primary:hover { background: #cf7920; }

/* =========================================
   سیستم Toast (پیام های مدرن پایین صفحه)
========================================= */
.toast-container {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast-message {
    background: rgba(25, 25, 25, 0.95);
    backdrop-filter: blur(8px);
    color: #fff;
    padding: 14px 22px;
    border-radius: 12px;
    font-size: 1rem;
    font-family: "vazir", sans-serif;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    min-width: 280px;
    pointer-events: auto;
    animation: toastSlideUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.toast-message.success { border-bottom: 3px solid #2e7d32; }
.toast-message.error { border-bottom: 3px solid #d32f2f; }

.toast-close {
    cursor: pointer;
    color: #aaa;
    background: none;
    border: none;
    font-size: 1.4rem;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}
.toast-close:hover { color: #fff; }

@keyframes toastSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

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

/* =========================================
   استایل یکپارچه و جذاب مدال (User Modal)
========================================= */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.65); backdrop-filter: blur(5px);
    display: flex; justify-content: center; align-items: center;
    z-index: 9999; opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.open { opacity: 1; visibility: visible; }

.modal-container {
    background: #fdfdfd; width: 92%; max-width: 420px;     max-height: 90vh;
    border-radius: 18px; overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    transform: scale(0.9); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #ddd;
}
.modal-overlay.open .modal-container { transform: scale(1); }

.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px; background: #f2f2f2; border-bottom: 1px solid #e5e5e5;
}
.modal-header-right { display: flex; align-items: center; gap: 12px; }
#modalTitle { font-size: 1.15rem; font-weight: 900; color: #222; }

.modal-close-btn, .modal-back-btn {
    background: none; border: none; cursor: pointer; color: #666;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.modal-close-btn:hover { color: #d32f2f; transform: scale(1.15); }
.modal-back-btn:hover { color: #111; transform: translateX(3px); }

.modal-body { padding: 20px; position: relative; min-height: 220px; overflow-y: auto; /* اگر محتوا زیاد بود اسکرول بخورد */
    overflow-x: hidden; }
.modal-view { display: none; flex-direction: column; gap: 12px; animation: fadeInView 0.3s ease; }
.modal-view.active-view { display: flex; }
@keyframes fadeInView { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: translateX(0); } }

/* استایل باکس‌های داخل مدال */
.action-box {
    display: flex; align-items: center; gap: 15px; padding: 14px;
    background: #fff; border: 1.5px solid #eaeaea; border-radius: 14px;
    cursor: pointer; transition: all 0.2s ease;
}
.action-box.active-box:hover { border-color: #e68927; box-shadow: 0 4px 15px rgba(230,137,39,0.12); transform: translateY(-2px); }
.action-box.disabled-box { opacity: 0.6; cursor: not-allowed; background: #f9f9f9; }
.box-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; justify-content: center; align-items: center; }
.green-icon { background: #e8f5e9; color: #2e7d32; }
.orange-icon { background: #fff3e0; color: #e65100; }
.blue-icon { background: #e3f2fd; color: #1565c0; }
.gray-icon { background: #eeeeee; color: #666; }
.box-text h4 { font-size: 1.05rem; color: #111; margin-bottom: 2px; }
.box-text span { font-size: 0.85rem; color: #888; }
.form-group { display: flex; flex-direction: column; gap: 10px; }
.form-group input { padding: 14px; border: 1.5px solid #ddd; border-radius: 10px; font-size: 1.05rem; text-align: left; direction: ltr; outline: none; transition: border-color 0.2s; }
.form-group input:focus { border-color: #e68927; }
.form-hint { font-size: 0.8rem; color: #777; line-height: 1.5; }
.btn-primary { background: #e68927; color: #fff; border: none; padding: 14px; border-radius: 10px; font-size: 1.05rem; font-weight: bold; cursor: pointer; transition: background 0.2s; }
.btn-primary:hover { background: #d67a1f; }

/* --- User Status & Warning Modal Styles --- */
.user-status-card {
    background: #ececec;
    border: 1.5px solid #888;
    border-radius: 12px;
    padding: 10px 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
    flex-direction: column;
}


.user-status-info {
     display: flex;
    gap: 4px;
    color: #111;
    font-size: 1rem;
        align-items: center;
}

.user-status-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: bold;
}

.user-status-val {
    font-size: 1.1rem;
    font-weight: 900;
}

.practice-warning-box {
    background: #fff3e0;
    border: 1.5px solid #e68927;
    border-radius: 12px;
    padding: 15px;
    margin-top: 20px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    color: #e65100;
}

.practice-warning-box p {
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0;
    text-align: justify;
    font-weight: bold;
}

/* =========================================
   About Action Buttons & Info Modal
========================================= */
.about-action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.about-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #ffffff;
    border: 1.5px solid #e68927;
    color: #e68927;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(230, 137, 39, 0.05);
}

.about-btn:hover {
    background: #e68927;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(230, 137, 39, 0.2);
}

.about-btn svg {
    transition: stroke 0.3s;
}

/* Info Modal Text Styles */
.info-content-box {
    padding: 10px 5px;
    direction: rtl;
    text-align: right;
    line-height: 1.8;
    color: #333;
}

.info-content-box p {
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.info-content-box ul {
    list-style-type: none;
    padding: 0;
    margin: 0 0 15px 0;
}

.info-content-box ul li {
    position: relative;
    padding-right: 22px;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: #555;
    text-align: justify;
}

.info-content-box ul li::before {
    content: "■";
    color: #e68927;
    font-size: 0.8rem;
    position: absolute;
    right: 0;
    top: 2px;
}

.info-content-box h4 {
    color: #111;
    font-size: 1.1rem;
    font-weight: 900;
    margin: 25px 0 12px 0;
    border-bottom: 2px solid #eaeaea;
    padding-bottom: 8px;
    display: inline-block;
}

.code-snippet {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 15px;
    border-radius: 8px;
    font-size: 0.85rem;
    overflow-x: auto;
    margin-bottom: 15px;
    border: 1px solid #333;
    direction: ltr;
}

.code-snippet code {
    font-family: monospace, sans-serif;
    line-height: 1.6;
}

@media (max-width: 600px) {
    .about-action-buttons {
        flex-direction: column;
    }
}