@font-face {
    font-family: Vazir;
    src: url('fonts/Vazir-FD.woff') format('woff');
    font-weight: normal;
}

@font-face {
    font-family: Vazir;
    src: url('fonts/Vazir-Bold-FD.woff') format('woff');
    font-weight: bold;
}

@font-face {
    font-family: Vazir;
    src: url('fonts/Vazir-Thin-FD.woff') format('woff');
    font-weight: 100;
}

@font-face {
    font-family: Vazir;
    src: url('fonts/Vazir-Light-FD.woff') format('woff');
    font-weight: 300;
}

@font-face {
    font-family: Vazir;
    src: url('fonts/Vazir-Medium-FD.woff') format('woff');
    font-weight: 500;
}

@font-face {
    font-family: Vazir;
    src: url('fonts/Vazir-Black-FD.woff') format('woff');
    font-weight: 900;
}

.nirweb_dice_box * {
    font-family: 'Vazir' !important;
}

:root {
    /* Neon Theme Colors */
    --neon-orange: #ff6b35;
    --neon-yellow: #ffd700;
    --neon-blue: #00f0ff;
    --neon-cyan: #00d9ff;
    --neon-pink: #ff3b8d;
    --neon-purple: #b347ff;
    --dark-bg-top: #0a0e27;
    --dark-bg-bottom: #1a0d2e;
    --card-bg: rgba(15, 23, 42, 0.6);
    --card-border: rgba(0, 240, 255, 0.3);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
}

/* Neon Glow Animations */
@keyframes neonGlow {
    0%, 100% {
        text-shadow: 0 0 5px currentColor, 0 0 10px currentColor, 0 0 15px currentColor;
        box-shadow: 0 0 5px currentColor, 0 0 10px currentColor, 0 0 15px currentColor;
    }
    50% {
        text-shadow: 0 0 3px currentColor, 0 0 5px currentColor, 0 0 8px currentColor;
        box-shadow: 0 0 3px currentColor, 0 0 5px currentColor, 0 0 8px currentColor;
    }
}

@keyframes neonFlicker {
    0%, 100% { opacity: 1; }
    41.99% { opacity: 1; }
    42% { opacity: 0.8; }
    42.01% { opacity: 1; }
    43% { opacity: 0.8; }
    43.01% { opacity: 1; }
    45% { opacity: 0.9; }
    45.01% { opacity: 1; }
}

@keyframes neonPulse {
    0%, 100% {
        box-shadow: 0 0 3px currentColor, 0 0 5px currentColor, 0 0 8px currentColor, inset 0 0 3px currentColor;
    }
    50% {
        box-shadow: 0 0 5px currentColor, 0 0 10px currentColor, 0 0 15px currentColor, inset 0 0 5px currentColor;
    }
}

@keyframes neonPulseSoft {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

@keyframes diceGlow {
    0%, 100% {
        filter: drop-shadow(0 0 4px rgba(255, 59, 141, 0.4)) drop-shadow(0 0 8px rgba(179, 71, 255, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 6px rgba(255, 59, 141, 0.5)) drop-shadow(0 0 12px rgba(179, 71, 255, 0.4));
    }
}

/* Background Gradient */
.nirweb_dice_container {
    width: 100%;
    position: relative;
    min-height: 100vh;
}

.nirweb_dice_box {
    display: flex;
    background: linear-gradient(180deg, var(--dark-bg-top) 0%, var(--dark-bg-bottom) 100%);
    color: var(--text-primary);
    border-radius: 0;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 20px rgba(179, 71, 255, 0.15);
    text-align: center;
    min-height: 100vh;
}

/* Purple glow reflection at bottom */
.nirweb_dice_box::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: radial-gradient(ellipse at center, rgba(179, 71, 255, 0.2) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.nirweb_dice_content {
    flex: 1;
    padding: 24px;
    backdrop-filter: blur(2px);
    background: transparent;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
}

/* Fixed Buttons Container */
.fixed-buttons-container {
    position: relative;
    display: flex;
    gap: 12px;
    align-items: stretch;
    justify-content: center;
    width: 100%;
    max-width: 620px;
    margin: 32px 0 0;
    padding: 0;
    box-sizing: border-box;
}

/* Menu (Hamburger) Button - Top Right */
.dice_menu_btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 2px solid var(--neon-cyan);
    background: transparent;
    color: var(--neon-cyan);
    cursor: pointer;
    display: grid;
    place-items: center;
    box-shadow: 
        0 0 10px rgba(0, 240, 255, 0.3),
        0 0 20px rgba(0, 240, 255, 0.2),
        inset 0 0 10px rgba(0, 240, 255, 0.15);
    transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease;
    padding: 0;
    z-index: 100;
}

.dice_menu_btn:hover {
    box-shadow: 
        0 0 15px rgba(0, 240, 255, 0.4),
        0 0 30px rgba(0, 240, 255, 0.3);
    background: rgba(0, 240, 255, 0.1);
    transform: translateY(-2px);
    animation: neonPulse 1.5s infinite;
}

.dice_menu_btn:active { 
    transform: translateY(0px);
}

.dice_menu_btn .menu_icon {
    width: 20px;
    height: 20px;
    display: block;
    color: var(--neon-cyan);
    filter: drop-shadow(0 0 3px rgba(0, 240, 255, 0.4));
    transition: transform 0.2s ease;
}

.dice_menu_btn:hover .menu_icon {
    transform: scale(1.1);
    filter: drop-shadow(0 0 5px rgba(0, 240, 255, 0.5));
    color: var(--neon-cyan);
}

/* Logout (Power) Button - Top Left */
.dice_logout_btn {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 2px solid #ef4444;
    background: transparent;
    color: #ef4444;
    cursor: pointer;
    display: grid;
    place-items: center;
    box-shadow: 
        0 0 10px rgba(239, 68, 68, 0.3),
        0 0 20px rgba(239, 68, 68, 0.2),
        inset 0 0 10px rgba(239, 68, 68, 0.15);
    transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease;
    padding: 0;
    z-index: 100;
}

.dice_logout_btn:hover {
    box-shadow: 
        0 0 15px rgba(239, 68, 68, 0.4),
        0 0 30px rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.1);
    transform: translateY(-2px);
    animation: neonPulse 1.5s infinite;
}

.dice_logout_btn:active { 
    transform: translateY(0px);
}

/* Power icon SVG */
.dice_logout_btn .power_icon {
    width: 20px;
    height: 20px;
    display: block;
    color: #ef4444;
    filter: drop-shadow(0 0 3px rgba(239, 68, 68, 0.4));
    transition: transform 0.2s ease;
}

.dice_logout_btn:hover .power_icon {
    transform: scale(1.1);
    filter: drop-shadow(0 0 5px rgba(239, 68, 68, 0.5));
    color: #ef4444;
}

@media (max-width: 800px) {
    .fixed-buttons-container {
        width: calc(100% - 16px);
        gap: 8px;
        bottom: 20px;
    }
    
    .dice_menu_btn {
        top: 15px;
        right: 12px;
        width: 38px;
        height: 38px;
    }
    
    .dice_logout_btn {
        top: 15px;
        left: 12px;
        width: 38px;
        height: 38px;
    }
    
    .dice_login_form_div {
        padding: 0 16px;
    }
    
    .dice_card {
        margin-right: 0;
        margin-left: 0;
        width: 100%;
        max-width: 100%;
    }
    
    .dice_menu_btn .menu_icon {
        width: 18px;
        height: 18px;
    }
    
    .dice_logout_btn .power_icon {
        width: 18px;
        height: 18px;
    }
}

.nirweb_dice_box > div { width: 100%; }

/* Header & Title with Neon Effect */
.dice_header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-bottom: 12px;
    position: relative;
}

