@font-face {
    font-family: 'Allods';
    src: url('/static/fonts/allods.ttf') format('truetype');
    font-display: swap;
}

@keyframes icyGlow {
    0%, 100% {
        filter: drop-shadow(0 0 20px rgba(100, 200, 255, 1)) drop-shadow(0 0 40px rgba(150, 220, 255, 0.8)) drop-shadow(0 4px 8px rgba(0,0,0,0.5));
    }

    50% {
        filter: drop-shadow(0 0 40px rgba(150, 220, 255, 1)) drop-shadow(0 0 60px rgba(200, 240, 255, 1)) drop-shadow(0 4px 8px rgba(0,0,0,0.5));
    }
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
/* screen frame disabled — waiting for new design
html::after {
    content: '';
    position: fixed;
    top: -70px;
    left: -70px;
    right: -70px;
    bottom: -70px;
    background: url('/static/images/screen_frame.png') center/100% 100% no-repeat;
    pointer-events: none;
    z-index: 9000;
}
*/


body {
    font-family: 'Allods', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #000;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px 0;
    color: #ffffff;
    overflow-x: hidden;
    overflow-y: auto;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-image, url('/static/images/djan_astral.webp')) center/cover no-repeat;
    filter: blur(8px) brightness(0.5);
    will-change: filter;
    z-index: -2;
    transition: background 1.5s ease, filter 1.5s ease;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
    transition: background 1.5s ease;
}

.container {
    width: 100%;
    max-width: 500px;
    padding: 100px 20px 20px;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header {
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.help-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.help-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.crystal-timer-btn {
    position: fixed;
    top: 76px;
    right: 26px;
    z-index: 99;
    display: flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    cursor: pointer;
    font-family: inherit;
    color: inherit;
    transition: background 0.2s, transform 0.15s;
}
.crystal-timer-btn:active {
    background: rgba(255,255,255,0.18);
    transform: scale(0.96);
}
.crystal-timer-btn span {
    font-size: 13px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.crystal-balance {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 50px;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    cursor: pointer;
    color: inherit;
    font-family: inherit;
    transition: background 0.2s, transform 0.15s;
}

.crystal-balance:active {
    background: rgba(255, 255, 255, 0.18);
    transform: scale(0.96);
}

.crystal-icon {
    width: 28px;
    height: 28px;
}

#crystalCount {
    font-size: 22px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.roulette-wrapper {
    position: relative;
    width: calc(100% + 10px);
    max-width: 610px;
    margin: 0 auto 30px;
    margin-right: -10px;
    padding-top: 40px;
}

.roulette-border-glow {
    position: relative;
    width: 100%;
    border-radius: 20px;
    overflow: visible;
}
.roulette-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 20px;
    background: rgba(20, 20, 20, 0.6);
    box-shadow: 0 8px 30px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08);
    border: 1.5px solid rgba(200, 210, 225, 0.25);
    outline: 1px solid rgba(255,255,255,0.06);
    animation: silverGlow 4s ease-in-out infinite;
}
@keyframes silverGlow {
    0%, 100% { box-shadow: 0 8px 30px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08), 0 0 12px rgba(200,215,235,0.15), 0 0 25px rgba(200,215,235,0.06); }
    50%      { box-shadow: 0 8px 30px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08), 0 0 22px rgba(200,215,235,0.35), 0 0 45px rgba(200,215,235,0.12); }
}
.border-glow-dot {
    position: absolute;
    width: 30px;
    height: 30px;
    margin-left: -15px;
    margin-top: -15px;
    background: radial-gradient(circle, rgba(220,230,245,0.3) 0%, rgba(200,215,235,0.12) 35%, transparent 65%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 11;
    filter: blur(4px);
    animation: perimeterGlow 20s linear infinite;
}
.roulette-border-glow.lucky-glow .border-glow-dot {
    background: radial-gradient(circle, rgba(255,220,100,0.4) 0%, rgba(255,200,50,0.15) 30%, transparent 60%);
}
@keyframes perimeterGlow {
    /* верх: лево→право (37.5%) */
    0%      { top: 0; left: 0; }
    37.5%   { top: 0; left: 100%; }
    /* право: верх→низ (12.5%) */
    50%     { top: 100%; left: 100%; }
    /* низ: право→лево (37.5%) */
    87.5%   { top: 100%; left: 0; }
    /* лево: низ→верх (12.5%) */
    100%    { top: 0; left: 0; }
}

.roulette-pointer {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: auto;
    z-index: 10;
    animation: icyGlow 2s ease-in-out infinite;
    pointer-events: none;
}

.roulette-track-wrapper {
    width: 100%;
    overflow: hidden;
}

.roulette-track {
    display: flex;
    gap: 6px;
    padding: 5px 300px;
    will-change: transform;
}

.prize-card {
    flex-shrink: 0;
    width: 200px;
    height: 267px;
    border-radius: 0;
    overflow: visible;
    position: relative;
    border: none;
    box-shadow: none;
    transition: transform 0.3s;
    background: transparent;
}

.prize-card.frame-card {
    display: flex;
    align-items: center;
    justify-content: center;
}

.frame-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    z-index: 1;
}

.frame-label {
    position: relative;
    z-index: 5;
    transform: translateZ(2px);
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    text-align: center;
    text-shadow: 0 2px 6px rgba(0,0,0,0.8), 0 0 10px rgba(0,0,0,0.5);
    line-height: 1.25;
    padding: 0 25px;
    word-break: break-word;
}

