@keyframes dgGoldPulse {
    0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5); }
    70% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

@keyframes dgSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* نوار پیشرفت در مرکز صفحه */
.dg-progress-wrapper {
    width: 100%;
    max-width: 680px;
    margin: 15px auto 25px auto;
    box-sizing: border-box;
    direction: rtl;
    padding: 0 10px;
}

.dg-progress-box {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(250, 204, 21, 0.3);
    border-radius: 14px;
    padding: 14px 18px;
    color: #fff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    font-family: inherit;
}

.dg-progress-box.is-unlocked {
    border-color: rgba(34, 197, 94, 0.4);
}

.dg-progress-box::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: #facc15;
}

.dg-progress-box.is-unlocked::before {
    background: #22c55e;
}

.dg-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
}

.dg-progress-title {
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #f8fafc;
}

.dg-progress-badge {
    background: rgba(250, 204, 21, 0.15);
    color: #facc15;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    border: 1px solid rgba(250, 204, 21, 0.3);
}

.dg-progress-box.is-unlocked .dg-progress-badge {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.3);
}

.dg-progress-bar-bg {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    height: 8px;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.dg-progress-bar-fill {
    background: linear-gradient(90deg, #16a34a, #22c55e, #4ade80);
    height: 100%;
    border-radius: 50px;
    transition: width 0.8s ease;
}

.dg-progress-footer {
    margin-top: 10px;
    font-size: 12px;
    color: #cbd5e1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.dg-btn-game-link {
    background: linear-gradient(135deg, #111827 0%, #1f2937 50%, #000000 100%);
    color: #fbbf24 !important;
    text-decoration: none !important;
    padding: 8px 18px;
    border-radius: 9px;
    font-weight: bold;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    animation: dgGoldPulse 2s infinite;
    border: 1.5px solid #f59e0b;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
}

.dg-btn-game-link:hover {
    transform: translateY(-2px);
    border-color: #fbbf24;
    color: #fef08a !important;
}

.dg-coupon-box {
    background: rgba(15, 23, 42, 0.95);
    border: 1px dashed #f59e0b;
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 8px;
    box-sizing: border-box;
}

.dg-coupon-code {
    font-family: monospace;
    color: #f59e0b;
    font-weight: bold;
    font-size: 14px;
    letter-spacing: 1.5px;
}

.dg-btn-copy {
    background: #f59e0b;
    color: #000;
    border: none;
    padding: 5px 12px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.2s;
}

/* پنجره مودال بزرگ‌تر و پرانرژی */
.dg-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(8, 12, 22, 0.88);
    backdrop-filter: blur(10px);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    direction: rtl;
    box-sizing: border-box;
    padding: 15px;
}

.dg-modal-card {
    background: linear-gradient(150deg, #1e293b 0%, #0b1329 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 24px;
    max-width: 580px;
    width: 100%;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
    position: relative;
    text-align: center;
    color: #fff;
    box-sizing: border-box;
}

.dg-modal-close {
    position: absolute;
    top: 14px;
    left: 14px;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.dg-modal-close:hover {
    color: #fff;
}

.dg-modal-title {
    font-size: 20px;
    margin: 0 0 6px 0;
    color: #facc15;
}

.dg-modal-subtitle {
    font-size: 13px;
    color: #94a3b8;
    margin: 0 0 14px 0;
}

/* بوم سه‌بعدی بزرگ‌تر با عمق بصری */
.dg-canvas-box {
    width: 100%;
    height: 310px;
    background: radial-gradient(circle at center, #17233f 0%, #070d18 100%);
    border-radius: 14px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 40px rgba(0,0,0,0.6);
}

.dg-dice-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #090d16;
    z-index: 2;
}

.dg-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #facc15;
    border-radius: 50%;
    animation: dgSpin 0.8s linear infinite;
}

.dg-modal-controls {
    margin-top: 18px;
}

.dg-btn-roll {
    background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
    color: #000;
    border: none;
    border-radius: 12px;
    padding: 12px 32px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(234, 179, 8, 0.4);
    transition: transform 0.2s, background 0.2s;
}

.dg-btn-roll:hover:not(:disabled) {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #facc15 0%, #eab308 100%);
}

.dg-btn-roll:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dg-result-container {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.6;
}

@media (max-width: 600px) {
    .dg-progress-wrapper {
        margin: 10px auto 18px auto;
        padding: 0 8px;
    }

    .dg-progress-box {
        padding: 12px 14px;
    }

    .dg-modal-card {
        padding: 16px;
    }

    .dg-canvas-box {
        height: 240px;
    }

    .dg-btn-roll {
        width: 100%;
        padding: 12px;
    }
}