/* وقتی دکمه خروج هست، فاصله اضافه کن */
.nirweb_dice_content.has-logout-btn .dice_header {
    padding-top: 20px;
}

/* لوگو */
.dice_logo_wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0;
}

.dice_logo_wrapper + .dice_title {
    margin-top: 4px;
}

.dice_logo {
    max-width: 100px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(255, 107, 53, 0.3)) 
            drop-shadow(0 0 10px rgba(255, 107, 53, 0.2));
    animation: neonPulseSoft 3s infinite;
}

.dice_title {
    color: var(--neon-orange);
    font-size: 32px;
    line-height: 1.4;
    margin: 0;
    padding-top: 0;
    font-weight: 900;
    text-shadow: 0 0 2px var(--neon-orange), 0 0 4px var(--neon-orange);
    animation: neonFlicker 3s infinite;
    letter-spacing: 1px;
}

.dice_subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 2;
    margin: 0;
}

/* Stepper with Neon */
.dice_stepper {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.9;
}

.dice_stepper .step {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.dice_stepper .line {
    height: 2px;
    flex: 1;
    background: var(--card-border);
    box-shadow: 0 0 3px var(--neon-cyan);
}

.dice_stepper .step.is-active {
    background: var(--neon-cyan);
    color: #000;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 5px var(--neon-cyan), 0 0 10px var(--neon-cyan);
    animation: neonPulseSoft 2s infinite;
}

.dice_stepper .step.is-done {
    background: #22c55e;
    color: #000;
    border-color: #22c55e;
    box-shadow: 0 0 5px #22c55e, 0 0 10px #22c55e;
}

/* Forms */
.dice_login_form_div,
.dice_login_form,
.dice_discount_form_div {
    display: flex;
    gap: 15px;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-top: 0;
}

.dice_login_form {
    gap: 24px;
}

/* Neon Styled Input Fields */
.dice_login_form input {
    width: 100% !important;
    height: 50px !important;
    border: 2px solid var(--card-border) !important;
    max-width: 520px;
    border-radius: 12px !important;
    background: rgba(15, 23, 42, 0.8) !important;
    color: var(--text-primary) !important;
    font-size: 18px;
    text-align: center;
    padding: 0 20px;
    transition: all 0.3s ease;
    box-shadow: 0 0 5px rgba(0, 240, 255, 0.1);
}

.dice_login_form input:focus {
    outline: none;
    border-color: var(--neon-cyan) !important;
    box-shadow: 0 0 8px var(--neon-cyan), 0 0 12px var(--neon-cyan), inset 0 0 5px rgba(0, 240, 255, 0.05);
    background: rgba(15, 23, 42, 0.9) !important;
}

.dice_login_form input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Input Icons (if needed) */
.dice_login_form input[type="text"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 15px center;
    background-size: 20px;
    padding-left: 45px;
}

.dice_login_form input[type="password"],
.dice_login_form input[type="text"][id*="verification"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
}

/* Neon Buttons */
.btn {
    border: none;
    cursor: pointer;
    border-radius: 12px !important;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:active {
    transform: translateY(1px);
}

/* Primary Button - Orange/Yellow Neon */
.btn-primary {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.9), rgba(255, 107, 53, 0.8));
    color: #fff;
    border: 2px solid var(--neon-orange);
    box-shadow: 0 0 5px var(--neon-orange), 0 0 10px var(--neon-orange), inset 0 0 5px rgba(255, 255, 255, 0.05);
}

.btn-primary:hover {
    background: linear-gradient(135deg, rgba(255, 107, 53, 1), rgba(255, 107, 53, 0.9));
    box-shadow: 0 0 8px var(--neon-orange), 0 0 15px var(--neon-orange), 0 0 20px var(--neon-orange), inset 0 0 8px rgba(255, 255, 255, 0.1);
    animation: neonPulse 1.5s infinite;
}

/* Accent Button - Blue/Cyan Neon */
.btn-accent {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--neon-cyan);
    box-shadow: 0 0 5px var(--neon-cyan), 0 0 10px var(--neon-cyan), inset 0 0 5px rgba(0, 240, 255, 0.05);
}

.btn-accent:hover {
    background: rgba(0, 240, 255, 0.1);
    box-shadow: 0 0 8px var(--neon-cyan), 0 0 15px var(--neon-cyan), 0 0 20px var(--neon-cyan), inset 0 0 8px rgba(0, 240, 255, 0.1);
    animation: neonPulse 1.5s infinite;
}

.start_dice {
    border-radius: 14px !important;
    font-size: 18px;
    padding: 14px 28px;
}

/* Fixed Dice Button at Bottom */
.fixed-dice-btn {
    position: relative !important;
    width: 100% !important;
    max-width: 620px !important;
    padding: 18px 32px !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.9), rgba(0, 217, 255, 0.9)) !important;
    border: 2px solid var(--neon-cyan) !important;
    box-shadow: 
        0 0 10px rgba(0, 240, 255, 0.3),
        0 0 20px rgba(0, 240, 255, 0.2),
        0 0 30px rgba(0, 240, 255, 0.1),
        inset 0 0 10px rgba(0, 240, 255, 0.15) !important;
    color: #ffffff !important;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.4);
    margin: 0 auto;
}

.fixed-dice-btn:hover {
    background: linear-gradient(135deg, rgba(0, 240, 255, 1), rgba(0, 217, 255, 1)) !important;
    box-shadow: 
        0 0 15px rgba(0, 240, 255, 0.4),
        0 0 30px rgba(0, 240, 255, 0.3),
        0 0 45px rgba(0, 240, 255, 0.2),
        inset 0 0 15px rgba(0, 240, 255, 0.2) !important;
    transform: translateY(-2px) !important;
    animation: neonPulse 1.5s infinite !important;
}