.roulette-track.spinning .prize-card {
    will-change: transform;
    animation: none !important;
}
.roulette-track.spinning .prize-card .smoke-particle,
.roulette-track.spinning .prize-card .shine-overlay {
    display: none !important;
}
.roulette-track.spinning .frame-img {
    animation: none !important;
    filter: none !important;
}

.prize-card.winning {
    animation: winningGlow 1s ease-in-out infinite;
}

@keyframes winningGlow {
    0%, 100% {
        transform: scale(1.05);
        filter: brightness(1.1);
    }

    50% {
        transform: scale(1.1);
        filter: brightness(1.3);
    }
}


@keyframes spinGlow {
    0%, 100% {
        filter: drop-shadow(0 0 15px var(--spin-glow1, rgba(120,80,220,0.8))) drop-shadow(0 0 30px var(--spin-glow2, rgba(60,100,255,0.6)));
    }
    50% {
        filter: drop-shadow(0 0 30px var(--spin-glow3, rgba(140,90,255,1))) drop-shadow(0 0 50px var(--spin-glow4, rgba(70,120,255,0.9)));
    }
}

.spin-button {
    display: block;
    width: auto;
    max-width: 220px;
    min-width: 160px;
    margin: 0 auto;
    padding: 0;
    height: 70px;
    border-radius: 12px;
    border: none;
    background: none;
    box-shadow: none;
    cursor: pointer;
    position: relative;
    overflow: visible;
    transition: filter 0.2s, transform 0.2s;
    animation: spinGlow 2s ease-in-out infinite;
}
.spin-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    height: 150%;
    transform: translate(-50%, -50%);
    background: url('/static/images/SPIN.webp') center/contain no-repeat;
    pointer-events: none;
}
.spin-button:active::after { filter: brightness(0.7); }
.spin-button:disabled::after { filter: grayscale(1) brightness(0.6); opacity: 0.6; }

.spin-button:active {
    filter: brightness(0.7);
    transform: scale(0.95);
}

.spin-button:disabled {
    filter: grayscale(1) brightness(0.6);
    opacity: 0.6;
    cursor: not-allowed;
}

.history-button {
    display: block;
    width: 50%;
    max-width: 150px;
    margin: 15px auto 0;
    padding: 12px 20px;
    border-radius: 10px;
    border: 1.5px solid rgba(200, 210, 225, 0.25);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.08);
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.2s, filter 0.2s;
}

body.lucky-active .history-button {
    background: rgba(255,215,0,0.15);
    border-color: rgba(255,215,0,0.3);
    box-shadow: 0 0 10px rgba(255,215,0,0.1);
}
.history-button:active {
    transform: scale(0.95);
    filter: brightness(0.9);
}

.cost {
    font-size: 16px;
    opacity: 0.9;
}

.tooltip {
    position: fixed;
    top: 80px;
    left: 20px;
    right: 20px;
    background: rgba(15, 15, 15, 0.95);
    color: #ffffff;
    padding: 15px;
    border-radius: 10px;
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 100;
    max-width: 300px;
    border: 1px solid rgba(255,255,255,0.08);
}

.tooltip.show {
    opacity: 1;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.confetti-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.modal-content {
    background: rgba(25, 25, 25, 0.95);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 90%;
    position: relative;
    animation: modalAppear 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    overflow: hidden;
}

@keyframes modalAppear {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-content h2 {
    color: #ffffff;
    margin-bottom: 20px;
    font-size: 24px;
}

.prize-card-container {
    width: 200px;
    height: 267px;
    margin: 20px auto;
}
.prize-card-container .modal-card-wrap {
    width: 200px;
    height: 267px;
    animation: modalCardSway 4s ease-in-out infinite;
}
.prize-card-container .modal-card-wrap .prize-card {
    width: 200px;
    height: 267px;
    animation: none !important;
}
@keyframes modalCardSway {
    0%, 20%  { transform: perspective(800px) rotateY(0deg); }
    35%      { transform: perspective(800px) rotateY(25deg); }
    50%      { transform: perspective(800px) rotateY(-15deg); }
    65%      { transform: perspective(800px) rotateY(8deg); }
    80%, 100%{ transform: perspective(800px) rotateY(0deg); }
}

.prize-description {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    margin: 15px 0;
    font-style: italic;
}

#prizeInfo {
    font-size: 18px;
    color: #ffffff;
    margin: 20px 0;
    font-weight: bold;
}

.close-button {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.15);
    padding: 12px 40px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.2s;
}

.close-button:active {
    background: rgba(255, 255, 255, 0.2);
}

.empty-icon {
    width: 80px;
    height: 80px;
    opacity: 0.5;
    margin-bottom: 20px;
}


.history-item {
    padding: 12px;
    margin: 8px 0;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    border-left: 4px solid rgba(255,255,255,0.2);
    cursor: pointer;
    transition: background 0.2s;
}

.history-item:hover {
    background: rgba(255,255,255,0.1);
}

.history-item-prize {
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 4px;
}

.history-item-date {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}

.promo-code {
    font-size: 24px;
    font-weight: bold;
    color: #ffffff;
    background: rgba(255,255,255,0.05);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    letter-spacing: 2px;
}

.activate-button {
    margin-top: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}

.activate-button:active {
    transform: scale(0.95);
}

.activated-label {
    margin-top: 8px;
    color: #27ae60;
    font-size: 14px;
    font-weight: bold;
}

.smoke-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    filter: blur(3px);
}