.fixed-dice-btn:active {
    transform: translateY(0px) !important;
}

@media (max-width: 800px) {
    .fixed-dice-btn {
        padding: 16px 24px !important;
        font-size: 18px !important;
        max-width: calc(100% - 32px) !important;
        width: calc(100% - 32px) !important;
    }
    
    .fixed-buttons-container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0;
        margin: 34px auto 0;
    }
    
    .dice_inline_wrapper {
        padding: 20px 16px 32px;
        max-width: calc(100% - 32px);
    }
}

/* Cards with Neon Borders */
.dice_card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 20px;
    width: 100%;
    max-width: 620px;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.1), inset 0 0 10px rgba(0, 240, 255, 0.025);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.dice_card_subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.8;
    margin: 0 0 16px 0;
    text-align: center;
}

.dice_card:hover {
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.15), inset 0 0 15px rgba(0, 240, 255, 0.05);
    border-color: var(--neon-cyan);
}


/* Messages */
.form_message {
    margin-top: 8px;
    color: var(--neon-yellow);
    font-size: 14px;
    text-shadow: 0 0 3px var(--neon-yellow);
}

.sr-only {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.timer {
    color: var(--text-primary);
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid var(--neon-cyan);
    border-radius: 10px;
    padding: 8px 16px;
    box-shadow: 0 0 5px rgba(0, 240, 255, 0.15);
    font-weight: 600;
}

/* Result Messages with Neon */

.dice_popup_ressult_text {
    flex-direction: column;
    align-items: center;
    padding: 24px 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
    color: var(--text-primary) !important;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
    display: none;
    gap: 8px;
    backdrop-filter: blur(10px);
    position: relative;
    width: 100%;
    max-width: 620px;
    margin: 16px auto 24px;
}

/* Hurray Text */
.hurray_text {
    font-size: 36px;
    font-weight: 900;
    color: var(--neon-yellow);
    text-shadow: 
        0 0 5px var(--neon-yellow),
        0 0 10px var(--neon-yellow),
        0 0 15px var(--neon-yellow),
        0 0 20px var(--neon-orange);
    animation: hurrayBounce 0.6s ease-in-out, neonFlicker 2s infinite 0.6s;
    margin: 8px 0;
    letter-spacing: 4px;
    transform-origin: center;
}

@keyframes hurrayBounce {
    0% { transform: scale(0) rotate(-180deg); opacity: 0; }
    50% { transform: scale(1.2) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Confetti Container */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    animation: confettiFall linear forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.dice_popup_ressult_text.sucs_active {
    display: flex;
    background: linear-gradient(180deg, rgba(34, 197, 94, 0.3), rgba(34, 197, 94, 0.15));
    border-color: #22c55e;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.25), 0 0 20px rgba(34, 197, 94, 0.15);
}

.dice_popup_ressult_text.error_active {
    display: flex;
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.3), rgba(239, 68, 68, 0.15));
    border-color: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.25), 0 0 20px rgba(239, 68, 68, 0.15);
}

.dice_popup_ressult_text h3 {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 0 5px currentColor;
}

.dice_popup_ressult_text strong {
    font-size: 22px;
    text-shadow: 0 0 5px currentColor;
}

.dice_popup_ressult_text p {
    margin: 0;
    opacity: 0.92;
}

/* Dice Container - Neon Pink/Purple Translucent */
.dice-container {
    display: flex;
    gap: 48px;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
    perspective-origin: center center;
    margin-bottom: 8px;
}

.dice-container.dontShow {
    display: none;
}

.dice_wrap {
    width: 120px;
    height: 120px;
    display: grid;
    place-items: center;
    position: relative;
    filter: drop-shadow(0 0 5px rgba(255, 59, 141, 0.3)) drop-shadow(0 0 10px rgba(179, 71, 255, 0.2));
    margin: 20px 0;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.dice_wrap:hover:not(.dice-rolling) {
    transform: scale(1.05);
    filter: drop-shadow(0 0 8px rgba(255, 107, 53, 0.4)) drop-shadow(0 0 12px rgba(255, 107, 53, 0.3)) drop-shadow(0 0 18px rgba(255, 107, 53, 0.2));
}

.dice_wrap:active:not(.dice-rolling) {
    transform: scale(0.95);
}

/* حذف هاور سفید/درخشان روی باکس تاس */

/* Reflection shadow under dice */
.dice_wrap::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 15px;
    background: radial-gradient(ellipse, rgba(179, 71, 255, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(8px);
    z-index: -1;
}

.dice {
    position: relative;
    width: 120px;
    height: 120px;
    transform-style: preserve-3d;
    transform: rotateX(0deg) rotateY(0deg);
    transition: transform 0.6s cubic-bezier(.2, .8, .2, 1);
    will-change: transform;
}

/* Neon Pink/Purple Translucent Dice Faces */
.face {
    position: absolute;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, rgba(255, 59, 141, 0.85), rgba(179, 71, 255, 0.85));
    border: 2px solid rgba(255, 255, 255, 0.4);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 6px;
    border-radius: 12px;
    padding: 18px;
    backdrop-filter: blur(5px);
    box-shadow: inset 0 0 14px rgba(255, 59, 141, 0.18), 0 0 5px rgba(179, 71, 255, 0.2);
    backface-visibility: visible;
    -webkit-backface-visibility: visible;
}

.face .face-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.12), transparent 60%), radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.1), transparent 65%);
    border-radius: inherit;
    pointer-events: none;
    mix-blend-mode: screen;
}

.face .pip {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow:
        0 0 6px #ffffff,
        0 0 12px rgba(255, 255, 255, 0.85),
        0 0 20px rgba(255, 255, 255, 0.45),
        inset 0 0 6px rgba(255, 255, 255, 0.3);
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.2s ease, transform 0.25s ease;
    align-self: center;
    justify-self: center;
    animation: none;
}

.face .pip-1 { grid-area: 1 / 1; }
.face .pip-2 { grid-area: 1 / 2; }
.face .pip-3 { grid-area: 1 / 3; }
.face .pip-4 { grid-area: 2 / 1; }
.face .pip-5 { grid-area: 2 / 2; }
.face .pip-6 { grid-area: 2 / 3; }
.face .pip-7 { grid-area: 3 / 1; }
.face .pip-8 { grid-area: 3 / 2; }
.face .pip-9 { grid-area: 3 / 3; }

.face[data-value="1"] .pip-5,
.face[data-value="2"] .pip-1,
.face[data-value="2"] .pip-9,
.face[data-value="3"] .pip-1,
.face[data-value="3"] .pip-5,
.face[data-value="3"] .pip-9,
.face[data-value="4"] .pip-1,
.face[data-value="4"] .pip-3,
.face[data-value="4"] .pip-7,
.face[data-value="4"] .pip-9,
.face[data-value="5"] .pip-1,
.face[data-value="5"] .pip-3,
.face[data-value="5"] .pip-5,
.face[data-value="5"] .pip-7,
.face[data-value="5"] .pip-9,
.face[data-value="6"] .pip-1,
.face[data-value="6"] .pip-3,
.face[data-value="6"] .pip-4,
.face[data-value="6"] .pip-6,
.face[data-value="6"] .pip-7,
.face[data-value="6"] .pip-9 {
    opacity: 1;
    transform: scale(1);
}

.front { transform: rotateY(0deg) translateZ(60px); }
.back { transform: rotateY(180deg) translateZ(60px); }
.left { transform: rotateY(-90deg) translateZ(60px); }
.right { transform: rotateY(90deg) translateZ(60px); }
.top { transform: rotateX(90deg) translateZ(60px); }
.bottom { transform: rotateX(-90deg) translateZ(60px); }

/* Inline dice wrapper */
.dice_inline_wrapper {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 12px 0;
    width: 100%;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

/* Rolling animation with neon trail - Base */
@keyframes roll3d {
    0% {
        transform: rotateX(0deg) rotateY(0deg);
    }
    25% {
        transform: rotateX(180deg) rotateY(90deg);
    }
    50% {
        transform: rotateX(360deg) rotateY(180deg);
    }
    75% {
        transform: rotateX(540deg) rotateY(270deg);
    }
    100% {
        transform: rotateX(720deg) rotateY(360deg);
    }
}

/* Alternative roll animations for variety */
@keyframes roll3d-alt1 {
    0% {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }
    25% {
        transform: rotateX(90deg) rotateY(180deg) rotateZ(90deg);
    }
    50% {
        transform: rotateX(270deg) rotateY(360deg) rotateZ(180deg);
    }
    75% {
        transform: rotateX(450deg) rotateY(540deg) rotateZ(270deg);
    }
    100% {
        transform: rotateX(720deg) rotateY(720deg) rotateZ(360deg);
    }
}

@keyframes roll3d-alt2 {
    0% {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }
    20% {
        transform: rotateX(120deg) rotateY(60deg) rotateZ(45deg);
    }
    40% {
        transform: rotateX(240deg) rotateY(180deg) rotateZ(90deg);
    }
    60% {
        transform: rotateX(420deg) rotateY(300deg) rotateZ(180deg);
    }
    80% {
        transform: rotateX(600deg) rotateY(480deg) rotateZ(270deg);
    }
    100% {
        transform: rotateX(720deg) rotateY(720deg) rotateZ(360deg);
    }
}

.dice.rolling {
    animation: roll3d 0.8s ease-in-out infinite;
}

.dice.rolling.alt1 {
    animation: roll3d-alt1 0.9s ease-in-out infinite;
}

.dice.rolling.alt2 {
    animation: roll3d-alt2 0.7s ease-in-out infinite;
}

.dice_wrap.dice-rolling {
    filter: drop-shadow(0 0 8px rgba(255, 59, 141, 0.45)) drop-shadow(0 0 15px rgba(179, 71, 255, 0.35)) drop-shadow(0 0 22px rgba(255, 59, 141, 0.25));
}

/* Verification Form */
#verification-form {
    width: 100%;
}

.dice_discount_form_div {
    justify-content: center;
    align-items: center;
    min-height: 220px;
}

/* Popup Styles */
#popup {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 90%;
    max-width: 500px;
    transform: translate(-50%, -50%);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(10, 14, 39, 0.95));
    padding: 28px;
    box-shadow: 0 0 20px rgba(179, 71, 255, 0.25), 0 0 40px rgba(0, 240, 255, 0.15);
    z-index: 1000;
    border-radius: 16px;
    border: 2px solid var(--neon-cyan);
    backdrop-filter: blur(20px);
}

#popup * {
    font-family: 'Vazir' !important;
}

#popup h2 {
    font-size: 17px;
    margin-bottom: 15px;
    color: var(--neon-orange);
    text-shadow: 0 0 5px var(--neon-orange);
}

#popup strong {
    font-size: 24px;
    margin-bottom: 14px !important;
    display: block;
    color: var(--text-primary);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.25);
}

#popup p {
    font-size: 17px;
    background: rgba(255, 255, 255, 0.08);
    padding: 8px 18px;
    line-height: 2;
    border-radius: 10px;
    color: var(--text-secondary);
    border: 1px solid var(--card-border);
}

.dice_popup_inputs {
    display: flex;
    align-items: center;
}

#popup-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

#popup input {
    margin: 5px;
    width: 50px;
    text-align: center;
    font-size: 18px;
    background: rgba(15, 23, 42, 0.8);
    border: 2px solid var(--card-border);
    border-radius: 8px;
    color: var(--text-primary);
    box-shadow: 0 0 5px rgba(0, 240, 255, 0.1);
}

#popup input:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 8px var(--neon-cyan);
}

#popup #close-popup {
    padding: 8px 12px;
    position: absolute;
    right: 20px;
    top: 15px;
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#popup #close-popup:hover {
    background-color: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    box-shadow: 0 0 5px rgba(239, 68, 68, 0.25);
}

.dice_image {
    text-align: center;
    position: relative;
    z-index: 1;
}

.dice_image img {
    width: 100%;
    max-width: 300px;
    filter: drop-shadow(0 0 10px rgba(179, 71, 255, 0.25));
    animation: neonPulseSoft 3s infinite;
}

/* Emoji */
.nirweb_emoji img {
    width: 74px;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.25));
}

.nirweb_emoji_link {
    display: none;
}

.nirweb_emoji_disLink {
    display: none;
}

.nirweb_emoji_link.active {
    display: block;
}

.nirweb_emoji_disLink.active {
    display: block;
}

/* Mobile Responsive */
@media (max-width: 800px) {
    .nirweb_dice_box {
        flex-direction: column-reverse;
        width: 100vw;
        max-width: 100vw;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        border-radius: 0;
        padding: 0;
        background: linear-gradient(180deg, var(--dark-bg-top) 0%, var(--dark-bg-bottom) 100%);
    }

    .nirweb_dice_box > div {
        width: 100%;
        padding: 0;
    }

    .nirweb_dice_content {
        padding: 16px;
    }

    .dice_logo {
        position: relative;
        top: auto;
        left: auto;
        font-size: 32px;
        text-align: center;
        margin-bottom: 16px;
        width: 100%;
    }

    .nirweb_dice_box h2,
    .nirweb_dice_box p {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        text-align: center;
    }

    .dice_login_form_div,
    .dice_discount_form_div,
    .dice_login_form {
        align-items: stretch;
    }

    .dice_login_form input {
        max-width: none;
        width: 100% !important;
        border-radius: 12px !important;
    }

    .dice_login_form button,
    .start_dice {
        width: 100%;
    }

    .dice_image img {
        max-width: 180px;
    }

    .dice-container {
        flex-direction: row;
        gap: 16px;
        margin-bottom: 16px;
    }
    .dice_wrap {
        width: 120px;
        height: 120px;
        margin: 0;
    }
    .dice { width: 120px; height: 120px; }
    .face { width: 120px; height: 120px; }
    .front { transform: rotateY(0deg) translateZ(60px); }
    .back { transform: rotateY(180deg) translateZ(60px); }
    .left { transform: rotateY(-90deg) translateZ(60px); }
    .right { transform: rotateY(90deg) translateZ(60px); }
    .top { transform: rotateX(90deg) translateZ(60px); }
    .bottom { transform: rotateX(-90deg) translateZ(60px); }

    /* افزایش فاصله CTA از تاس‌ها در موبایل */
    .dice_card.cta { margin-top: 40px; }
    
    .dice_popup_ressult_text {
        max-width: calc(100% - 32px);
        width: calc(100% - 32px);
        margin: 30px auto 0;
    }
}