.prize-card.glow-purple .smoke-particle {
    background: radial-gradient(circle, rgba(155, 89, 182, 0.8), rgba(120, 60, 160, 0) 70%);
    animation: smokeRise 2.5s ease-out infinite;
}
.prize-card.glow-orange .smoke-particle {
    background: radial-gradient(circle, rgba(255, 165, 0, 0.8), rgba(200, 120, 0, 0) 70%);
    animation: smokeRise 2.5s ease-out infinite;
}
.prize-card.glow-red .smoke-particle {
    background: radial-gradient(circle, rgba(255, 50, 0, 0.8), rgba(200, 0, 0, 0) 70%);
    animation: smokeRise 2.5s ease-out infinite;
}

@keyframes smokeRise {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0.5);
    }

    20% {
        opacity: 0.7;
    }

    100% {
        opacity: 0;
        transform: translateY(-40px) translateX(var(--drift, 5px)) scale(1.5);
    }
}

.menu-screen-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 20px;
    overflow-y: auto;
    z-index: 1;
}

.menu-screen-content::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-image, url('/static/images/djan_astral.webp')) center/cover no-repeat;
    filter: blur(8px);
    z-index: -2;
    transform: scale(1.05);
}

body.lucky-active .menu-screen-content::before {
    background: url('/static/images/bg_lucky.png') center/cover no-repeat;
}

.menu-screen-content::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: -1;
}

.menu-header {
    position: relative;
    margin-bottom: 20px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.menu-header h2 {
    color: #ffffff;
    font-size: 20px;
    position: absolute;
    left: 0;
    right: 0;
    text-align: center;
    pointer-events: none;
}

.menu-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.menu-tab {
    flex: 1;
    padding: 12px 8px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: #ffffff;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
    text-align: center;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.menu-tab.active {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.25);
}

.menu-tab:active {
    transform: scale(0.97);
}

.menu-content {
    flex: 1;
    overflow-y: auto;
}

/* Inventory grid */
.inv-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 4px;
}
.inv-slot {
    position: relative;
    cursor: pointer;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px 4px;
    background: url('/static/images/slot_empty.png') center/100% 100% no-repeat;
    transition: transform 0.15s;
}
.inv-grid > .inv-slot-filled {
    opacity: 0;
    transform: translateY(12px) scale(0.9);
    animation: invSlotIn 0.35s ease-out forwards;
}
@keyframes invSlotIn {
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.inv-slot-filled:active { transform: scale(0.95); }
.inv-slot-empty {
    cursor: default;
    border: 1.5px dashed rgba(255,255,255,0.15);
    border-radius: 8px;
    opacity: 0.25;
}
.inv-slot.inv-selected {
    background-image: url('/static/images/slot_hover.png');
}
.inv-slot-icon {
    font-size: 22px;
    margin-bottom: 2px;
}
.inv-slot-name {
    font-size: 9px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    line-height: 1.2;
    word-break: break-word;
}
.inv-slot-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    padding: 1px 5px;
    border-radius: 8px;
}
.inv-slot-color-white .inv-slot-name { color: #d0d0d0; }
.inv-slot-color-blue .inv-slot-name { color: #7fb8ff; }
.inv-slot-color-purple .inv-slot-name { color: #c89fff; }
.inv-slot-color-orange .inv-slot-name { color: #ffcc66; }
.inv-slot-color-red .inv-slot-name { color: #ff8866; }

.inv-slot-filled.inv-slot-color-white { background: radial-gradient(ellipse at center, rgba(200,200,210,0.15) 0%, rgba(200,200,210,0.03) 70%, transparent 100%), url('/static/images/slot_empty.png') center/100% 100% no-repeat; }
.inv-slot-filled.inv-slot-color-blue { background: radial-gradient(ellipse at center, rgba(70,130,230,0.2) 0%, rgba(70,130,230,0.05) 70%, transparent 100%), url('/static/images/slot_empty.png') center/100% 100% no-repeat; }
.inv-slot-filled.inv-slot-color-purple { background: radial-gradient(ellipse at center, rgba(155,89,182,0.2) 0%, rgba(155,89,182,0.05) 70%, transparent 100%), url('/static/images/slot_empty.png') center/100% 100% no-repeat; }
.inv-slot-filled.inv-slot-color-orange { background: radial-gradient(ellipse at center, rgba(255,165,0,0.25) 0%, rgba(255,165,0,0.06) 70%, transparent 100%), url('/static/images/slot_empty.png') center/100% 100% no-repeat; }
.inv-slot-filled.inv-slot-color-red { background: radial-gradient(ellipse at center, rgba(255,50,30,0.25) 0%, rgba(255,50,30,0.06) 70%, transparent 100%), url('/static/images/slot_empty.png') center/100% 100% no-repeat; }

/* Inventory detail panel */
.inv-detail {
    margin-top: 10px;
    padding: 14px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    animation: modalAppear 0.2s ease;
}
.inv-detail-name {
    font-weight: bold;
    color: #fff;
    font-size: 15px;
    margin-bottom: 4px;
}
.inv-detail-expires {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    margin-bottom: 8px;
}
.inv-detail-promo {
    font-size: 15px;
    font-weight: bold;
    color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.05);
    padding: 8px 12px;
    border-radius: 6px;
    letter-spacing: 1px;
    margin: 6px 0;
    display: inline-block;
}
.inv-detail-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.inventory-btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.1);
    color: #ffffff;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
}

.inventory-btn:active {
    transform: scale(0.95);
}

.inventory-btn.activate {
    background: rgba(39, 174, 96, 0.2);
    border-color: rgba(39, 174, 96, 0.4);
}

/* Craft cards */
.craft-card {
    padding: 14px;
    margin: 8px 0;
    background: rgba(255,255,255,0.03);
    border-radius: 14px;
    border: 2px solid rgba(255,255,255,0.06);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, border-color 0.3s;
}
.craft-border-white { border-color: rgba(200,200,200,0.25); }
.craft-border-blue { border-color: rgba(70,130,230,0.35); }
.craft-border-purple { border-color: rgba(155,89,182,0.4); box-shadow: 0 0 8px rgba(155,89,182,0.1); }
.craft-border-orange { border-color: rgba(255,165,0,0.45); box-shadow: 0 0 10px rgba(255,165,0,0.12); }
.craft-border-red { border-color: rgba(255,50,0,0.45); box-shadow: 0 0 12px rgba(255,50,0,0.12); }
.craft-card:active { transform: scale(0.98); }
.craft-ready {
    background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
}
.craft-locked {
    opacity: 0.5;
}
.craft-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 10px;
}
/* Мини-карточки в крафте */
.craft-mini-card {
    position: relative;
    text-align: center;
    transition: transform 0.3s, opacity 0.3s;
}
.craft-mini-card .prize-card {
    width: 80px;
    height: 107px;
    contain: none;
}
.craft-mini-card .frame-label {
    font-size: 8px;
    padding: 0 6px;
}
.craft-mini-card .card-gem {
    font-size: 12px;
    top: 20px;
}
.craft-count {
    font-size: 13px;
    font-weight: bold;
    color: rgba(255,255,255,0.6);
    margin-top: 4px;
    text-align: center;
}
.craft-arrow {
    font-size: 24px;
    color: rgba(255,255,255,0.2);
    font-weight: bold;
    align-self: center;
    margin-bottom: 20px;
}
.craft-ready .craft-arrow {
    color: rgba(255,255,255,0.4);
}

/* Анимация обмена */
.craft-fly-out {
    animation: craftFlyOut 0.3s ease-in forwards;
}
@keyframes craftFlyOut {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.3) translateX(40px); opacity: 0; }
}
.craft-flash-in {
    animation: craftFlashIn 0.4s ease-out;
}
@keyframes craftFlashIn {
    0% { transform: scale(1.5); opacity: 0; filter: brightness(3); }
    50% { filter: brightness(2); }
    100% { transform: scale(1); opacity: 1; filter: brightness(1); }
}

.craft-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.craft-progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
}
.craft-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #e67e22, #f39c12);
    border-radius: 4px;
    transition: width 0.4s ease;
}
.craft-ready .craft-progress-fill {
    background: linear-gradient(90deg, #f39c12, #ffd700);
    box-shadow: 0 0 6px rgba(255,215,0,0.3);
}
.craft-progress-text {
    font-size: 12px;
    font-weight: bold;
    color: rgba(255,255,255,0.45);
    min-width: 30px;
    text-align: right;
}
.craft-btn {
    width: 100%;
    padding: 11px;
    border-radius: 10px;
    border: 1px solid rgba(243,156,18,0.25);
    background: rgba(243,156,18,0.1);
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
}
.craft-ready .craft-btn {
    border-color: rgba(255,215,0,0.3);
    background: rgba(255,215,0,0.1);
}
.craft-btn:active { transform: scale(0.97); }
.craft-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.menu-empty {
    text-align: center;
    color: rgba(255,255,255,0.4);
    padding: 40px 20px;
    font-size: 14px;
}

@media (max-width: 480px) {
    .prize-card {
        width: 160px;
        height: 213px;
    }
    .frame-label {
        font-size: 13px;
        padding: 0 20px;
    }
    .roulette-pointer {
        width: 50px;
    }
    .spin-button {
        font-size: 18px;
        padding: 15px;
    }
}

/* Маленькие экраны по высоте */
@media (max-height: 700px) {
    .container {
        padding: 80px 15px 15px;
    }
    .roulette-wrapper {
        margin-bottom: 15px;
        padding-top: 30px;
    }
    .prize-card {
        width: 130px;
        height: 173px;
    }
    .frame-label {
        font-size: 11px;
        padding: 0 15px;
    }
    .card-gem {
        font-size: 14px;
        top: 24px;
    }
    .dolg-bar-wrap {
        margin-bottom: 8px;
    }
    .history-button {
        margin-top: 8px;
        padding: 10px 16px;
        font-size: 14px;
    }
}
@media (max-height: 580px) {
    .container {
        padding: 65px 10px 10px;
    }
    .roulette-wrapper {
        margin-bottom: 10px;
        padding-top: 20px;
    }
    .prize-card {
        width: 110px;
        height: 147px;
    }
    .frame-label {
        font-size: 9px;
        padding: 0 10px;
    }
    .card-gem {
        font-size: 12px;
        top: 18px;
    }
    .roulette-pointer {
        width: 40px;
    }
    .history-button {
        margin-top: 5px;
        padding: 8px 14px;
        font-size: 13px;
    }
    .help-button {
        width: 34px;
        height: 34px;
        font-size: 20px;
    }
    .crystal-balance {
        padding: 7px 14px;
    }
    #crystalCount {
        font-size: 18px;
    }
    .crystal-icon {
        width: 22px;
        height: 22px;
    }
}

@keyframes goldenPulse {
    0%, 100% { box-shadow: 0 0 18px rgba(255,215,0,0.6), inset 0 0 8px rgba(255,215,0,0.15); }
    50%       { box-shadow: 0 0 36px rgba(255,215,0,0.9), inset 0 0 16px rgba(255,215,0,0.25); }
}