/* Background Overlay */
.nirweb_background_black {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0px;
    z-index: 100;
    background-color: rgba(10, 14, 39, 0.8);
    backdrop-filter: blur(4px);
    display: none;
}

.nirweb_background_black.active {
    display: block;
}

#popup {
    z-index: 110;
    display: none !important;
}

/* Additional Neon Effects for Interactive Elements */
.btn:hover {
    animation: neonPulse 1.5s infinite;
}

/* Smooth transitions */
* {
    transition: box-shadow 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

/* Menu Overlay */
.dice-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: none;
    align-items: stretch;
    justify-content: flex-end;
    padding: 0;
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.dice-menu-overlay.is-open {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.dice-menu-content {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(10, 14, 39, 0.95));
    border-left: 2px solid var(--neon-cyan);
    border-radius: 0;
    width: 100%;
    max-width: 500px;
    height: 100%;
    overflow-y: auto;
    box-shadow: -5px 0 20px rgba(0, 240, 255, 0.25), -10px 0 40px rgba(0, 240, 255, 0.15);
    backdrop-filter: blur(20px);
    position: relative;
    margin-left: auto;
    transform: translateX(110%);
    opacity: 0;
    transition: transform 0.45s cubic-bezier(.16, .84, .44, 1), opacity 0.35s ease;
}

.dice-menu-overlay.is-open .dice-menu-content {
    transform: translateX(0);
    opacity: 1;
}


.dice-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--card-border);
}

.dice-menu-header h3 {
    color: var(--neon-orange);
    font-size: 24px;
    font-weight: 900;
    margin: 0;
    text-shadow: 0 0 5px var(--neon-orange);
}

.dice-menu-close {
    background: transparent;
    border: 2px solid var(--neon-cyan);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--neon-cyan);
    transition: all 0.3s ease;
    padding: 0;
}

.dice-menu-close:hover {
    background: rgba(0, 240, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
    transform: rotate(90deg);
}

.dice-menu-body {
    padding: 20px 24px;
}

.dice-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dice-menu-greeting {
    background: linear-gradient(135deg, rgba(0, 255, 221, 0.12), rgba(138, 43, 226, 0.18));
    border: 1px solid rgba(0, 255, 221, 0.25);
    border-radius: 14px;
    padding: 16px 18px;
    color: rgba(224, 242, 255, 0.92);
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 12px 30px rgba(0, 255, 221, 0.18);
}

.dice-menu-note {
    margin-top: 6px;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px dashed rgba(0, 255, 221, 0.25);
    color: rgba(185, 206, 255, 0.8);
    font-size: 13px;
    text-align: center;
    background: rgba(10, 18, 40, 0.55);
}

.dice-menu-link {
    display: block;
    width: 100%;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(15, 25, 55, 0.75), rgba(5, 35, 65, 0.85));
    border: 1px solid rgba(0, 255, 221, 0.2);
    border-radius: 12px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    text-align: right;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(0, 240, 255, 0.18);
}

.dice-menu-link:hover {
    background: linear-gradient(135deg, rgba(0, 255, 221, 0.15), rgba(138, 43, 226, 0.22));
    border-color: rgba(0, 255, 221, 0.45);
    box-shadow: 0 0 14px rgba(0, 240, 255, 0.3);
}

@media (max-width: 800px) {
    .dice-menu-content {
        max-width: calc(100% - 32px);
        max-height: 85vh;
    }
    
    .dice-menu-header {
        padding: 16px 20px;
    }
    
    .dice-menu-header h3 {
        font-size: 20px;
    }
    
    .dice-menu-body {
        padding: 16px 20px;
    }
}

body.dice-lock {
    overflow: hidden;
}

#dice-profile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 39, 0.92);
    backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

#dice-profile-overlay.is-active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.dice-profile-modal {
    width: min(500px, calc(100% - 48px));
    background: linear-gradient(180deg, rgba(16, 24, 52, 0.94), rgba(11, 16, 38, 0.96));
    border: 1px solid rgba(0, 255, 221, 0.35);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
    position: relative;
    transform: translateY(30px);
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

#dice-profile-overlay.is-active .dice-profile-modal {
    transform: translateY(0);
    opacity: 1;
}

.dice-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.dice-profile-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 900;
    color: var(--neon-orange);
    text-shadow: 0 0 6px rgba(255, 147, 76, 0.7);
}

.dice-profile-close {
    background: transparent;
    border: 2px solid var(--neon-cyan);
    border-radius: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neon-cyan);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dice-profile-close:hover {
    background: rgba(0, 240, 255, 0.1);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.35);
    transform: rotate(90deg);
}

.dice-profile-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.dice-profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.dice-profile-field label {
    display: block;
    font-size: 14px;
    color: rgba(212, 232, 255, 0.8);
    margin-bottom: 8px;
}

.dice-profile-field input,
.dice-profile-field select {
    width: 100%;
    border-radius: 14px;
    border: 1px solid rgba(0, 255, 221, 0.25);
    background: rgba(12, 18, 36, 0.85);
    color: #eef9ff;
    padding: 12px 16px;
    font-size: 15px;
    height: 48px;
    line-height: 1.4;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.dice-profile-field select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"><path fill="%23aefcff" d="M1.41 0L6 4.59 10.59 0 12 1.41 6 7.41 0 1.41z"/></svg>');
    background-repeat: no-repeat;
    background-position: left 16px center;
    padding-left: 40px;
}

.dice-profile-field input:focus,
.dice-profile-field select:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 12px rgba(0, 255, 221, 0.25);
}

.dice-profile-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-start;
}