.roulette-container.lucky-mode {
    border: 2px solid #ffd700 !important;
    animation: goldenPulse 1.5s ease-in-out infinite;
}

.prize-card.lucky-card {
    filter: drop-shadow(0 0 8px rgba(255,215,0,0.4));
}

.dolg-bar-wrap {
    width: 100%;
    max-width: 500px;
    margin: 8px 0 4px;
    padding: 0 4px;
}

.dolg-bar-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.dolg-bar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dolg-info-btn {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff; font-size: 12px;
    cursor: pointer; flex-shrink: 0;
    line-height: 22px; text-align: center;
}

.dolg-bar-title {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
}

.dolg-bar-score {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
}

.dolg-bar-img-wrap {
    position: relative;
    width: 100%;
    height: 28px;
    cursor: pointer;
}

.dolg-bar-img-wrap img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: fill;
    border-radius: 6px;
}

.dolg-bar-full-img {
    clip-path: inset(0 100% 0 0);
    transition: clip-path 0.4s ease;
}

@keyframes dolgReadyPulse {
    from { filter: brightness(1); }
    to   { filter: brightness(1.4) drop-shadow(0 0 6px #ffd700); }
}

#luckyReadyLabel {
    display: none;
    text-align: center;
    font-size: 13px;
    color: #ffd700;
    font-weight: bold;
    margin-bottom: 4px;
    letter-spacing: 1px;
    text-shadow: 0 0 8px rgba(255,215,0,0.8);
}

#luckyReadyLabel.show { display: block; }
.gift-modal-content {
    max-width: 420px;
    width: 94%;
    background: rgba(15,15,20,0.96);
    border: 2px solid rgba(255,215,0,0.4);
    border-radius: 20px;
    padding: 24px 14px 20px;
    position: relative;
    z-index: 1001;
    overflow: visible;
    box-shadow: 0 0 20px rgba(255,215,0,0.12), 0 0 40px rgba(255,165,0,0.06), inset 0 0 15px rgba(255,215,0,0.03);
}

.gift-modal-title {
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 8px;
}

.gift-modal-desc {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.5;
}

.flip-cards-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
}

.flip-card {
    width: 100px;
    height: 133px;
    flex-shrink: 0;
    perspective: 800px;
    cursor: pointer;
}

.flip-card-inner {
    width: 100%; height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.55s cubic-bezier(0.4,0,0.2,1);
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-align: center;
}

.flip-card-front {
    background: rgba(20,20,20,0.6);
    border: 1px solid rgba(255,255,255,0.12);
    padding: 0;
}

.flip-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.flip-card-back {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 1px solid rgba(255,215,0,0.3);
    transform: rotateY(180deg);
    font-size: 11px;
    color: rgba(255,255,255,0.85);
    line-height: 1.4;
    gap: 4px;
    padding: 8px;
}

.flip-card-back .prize-label {
    font-size: 13px;
    font-weight: bold;
    color: #ffd700;
}

.flip-tap-hint {
    font-size: 11px;
    color: rgba(255,255,255,0.35);
    text-align: center;
    margin-bottom: 14px;
}

.container.hold-active-overlay::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 0;
    pointer-events: none;
}

.container.hold-active-overlay .roulette-wrapper {
    position: relative;
    z-index: 1;
}

.lucky-case-title {
    background: linear-gradient(135deg, #ffd700, #ffb800, #ffe566, #ffb800);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: goldShift 3s linear infinite;
    font-size: 22px !important;
    margin-bottom: 10px !important;
}

@keyframes goldShift {
    0%   { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.lucky-case-sub {
    font-size: 13px;
    color: rgba(255,255,255,0.75);
    text-align: center;
    line-height: 1.5;
    margin: 0 0 16px;
}

@keyframes raysRotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to   { transform: translate(-50%, -50%) rotate(360deg); }
}


@media (max-width: 380px) {
    .flip-card { width: 80px; height: 107px; }
    .flip-cards-row { gap: 8px; }
    .gift-modal-content { padding: 16px 14px 14px; }
    .flip-card-back { font-size: 10px; padding: 6px; }
    .flip-card-back .prize-label { font-size: 11px; }
}

/* ===== TEXT CARD COLORS ===== */
.prize-card.text-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    text-align: center;
}
.prize-card-label {
    font-size: 13px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    line-height: 1.3;
    word-break: break-word;
}

/* White */
.prize-card.color-white {
    background: linear-gradient(135deg, #3a3a4a, #2a2a38);
    border: 1px solid rgba(255,255,255,0.15);
}
.prize-card.color-white .prize-card-label { color: #e0e0e0; }

/* Blue */
.prize-card.color-blue {
    background: linear-gradient(135deg, #1a3a6e, #0d2147);
    border: 1px solid rgba(70,130,230,0.4);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 12px rgba(70,130,230,0.25);
}
.prize-card.color-blue .prize-card-label { color: #7fb8ff; }

/* Purple */
.prize-card.color-purple {
    background: linear-gradient(135deg, #3d1a6e, #250d47);
    border: 1px solid rgba(155,89,182,0.4);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 14px rgba(155,89,182,0.3);
}
.prize-card.color-purple .prize-card-label { color: #c89fff; }

/* Orange */
.prize-card.color-orange {
    background: linear-gradient(135deg, #6e3a0d, #472500);
    border: 1px solid rgba(255,165,0,0.5);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 18px rgba(255,165,0,0.35);
    animation: orangeGlow 2.5s ease-in-out infinite;
}
.prize-card.color-orange .prize-card-label { color: #ffcc66; }

/* Red (burning) */
.prize-card.color-red {
    background: linear-gradient(135deg, #6e0d0d, #470000);
    border: 1px solid rgba(255,50,0,0.6);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 24px rgba(255,30,0,0.4);
    animation: redBurn 2s ease-in-out infinite;
}
.prize-card.color-red .prize-card-label { color: #ff8866; }

/* ===== LUCKY MODE — background + spin button ===== */
body.lucky-active::after {
    background: url('/static/images/bg_lucky.png') center/cover no-repeat !important;
    filter: blur(8px) brightness(0.5);
}
body.lucky-active::before {
    background: rgba(0, 0, 0, 0.5) !important;
}
@keyframes purpleGlow {
    0%, 100% {
        filter: drop-shadow(0 0 15px rgba(155, 89, 182, 0.8)) drop-shadow(0 0 30px rgba(120, 60, 160, 0.6));
    }
    50% {
        filter: drop-shadow(0 0 30px rgba(155, 89, 182, 1)) drop-shadow(0 0 50px rgba(140, 70, 200, 0.9));
    }
}
@keyframes luckySpinGlow {
    0%, 100% {
        filter: drop-shadow(0 0 15px rgba(255,215,0,0.8)) drop-shadow(0 0 30px rgba(255,165,0,0.6));
    }
    50% {
        filter: drop-shadow(0 0 30px rgba(255,215,0,1)) drop-shadow(0 0 50px rgba(255,140,0,0.9));
    }
}
body.lucky-active .spin-button {
    animation: luckySpinGlow 2s ease-in-out infinite !important;
}
body.lucky-active .spin-button::after {
    filter: none !important;
}

/* ===== LUCKY PICK MINI-GAME ===== */
.lucky-pick-cards {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 16px;
}
.lp-pick {
    width: 100px;
    height: 140px;
    perspective: 800px;
    cursor: pointer;
}
.lp-pick-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.lp-pick.flipped .lp-pick-inner {
    transform: rotateY(180deg);
}
.lp-pick-front,
.lp-pick-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}
#luckyPickModal .modal-content {
    border: 2px solid rgba(255,215,0,0.4);
    box-shadow: 0 0 20px rgba(255,215,0,0.12), 0 0 40px rgba(255,165,0,0.06), inset 0 0 15px rgba(255,215,0,0.03);
}
.lp-pick-front {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 2px solid rgba(255,215,0,0.3);
    box-shadow: 0 0 15px rgba(255,215,0,0.15);
}
.lp-pick-front::after {
    content: '?';
    font-size: 36px;
    font-weight: bold;
    color: rgba(255,215,0,0.6);
    text-shadow: 0 0 10px rgba(255,215,0,0.3);
}
.lp-pick-back {
    transform: rotateY(180deg);
    padding: 10px 6px;
}
.lp-pick-back .lp-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}
.lp-pick-back .lp-pick-name {
    position: relative;
    z-index: 2;
    font-size: 11px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.9);
    line-height: 1.3;
}
.lp-pick-back .lp-pick-icon {
    position: relative;
    z-index: 2;
    font-size: 22px;
    margin-bottom: 4px;
}
.lp-pick.chosen {
    transform: scale(1.08);
}
.lp-pick.dimmed {
    opacity: 0.5;
}
.lp-pick.disabled { cursor: default; pointer-events: none; }
.lucky-pick-result { text-align: center; }

@keyframes lpPickPulse {
    0%, 100% { box-shadow: 0 0 15px rgba(255,215,0,0.15); }
    50%      { box-shadow: 0 0 25px rgba(255,215,0,0.35); }
}
.lp-pick:not(.flipped) .lp-pick-front {
    animation: lpPickPulse 2s ease-in-out infinite;
}

/* ===== PRIZES LIST — REAL CARDS ===== */
.pl-screen {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 60px 0 20px;
    z-index: 1;
}
.pl-screen::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--bg-image, url('/static/images/djan_astral.webp')) center/cover no-repeat;
    filter: blur(8px);
    z-index: -2;
    transform: scale(1.05);
}
.pl-screen::after {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: -1;
}
.pl-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
}
.pl-title {
    text-align: center;
    font-size: 18px;
    color: #fff;
    margin-bottom: 12px;
    flex-shrink: 0;
}
.pl-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px 10px;
    -webkit-overflow-scrolling: touch;
}
.pl-accordion { margin-bottom: 6px; }
.pl-accordion-header {
    font-size: 14px;
    font-weight: bold;
    padding: 12px 14px;
    border-radius: 10px;
    cursor: pointer;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    position: relative;
    transition: background 0.2s;
}
.pl-accordion-header::after {
    content: '▸';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.25s;
    opacity: 0.4;
}
.pl-accordion.open .pl-accordion-header::after {
    transform: translateY(-50%) rotate(90deg);
}
.pl-accordion-header:active { background: rgba(255,255,255,0.08); }

.pl-accordion-header.pl-color-white  { color: #c8c8c8; border-color: rgba(200,200,200,0.12); }
.pl-accordion-header.pl-color-blue   { color: #7fb8ff; border-color: rgba(70,130,230,0.2); }
.pl-accordion-header.pl-color-purple { color: #c89fff; border-color: rgba(155,89,182,0.2); }
.pl-accordion-header.pl-color-orange { color: #ffcc66; border-color: rgba(255,165,0,0.25); }
.pl-accordion-header.pl-color-red    { color: #ff6644; border-color: rgba(255,50,0,0.25); }

.pl-accordion .pl-row {
    display: none;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 0 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.pl-accordion .pl-row::-webkit-scrollbar { display: none; }
.pl-accordion.open .pl-row {
    display: flex;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 10px;
    background: rgba(0,0,0,0.2);
}
.pl-accordion.open.pl-acc-white .pl-row {
    border-color: rgba(200,200,200,0.15);
    box-shadow: 0 0 8px rgba(200,200,200,0.06);
}
.pl-accordion.open.pl-acc-blue .pl-row {
    border-color: rgba(70,130,230,0.2);
    box-shadow: 0 0 10px rgba(70,130,230,0.08);
}
.pl-accordion.open.pl-acc-purple .pl-row {
    border-color: rgba(155,89,182,0.25);
    box-shadow: 0 0 12px rgba(155,89,182,0.1);
}
.pl-accordion.open.pl-acc-orange .pl-row {
    border-color: rgba(255,165,0,0.3);
    box-shadow: 0 0 14px rgba(255,165,0,0.12);
}
.pl-accordion.open.pl-acc-red .pl-row {
    border-color: rgba(255,50,0,0.3);
    box-shadow: 0 0 16px rgba(255,50,0,0.15);
}

.pl-card-wrap {
    flex-shrink: 0;
    width: 120px;
    cursor: pointer;
    text-align: center;
}
.pl-card-wrap .prize-card {
    width: 120px;
    height: 160px;
    transition: transform 0.2s;
    contain: none;
    overflow: visible;
}
.pl-card-wrap .frame-label {
    font-size: 11px;
    padding: 0 12px;
}
.pl-card-wrap .card-gem {
    font-size: 16px;
    top: 32px;
}
.pl-card-wrap:active .prize-card {
    transform: scale(0.95);
}
.pl-card-desc {
    font-size: 9px;
    color: rgba(255,255,255,0.5);
    line-height: 1.3;
    margin-top: 6px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s;
}
.pl-card-wrap.show-desc .pl-card-desc {
    max-height: 60px;
}
.pl-card-wrap.show-desc .prize-card {
    transform: scale(1.05);
    filter: brightness(1.2);
}

/* Lucky prizes in dolgInfo modal */
.lucky-prizes-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}
.lp-row-line {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}
.lucky-prizes-row .lp-card-purple .lp-frame {
    filter: drop-shadow(0 0 4px rgba(155,89,182,0.4));
}
.lucky-prizes-row .lp-card-orange .lp-frame {
    filter: drop-shadow(0 0 5px rgba(255,165,0,0.4));
}
.lucky-prizes-row .lp-card-red .lp-frame {
    filter: drop-shadow(0 0 6px rgba(255,50,0,0.4));
}
.lp-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    border: none;
    background: transparent;
    cursor: pointer;
    min-height: 100px;
    transition: transform 0.15s;
    overflow: hidden;
    padding: 12px 4px;
}
.lp-card:active { transform: scale(0.95); }
.lp-frame {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}
.lp-card-icon { position: relative; z-index: 2; font-size: 18px; margin-bottom: 2px; }
.lp-card-name { position: relative; z-index: 2; font-size: 8px; font-weight: bold; line-height: 1.25; word-break: break-word; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,0.9); }
.lp-card-desc { position: relative; z-index: 2; font-size: 9px; line-height: 1.3; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,0.9); font-weight: bold; }

.lp-card.show-desc .lp-frame { opacity: 0.3; }
.lp-card.show-desc .lp-card-desc { color: #fff; }

/* ===== CARD EFFECTS: shine, glow, 3D flip ===== */

/* --- Shine: блик внутри рамки --- */
.prize-card.card-shine .shine-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 3;
}
.prize-card.card-shine .shine-overlay::after {
    content: '';
    position: absolute;
    top: -10%;
    left: 0;
    width: 40%;
    height: 120%;
    transform: skewX(-18deg) translateX(-300%);
    animation: frameShine 4s ease-in-out infinite;
    pointer-events: none;
}
/* Серебряный блик для фиолетовых */
.prize-card.card-shine.shine-silver .shine-overlay::after {
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(200, 200, 255, 0.2) 35%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(200, 200, 255, 0.2) 65%,
        transparent 100%
    );
}
/* Золотой блик для рыжих и красных */
.prize-card.card-shine.shine-gold .shine-overlay::after {
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(255, 215, 0, 0.25) 35%,
        rgba(255, 230, 100, 0.5) 50%,
        rgba(255, 215, 0, 0.25) 65%,
        transparent 100%
    );
}
@keyframes frameShine {
    0%   { transform: skewX(-18deg) translateX(-300%); }
    100% { transform: skewX(-18deg) translateX(600%); }
}

/* --- Редкие карточки: чуть крупнее остальных --- */
.prize-card.epic,
.prize-card.legendary {
    transform: scale(1.06);
    z-index: 2;
}

/* --- Glow: пульсирующее свечение по контуру рамки --- */
.prize-card.glow-white .frame-img {
    animation: glowWhite 3.5s ease-in-out infinite;
}
.prize-card.glow-blue .frame-img {
    animation: glowBlue 3s ease-in-out infinite;
}
.prize-card.glow-purple .frame-img {
    animation: glowPurple 3s ease-in-out infinite;
}
.prize-card.glow-orange .frame-img {
    animation: glowOrange 2.5s ease-in-out infinite;
}
.prize-card.glow-red .frame-img {
    animation: glowRed 2s ease-in-out infinite;
}
@keyframes glowWhite {
    0%, 100% { filter: drop-shadow(0 0 4px rgba(200, 200, 220, 0.2)); }
    50%      { filter: drop-shadow(0 0 10px rgba(200, 200, 220, 0.45)); }
}
@keyframes glowBlue {
    0%, 100% { filter: drop-shadow(0 0 5px rgba(70, 130, 230, 0.25)); }
    50%      { filter: drop-shadow(0 0 12px rgba(70, 130, 230, 0.55)); }
}
@keyframes glowPurple {
    0%, 100% { filter: drop-shadow(0 0 6px rgba(155, 89, 182, 0.3)); }
    50%      { filter: drop-shadow(0 0 14px rgba(155, 89, 182, 0.6)); }
}
@keyframes glowOrange {
    0%, 100% {
        filter:
            drop-shadow(0 0 2px rgba(255, 165, 0, 0.9))
            drop-shadow(0 0 4px rgba(255, 165, 0, 0.7))
            drop-shadow(0 0 12px rgba(255, 165, 0, 0.35));
    }
    50% {
        filter:
            drop-shadow(0 0 3px rgba(255, 180, 0, 1))
            drop-shadow(0 0 6px rgba(255, 180, 0, 0.85))
            drop-shadow(0 0 24px rgba(255, 165, 0, 0.7));
    }
}
@keyframes glowRed {
    0%, 100% {
        filter:
            drop-shadow(0 0 2px rgba(255, 40, 0, 0.9))
            drop-shadow(0 0 4px rgba(255, 40, 0, 0.7))
            drop-shadow(0 0 12px rgba(255, 30, 0, 0.4));
    }
    50% {
        filter:
            drop-shadow(0 0 3px rgba(255, 50, 0, 1))
            drop-shadow(0 0 6px rgba(255, 50, 0, 0.85))
            drop-shadow(0 0 24px rgba(255, 50, 0, 0.8));
    }
}

/* --- Diamond gem на epic/legendary карточках --- */
.card-gem {
    position: absolute;
    top: 48px;
    left: 50%;
    transform: translateX(-50%) translateZ(2px);
    z-index: 6;
    font-size: 22px;
    pointer-events: none;
    text-shadow: -0.5px -0.5px 0 #fff, 0.5px -0.5px 0 #fff, -0.5px 0.5px 0 #fff, 0.5px 0.5px 0 #fff;
    animation: gemGlint 5s ease-in-out infinite;
}
@keyframes gemGlint {
    0%, 70%, 100% { filter: brightness(1); }
    75%           { filter: brightness(1.8) drop-shadow(0 0 6px rgba(255, 255, 255, 0.7)); }
    80%           { filter: brightness(1); }
    90%           { filter: brightness(1.5) drop-shadow(0 0 4px rgba(255, 255, 255, 0.5)); }
    95%           { filter: brightness(1); }
}

.card-gem-noeffect {
    animation: none;
    text-shadow: -0.5px -0.5px 0 #fff, 0.5px -0.5px 0 #fff, -0.5px 0.5px 0 #fff, 0.5px 0.5px 0 #fff;
}

.card-gem-plus {
    color: #fff;
    -webkit-text-stroke: 0.5px #fff;
    text-shadow: -0.5px -0.5px 0 #fff, 0.5px -0.5px 0 #fff, -0.5px 0.5px 0 #fff, 0.5px 0.5px 0 #fff;
    font-size: 18px;
    filter: grayscale(1) brightness(2);
    animation: none;
}

.card-gem-clover {
    font-size: 24px;
    animation: cloverRainbow 3s linear infinite;
    text-shadow: none;
}
@keyframes cloverRainbow {
    0%   { filter: hue-rotate(0deg)   brightness(1.2) drop-shadow(0 0 4px rgba(255,0,0,0.5)); }
    16%  { filter: hue-rotate(60deg)  brightness(1.3) drop-shadow(0 0 4px rgba(255,255,0,0.5)); }
    33%  { filter: hue-rotate(120deg) brightness(1.2) drop-shadow(0 0 4px rgba(0,255,0,0.5)); }
    50%  { filter: hue-rotate(180deg) brightness(1.3) drop-shadow(0 0 4px rgba(0,255,255,0.5)); }
    66%  { filter: hue-rotate(240deg) brightness(1.2) drop-shadow(0 0 4px rgba(0,0,255,0.5)); }
    83%  { filter: hue-rotate(300deg) brightness(1.3) drop-shadow(0 0 4px rgba(255,0,255,0.5)); }
    100% { filter: hue-rotate(360deg) brightness(1.2) drop-shadow(0 0 4px rgba(255,0,0,0.5)); }
}

/* --- 3D Flip: перекручивание для rare+ --- */
.prize-card.card-flip3d {
    transform-style: preserve-3d;
    animation: cardFlip3D 10s ease-in-out infinite;
}
@keyframes cardFlip3D {
    0%, 25%   { transform: perspective(600px) rotateY(0deg); }
    40%       { transform: perspective(600px) rotateY(30deg); }
    50%       { transform: perspective(600px) rotateY(-20deg); }
    60%       { transform: perspective(600px) rotateY(12deg); }
    70%       { transform: perspective(600px) rotateY(-6deg); }
    80%, 100% { transform: perspective(600px) rotateY(0deg); }
}