.dice-profile-actions .btn-primary,
.dice-profile-actions .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 26px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dice-profile-actions .btn-primary {
    background: linear-gradient(135deg, #ff9f43, #ff6b6b);
    color: #120018;
    border: none;
    box-shadow: 0 12px 35px rgba(255, 135, 72, 0.45);
}

.dice-profile-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(255, 135, 72, 0.55);
}

.dice-profile-actions .btn-secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.78);
    padding: 0 26px;
}

.dice-profile-actions .btn-secondary:hover {
    border-color: rgba(0, 255, 221, 0.45);
    color: var(--neon-cyan);
    transform: translateY(-2px);
}

.dice-profile-message {
    min-height: 20px;
    font-size: 14px;
    color: rgba(173, 238, 255, 0.9);
}

.dice-profile-message.error {
    color: #ff7d7d;
}

.dice-profile-close {
    border: 2px solid #ff4d6d;
    color: #ff4d6d;
}

.dice-profile-close:hover {
    background: rgba(255, 77, 109, 0.15);
    box-shadow: 0 0 14px rgba(255, 77, 109, 0.5);
}

.dice-area {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.dice-hub {
    position: relative;
    display: inline-block;
}

.dice-hub .dice-container {
    margin-bottom: 0;
}

.dice-hub .dice-prizes-trigger {
    position: absolute;
    top: 50%;
    right: -62px;
    transform: translateY(-50%);
    margin: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    background: linear-gradient(145deg, rgba(250, 90, 180, 0.28), rgba(150, 60, 255, 0.28));
    backdrop-filter: blur(6px);
    color: #fff;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow:
        0 10px 24px rgba(250, 90, 180, 0.22),
        0 0 12px rgba(150, 60, 255, 0.28),
        inset 0 0 12px rgba(255, 255, 255, 0.12);
    font-size: 20px;
}

.dice-hub .dice-prizes-trigger:hover {
    transform: translateY(-1px);
    box-shadow:
        0 12px 26px rgba(250, 90, 180, 0.24),
        0 0 14px rgba(150, 60, 255, 0.3),
        inset 0 0 14px rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.45);
}

.dice-hub .dice-prizes-trigger:active {
    transform: translateY(0);
}


.dice-mobile-toolbar {
    display: none;
}

@media (max-width: 768px) {
    .dice-hub {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .dice-hub .dice-prizes-trigger {
        display: none;
    }

    body.has-mobile-toolbar-visible .dice-mobile-toolbar,
    .dice-mobile-toolbar {
        display: flex;
        align-items: center;
        justify-content: space-around;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 54px;
        padding: 0;
        background: rgba(10, 16, 40, 0.9);
        border-top: 1px solid rgba(0, 255, 221, 0.2);
        box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.35);
        backdrop-filter: blur(10px);
        z-index: 900;
    }

    .dice-mobile-toolbar .dice-toolbar-btn {
        flex: 1 1 25%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 2px;
        height: 100%;
        background: transparent;
        color: #ffffff;
        font-size: 11px;
        font-weight: 500;
        letter-spacing: 0.3px;
        cursor: pointer;
        transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
        padding-top: 6px;
        position: relative;
    }

    .dice-mobile-toolbar .dice-toolbar-btn::after {
        content: '';
        position: absolute;
        top: 10px;
        bottom: 10px;
        right: 0;
        width: 1px;
        background: rgba(255, 255, 255, 0.12);
        opacity: 0;
    }

    .dice-mobile-toolbar .dice-toolbar-btn::before {
        content: '';
        position: absolute;
        top: 10px;
        bottom: 10px;
        left: 0;
        width: 1px;
        background: rgba(255, 255, 255, 0.12);
        opacity: 0;
    }

    .dice-mobile-toolbar .dice-toolbar-btn:first-child::after {
        opacity: 0;
    }

    .dice-mobile-toolbar .dice-toolbar-btn:first-child::before {
        opacity: 1;
    }

    .dice-mobile-toolbar .dice-toolbar-btn:not(:first-child)::before {
        opacity: 1;
    }

    .dice-mobile-toolbar .dice-toolbar-btn:last-child::before,
    .dice-mobile-toolbar .dice-toolbar-btn:last-child::after {
        opacity: 0;
    }

    .dice-mobile-toolbar .dice-toolbar-btn:hover {
        background: rgba(0, 240, 255, 0.08);
    }

    .dice-mobile-toolbar .dice-toolbar-btn:active {
        transform: translateY(0);
    }

    .dice-mobile-toolbar .dice-toolbar-label {
        font-size: 11px;
        opacity: 0.8;
    }

    .dice_menu_btn {
        display: none;
    }

    .dice-mobile-toolbar .dice-toolbar-btn:first-child::after {
        content: '';
        position: absolute;
        right: 0;
        top: 10px;
        bottom: 10px;
        width: 1px;
        background: rgba(255, 255, 255, 0.12);
    }
}

#dice-prizes-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 32, 0.88);
    backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#dice-prizes-overlay.is-active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.dice-prizes-modal {
    width: min(440px, calc(100% - 48px));
    background: linear-gradient(180deg, rgba(18, 24, 52, 0.96), rgba(8, 12, 32, 0.98));
    border-radius: 24px;
    border: 1px solid rgba(0, 255, 221, 0.28);
    box-shadow: 0 32px 72px rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#dice-prizes-overlay.is-active .dice-prizes-modal {
    transform: translateY(0);
    opacity: 1;
}

.dice-prizes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 255, 221, 0.18);
}

.dice-prizes-header h3 {
    margin: 0;
    font-size: 22px;
    color: var(--neon-orange);
    text-shadow: 0 0 10px rgba(255, 138, 76, 0.7);
}

.dice-prizes-close {
    background: transparent;
    border: 2px solid #ff4d6d;
    color: #ff4d6d;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.dice-prizes-close:hover {
    background: rgba(255, 77, 109, 0.12);
    box-shadow: 0 0 14px rgba(255, 77, 109, 0.5);
}

.dice-prizes-body {
    padding: 20px 22px 24px;
    overflow-y: auto;
    max-height: calc(100vh - 220px);
}

.dice-prizes-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dice-prize-item {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 18px;
    padding: 16px 24px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(0, 255, 221, 0.12), rgba(102, 126, 234, 0.12));
    border: 1px solid rgba(0, 255, 221, 0.25);
    box-shadow: 0 16px 40px rgba(0, 255, 221, 0.15);
}

.dice-prize-faces {
    display: flex;
    gap: 6px;
    justify-content: flex-start;
}

.dice-prize-face {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 59, 141, 0.85), rgba(179, 71, 255, 0.75));
    border: 1px solid rgba(255, 255, 255, 0.22);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 4px;
    padding: 6px;
    box-shadow: 0 8px 20px rgba(255, 59, 141, 0.28), inset 0 0 10px rgba(255, 255, 255, 0.15);
    position: relative;
}

.dice-prize-pip {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow:
        0 0 6px rgba(255, 255, 255, 0.9),
        0 0 10px rgba(255, 255, 255, 0.45);
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.2s ease, transform 0.2s ease;
    align-self: center;
    justify-self: center;
}

.dice-prize-pip-1 { grid-area: 1 / 1; }
.dice-prize-pip-2 { grid-area: 1 / 2; }
.dice-prize-pip-3 { grid-area: 1 / 3; }
.dice-prize-pip-4 { grid-area: 2 / 1; }
.dice-prize-pip-5 { grid-area: 2 / 2; }
.dice-prize-pip-6 { grid-area: 2 / 3; }
.dice-prize-pip-7 { grid-area: 3 / 1; }
.dice-prize-pip-8 { grid-area: 3 / 2; }
.dice-prize-pip-9 { grid-area: 3 / 3; }

.dice-prize-face[data-value="1"] .dice-prize-pip-5,
.dice-prize-face[data-value="2"] .dice-prize-pip-1,
.dice-prize-face[data-value="2"] .dice-prize-pip-9,
.dice-prize-face[data-value="3"] .dice-prize-pip-1,
.dice-prize-face[data-value="3"] .dice-prize-pip-5,
.dice-prize-face[data-value="3"] .dice-prize-pip-9,
.dice-prize-face[data-value="4"] .dice-prize-pip-1,
.dice-prize-face[data-value="4"] .dice-prize-pip-3,
.dice-prize-face[data-value="4"] .dice-prize-pip-7,
.dice-prize-face[data-value="4"] .dice-prize-pip-9,
.dice-prize-face[data-value="5"] .dice-prize-pip-1,
.dice-prize-face[data-value="5"] .dice-prize-pip-3,
.dice-prize-face[data-value="5"] .dice-prize-pip-5,
.dice-prize-face[data-value="5"] .dice-prize-pip-7,
.dice-prize-face[data-value="5"] .dice-prize-pip-9,
.dice-prize-face[data-value="6"] .dice-prize-pip-1,
.dice-prize-face[data-value="6"] .dice-prize-pip-3,
.dice-prize-face[data-value="6"] .dice-prize-pip-4,
.dice-prize-face[data-value="6"] .dice-prize-pip-6,
.dice-prize-face[data-value="6"] .dice-prize-pip-7,
.dice-prize-face[data-value="6"] .dice-prize-pip-9 {
    opacity: 1;
    transform: scale(1);
}

.dice-prize-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: right;
    order: 2;
}

.dice-prize-title {
    margin: 0;
    font-size: 16px;
    color: #fdfbff;
}

.dice-prize-description {
    margin: 0;
    font-size: 12px;
    line-height: 1.7;
    color: rgba(200, 220, 255, 0.82);
}

.dice-prize-faces {
    display: flex;
    gap: 6px;
    justify-content: flex-start;
    order: 1;
}

@media (max-width: 480px) {
    .dice-prize-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .dice-prize-faces {
        align-self: flex-end;
    }
}

#dice-rewards-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 16, 38, 0.9);
    backdrop-filter: blur(14px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

#dice-rewards-overlay.is-active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.dice-rewards-modal {
    width: min(600px, calc(100% - 40px));
    max-height: calc(100vh - 120px);
    overflow: hidden;
    background: linear-gradient(180deg, rgba(18, 24, 52, 0.96), rgba(8, 12, 32, 0.98));
    border-radius: 28px;
    border: 1px solid rgba(0, 255, 221, 0.35);
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    transform: translateY(25px);
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

#dice-rewards-overlay.is-active .dice-rewards-modal {
    transform: translateY(0);
    opacity: 1;
}

.dice-rewards-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    border-bottom: 1px solid rgba(0, 255, 221, 0.2);
}

.dice-rewards-header h3 {
    margin: 0;
    font-size: 26px;
    color: var(--neon-orange);
    font-weight: 900;
    text-shadow: 0 0 8px rgba(255, 138, 76, 0.75);
}

.dice-rewards-close {
    background: transparent;
    border: 2px solid #ff4d6d;
    color: #ff4d6d;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dice-rewards-close:hover {
    background: rgba(255, 77, 109, 0.12);
    box-shadow: 0 0 16px rgba(255, 77, 109, 0.5);
}

.dice-rewards-body {
    padding: 26px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.dice-rewards-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.dice-reward-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    background: linear-gradient(135deg, rgba(0, 255, 221, 0.14), rgba(138, 43, 226, 0.18));
    border: 1px solid rgba(0, 255, 221, 0.35);
    border-radius: 20px;
    padding: 20px 22px;
    box-shadow: 0 18px 50px rgba(0, 255, 221, 0.18);
    backdrop-filter: blur(6px);
}

.dice-reward-card.expired {
    background: linear-gradient(135deg, rgba(255, 77, 109, 0.08), rgba(45, 9, 45, 0.25));
    border-color: rgba(255, 77, 109, 0.4);
    box-shadow: 0 18px 45px rgba(255, 77, 109, 0.18);
}

.dice-reward-content {
    flex: 1 1 auto;
}

.dice-reward-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-shrink: 0;
}

.dice-reward-face {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 59, 141, 0.85), rgba(179, 71, 255, 0.75));
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 3px;
    padding: 6px;
    box-shadow: 0 8px 18px rgba(255, 59, 141, 0.25), inset 0 0 8px rgba(255, 255, 255, 0.12);
}

.dice-reward-pip {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow:
        0 0 5px rgba(255, 255, 255, 0.85),
        0 0 9px rgba(255, 255, 255, 0.35);
    opacity: 0;
    transform: scale(0.6);
    align-self: center;
    justify-self: center;
}

.dice-reward-pip-1 { grid-area: 1 / 1; }
.dice-reward-pip-2 { grid-area: 1 / 2; }
.dice-reward-pip-3 { grid-area: 1 / 3; }
.dice-reward-pip-4 { grid-area: 2 / 1; }
.dice-reward-pip-5 { grid-area: 2 / 2; }
.dice-reward-pip-6 { grid-area: 2 / 3; }
.dice-reward-pip-7 { grid-area: 3 / 1; }
.dice-reward-pip-8 { grid-area: 3 / 2; }
.dice-reward-pip-9 { grid-area: 3 / 3; }

.dice-reward-face[data-value="1"] .dice-reward-pip-5,
.dice-reward-face[data-value="2"] .dice-reward-pip-1,
.dice-reward-face[data-value="2"] .dice-reward-pip-9,
.dice-reward-face[data-value="3"] .dice-reward-pip-1,
.dice-reward-face[data-value="3"] .dice-reward-pip-5,
.dice-reward-face[data-value="3"] .dice-reward-pip-9,
.dice-reward-face[data-value="4"] .dice-reward-pip-1,
.dice-reward-face[data-value="4"] .dice-reward-pip-3,
.dice-reward-face[data-value="4"] .dice-reward-pip-7,
.dice-reward-face[data-value="4"] .dice-reward-pip-9,
.dice-reward-face[data-value="5"] .dice-reward-pip-1,
.dice-reward-face[data-value="5"] .dice-reward-pip-3,
.dice-reward-face[data-value="5"] .dice-reward-pip-5,
.dice-reward-face[data-value="5"] .dice-reward-pip-7,
.dice-reward-face[data-value="5"] .dice-reward-pip-9,
.dice-reward-face[data-value="6"] .dice-reward-pip-1,
.dice-reward-face[data-value="6"] .dice-reward-pip-3,
.dice-reward-face[data-value="6"] .dice-reward-pip-4,
.dice-reward-face[data-value="6"] .dice-reward-pip-6,
.dice-reward-face[data-value="6"] .dice-reward-pip-7,
.dice-reward-face[data-value="6"] .dice-reward-pip-9 {
    opacity: 1;
    transform: scale(1);
}

.dice-reward-placeholder {
    font-size: 28px;
}

.dice-reward-content h4 {
    margin: 0 0 6px;
    font-size: 18px;
    color: #fdfbff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.dice-reward-desc {
    margin: 0 0 10px;
    color: rgba(200, 220, 255, 0.88);
    font-size: 14px;
    line-height: 1.75;
}

.dice-reward-meta {
    color: rgba(180, 205, 255, 0.88);
    font-size: 13px;
    margin-top: 12px;
}

.dice-reward-deadline {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 12px;
    background: rgba(0, 255, 221, 0.16);
    border: 1px solid rgba(0, 255, 221, 0.4);
    color: #9efcff;
    font-weight: 600;
    box-shadow: 0 0 14px rgba(0, 255, 221, 0.18);
}

.dice-rewards-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 30px;
    text-align: center;
    border-radius: 20px;
    background: rgba(10, 18, 40, 0.75);
    border: 1px dashed rgba(0, 255, 221, 0.3);
    color: rgba(200, 220, 255, 0.85);
    gap: 16px;
}

.dice-rewards-empty span {
    font-size: 48px;
    filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.35));
}

@media (max-width: 640px) {
    .dice-rewards-modal {
        width: calc(100% - 28px);
        max-height: calc(100vh - 80px);
    }

    .dice-reward-card {
        flex-direction: column;
        gap: 16px;
        padding: 18px;
    }

    .dice-reward-badge {
        justify-content: center;
        margin-top: 12px;
    }
}

@media (max-width: 640px) {
    .dice-profile-grid {
        grid-template-columns: 1fr;
    }

    .dice-profile-modal {
        width: calc(100% - 32px);
        padding: 28px 24px;
    }
}

.dice-profile-field label {
    display: block;
    font-size: 14px;
    color: rgba(212, 232, 255, 0.8);
    margin-bottom: 8px;
}

.dice-profile-field .dice-profile-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: rgba(200, 220, 255, 0.6);
}

#dice-stats-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(9, 13, 30, 0.88);
    backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#dice-stats-overlay.is-active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.dice-stats-modal {
    width: min(460px, calc(100% - 48px));
    background: linear-gradient(180deg, rgba(14, 18, 42, 0.96), rgba(8, 12, 32, 0.98));
    border-radius: 24px;
    border: 1px solid rgba(0, 255, 221, 0.25);
    box-shadow: 0 32px 72px rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 32px);
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#dice-stats-overlay.is-active .dice-stats-modal {
    transform: translateY(0);
    opacity: 1;
}

.dice-stats-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 255, 221, 0.18);
}

.dice-stats-header h3 {
    margin: 0;
    font-size: 22px;
    color: var(--neon-orange);
    text-shadow: 0 0 10px rgba(255, 138, 76, 0.7);
}

.dice-stats-close {
    background: transparent;
    border: 2px solid #ff4d6d;
    color: #ff4d6d;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.dice-stats-close:hover {
    background: rgba(255, 77, 109, 0.12);
    box-shadow: 0 0 14px rgba(255, 77, 109, 0.5);
}

.dice-stats-body {
    padding: 22px 24px 26px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    overflow-y: auto;
}

.dice-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 16px;
}

.dice-stat-card {
    background: linear-gradient(135deg, rgba(0, 255, 221, 0.12), rgba(102, 126, 234, 0.12));
    border: 1px solid rgba(0, 255, 221, 0.25);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 14px 34px rgba(0, 255, 221, 0.18);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dice-stat-label {
    font-size: 13px;
    color: rgba(200, 220, 255, 0.8);
}

.dice-stat-value {
    font-size: 22px;
    font-weight: 800;
    color: #fdfbff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.dice-stat-small {
    font-size: 15px;
    font-weight: 600;
}

.dice-stat-sub {
    font-size: 12px;
    color: rgba(180, 205, 255, 0.75);
}

.dice-stats-summary {
    text-align: center;
    font-size: 13px;
    color: rgba(200, 220, 255, 0.85);
}

@media (max-width: 480px) {
    .dice-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .dice-stats-modal {
        width: calc(100% - 24px);
    }
}

.dice-sound-toggle {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: transparent;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease;
    z-index: 110;
    padding: 0;
}

.dice-sound-toggle:hover {
    transform: translateY(-2px);
}

.dice-sound-toggle:active {
    transform: translateY(0);
}

.dice-sound-icon,
.dice-sound-slash {
    display: block;
    width: 30px;
    height: 30px;
    background: #ef4444;
    mask-position: center;
    mask-repeat: no-repeat;
    mask-size: contain;
    transition: opacity 0.2s ease;
}

.dice-sound-icon {
    mask-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23ef4444" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpolygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"/%3E%3Cpath d="M19.07 4.93a10 10 0 0 1 0 14.14"/%3E%3Cpath d="M15.54 8.46a5 5 0 0 1 0 7.07"/%3E%3C/svg%3E');
}

.dice-sound-slash {
    mask-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23ef4444" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3E%3Cline x1="18" y1="6" x2="6" y2="18"/%3E%3C/svg%3E');
    opacity: 0;
    position: absolute;
}

.dice-sound-toggle.is-muted .dice-sound-slash {
    opacity: 1;
}

.dice-sound-toggle.is-muted .dice-sound-icon {
    opacity: 0.35;
}

@media (max-width: 768px) {
    .dice-sound-toggle {
        top: 8px;
        right: 10px;
    }
}

.fixed-stats-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 26px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    background: rgba(0, 255, 221, 0.12);
    color: #aefcff;
    border: 1px solid rgba(0, 255, 221, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fixed-stats-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(0, 255, 221, 0.3);
}

.fixed-stats-btn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .fixed-stats-btn {
        display: none;
    }
}
