:root{

    --bg-main: #020617;
    --bg-surface: rgba(15, 23, 42, 0.6);
    --bg-elevated: rgba(30, 41, 59, 0.7);

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-disabled: #64748b;

    --text: var(--text-primary);
    --muted: var(--text-muted);

    --border-subtle: rgba(148, 163, 184, 0.12);
    --border-default: rgba(148, 163, 184, 0.18);
    --border-strong: rgba(148, 163, 184, 0.28);
    --border-accent: rgba(99, 102, 241, 0.35);

    --b1: var(--border-default);
    --b2: rgba(30, 64, 175, 0.75);

    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-success: #22c55e;
    --accent-warning: #facc15;
    --accent-error: #ef4444;
    --accent-info: #3b82f6;

    --accent: var(--accent-primary);
    --green: var(--accent-success);
    --gold: var(--accent-warning);

    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 24px;
    --space-2xl: 32px;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.2);

    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

    --nav-panel-h: 84px;
    --nav-top-radius: 20px;
    --nav-content-gap: 16px;
    --nav-height: calc(var(--nav-panel-h) + env(safe-area-inset-bottom, 0px));
    --nav-safe-bottom: var(--nav-height);
    --header-height: 80px;

    --grad-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #22c55e 100%);
    --grad-soft: radial-gradient(circle at top, rgba(2, 6, 23, 0.75), rgba(15, 23, 42, 0.95));
    --grad-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
    --grad-surface-hover: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));

    --grad-a: var(--grad-primary);

    --progress-primary: linear-gradient(90deg, #4f46e5, #22c55e);
    --progress-secondary: linear-gradient(90deg, #22c55e, #2dd4bf);
    --progress: var(--progress-primary);
    --progress2: var(--progress-secondary);

    --bg0:#07081a;
    --bg1:#0b0a26;
    --bg2:#08081c;

    --text:#eef0ff;
    --muted:rgba(238,240,255,.55);

    --glassA:rgba(255,255,255,.07);
    --glassB:rgba(255,255,255,.03);
    --stroke:rgba(255,255,255,.08);

    --shadow: 0 16px 40px rgba(0,0,0,.45);
    --shadow2: 0 10px 24px rgba(0,0,0,.35);

    --r20:20px;
    --r18:18px;
    --r16:16px;
    --r999:999px;

    --safeB: env(safe-area-inset-bottom, 0px);
    --safeT: env(safe-area-inset-top, 0px);
    font-family: "Paytone One", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*{ box-sizing:border-box; }

html,body{
    height:100%;
    margin:0;
    padding:0;
    color:var(--text);
    font-family: "Paytone One", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    overflow-x:hidden;
}

body{
    overflow:hidden;
    overscroll-behavior: none;

    background:
            radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1.6px) 0 0 / 90px 90px,
            radial-gradient(circle, rgba(96,165,250,0.06) 1px, transparent 1.6px) 30px 40px / 140px 140px,
            radial-gradient(circle at 50% -10%, rgba(96,165,250,0.22) 0%, rgba(96,165,250,0) 42%),
            radial-gradient(circle at 15% 10%, rgba(99,102,241,0.18) 0%, rgba(99,102,241,0) 45%),
            radial-gradient(circle at top, #0E0B4E 0%, #060425 55%, #050420 100%),
            linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.55) 100%);
    background-attachment: fixed;

    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
    font-family: "Paytone One", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
}

input, textarea, select{
    -webkit-user-select: text;
    user-select: text;
}

html.tg-app,
html.tg-app body{
    width: 100%;
    height: var(--tg-viewport-stable-height, var(--tg-viewport-height, 100dvh));
    min-height: var(--tg-viewport-stable-height, var(--tg-viewport-height, 100dvh));
    max-height: var(--tg-viewport-stable-height, var(--tg-viewport-height, 100dvh));
    overflow: hidden;
    overscroll-behavior: none;
    background: var(--tg-bg-color, #050420);
}

html.tg-desktop{
    --nav-safe-bottom: var(--nav-height);
}

html.tg-desktop #app{
    padding-top: 0;
}

html.tg-app.tg-desktop{
    --tma-safe-top: 0;
    --tma-safe-right: 0;
    --tma-safe-left: 0;
    --nav-safe-bottom: var(--nav-height);
}

html.tg-app.tg-desktop,
html.tg-app.tg-desktop body{
    height: auto;
    min-height: 100%;
    max-height: none;
}

html.tg-app.tg-desktop #app{
    position: relative;
    inset: auto;
    height: var(--tg-viewport-stable-height, var(--tg-viewport-height, 100vh));
    min-height: var(--tg-viewport-stable-height, var(--tg-viewport-height, 100vh));
    max-height: var(--tg-viewport-stable-height, var(--tg-viewport-height, 100vh));
    padding: 0 0 var(--nav-safe-bottom) 0;
}

html.tg-app.tg-desktop .quick-icons{
    top: calc(var(--app-header-h, 52px) + 8px);
}

html.tg-app.tg-desktop .quick-icons--left{
    left: 8px;
}

html.tg-app.tg-desktop .quick-icons--right{
    right: 8px;
}

#app{
    width:100%;
    max-width:100%;
    height: var(--tg-viewport-stable-height, var(--tg-viewport-height, 100dvh));
    max-height: var(--tg-viewport-stable-height, var(--tg-viewport-height, 100dvh));
    min-height: var(--tg-viewport-stable-height, var(--tg-viewport-height, 100dvh));
    display:flex;
    flex-direction:column;
    padding:0;
    padding-top:env(safe-area-inset-top, 0px);
    padding-bottom: var(--nav-safe-bottom);
    overflow:hidden;
    overscroll-behavior: none;
    box-sizing: border-box;
}

html.tg-app{
    --nav-safe-bottom: calc(var(--nav-panel-h) + var(--tma-safe-bottom, env(safe-area-inset-bottom, 0px)));
    --tma-inset-top: calc(
        var(--tg-viewport-content-safe-area-inset-top, 0px) +
        var(--tg-viewport-safe-area-inset-top, 0px)
    );
    --tma-safe-top: var(--tma-inset-top);
    --tma-safe-right: calc(
        var(--tg-viewport-content-safe-area-inset-right, 0px) +
        var(--tg-viewport-safe-area-inset-right, 0px)
    );
    --tma-safe-bottom: calc(
        var(--tg-viewport-content-safe-area-inset-bottom, 0px) +
        var(--tg-viewport-safe-area-inset-bottom, 0px)
    );
    --tma-safe-left: calc(
        var(--tg-viewport-content-safe-area-inset-left, 0px) +
        var(--tg-viewport-safe-area-inset-left, 0px)
    );
}

html.tg-app.tg-ios:not(.tg-fullscreen){
    --tma-safe-top: max(
        var(--tma-inset-top),
        calc(env(safe-area-inset-top, 0px) + 54px)
    );
}

html.tg-app.tg-android:not(.tg-fullscreen){
    --tma-safe-top: max(var(--tma-inset-top), 88px);
}

html.tg-app.tg-fullscreen{
    --tma-safe-top: max(
        var(--tma-inset-top),
        env(safe-area-inset-top, 0px)
    );
}

html.tg-app{
    --app-header-h: 52px;
}

html.tg-app #app{
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    margin: 0;
    padding:
        var(--tma-safe-top)
        0
        var(--nav-safe-bottom)
        0;
}

html.tg-app .app-header-profile{
    flex-shrink: 0;
    padding: 10px 8px;
}

html.tg-app .quick-icons{
    top: calc(var(--tma-safe-top, env(safe-area-inset-top, 0px)) + var(--app-header-h) + 4px);
}

html.tg-app .quick-icons--left{
    left: calc(8px + var(--tma-safe-left, env(safe-area-inset-left, 0px)));
}

html.tg-app .quick-icons--right{
    right: max(
        8px,
        calc(var(--tma-safe-right, 0px) + 8px)
    );
}

.app-main{
    flex:1;
    min-height: 0;
    display:flex;
    flex-direction:column;
    gap:8px;

    overflow-y:auto;
    overflow-x:hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;

    scrollbar-width:none;
    -ms-overflow-style:none;
}

.app-main:not(.app-main--slot-fixed){
    scroll-padding-bottom: var(--nav-content-gap);
}

.app-main:has(> #tab-slot.screen-active),
.app-main.app-main--slot-fixed{
    overflow: hidden;
    overscroll-behavior: none;
    padding-bottom: 0;
    touch-action: manipulation;
}

#tab-slot.screen-active{
    flex: 1;
    min-height: 0;
    overflow: hidden;
    touch-action: manipulation;
}

.app-main::-webkit-scrollbar{ width:0; height:0; }

.screen{ display:none; flex-direction:column; gap:8px; }
.screen-active{ display:flex; }

#particles-container{
    position:fixed;
    inset:0;
    pointer-events:none;
    z-index:9000;
}
.coin,.bonus{
    position:absolute;
    width:20px;height:20px;
    font-size:18px;
    user-select:none;
    pointer-events:none;
}

.panel{
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
    border: 1px solid var(--border-default);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.panel-soft{
    background: var(--grad-soft);
    box-shadow: var(--shadow-sm);
}

.panel-title{
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
    letter-spacing: 0.01em;
}

.panel-title-main{
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-primary);
}

.panel-title-main span.icon{
    font-size: 18px;
}

.panel-sub{
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.app-header{
    width:100%;
    display:flex;
    justify-content:center;
    padding: 0 0 8px;
    background: transparent;
}

.profile-header{
    width:100%;
    max-width:100%;
    display:flex;
    flex-direction:column;
    gap:10px;
    overflow:visible;
}

.profile-main{
    position:relative;
    height:56px;
    border-radius:999px;

    background: linear-gradient(180deg,
    rgba(14, 8, 67, 0.62),
    rgba(10, 6, 40, 0.38)
    );
    border:1px solid rgba(148,163,184,0.16);
    box-shadow:
            0 14px 32px rgba(0,0,0,0.35),
            inset 0 1px 0 rgba(255,255,255,0.06);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    display:flex;
    align-items:center;
    padding-left:60px;
    padding-right:12px;
}

.profile-avatar{
    position:absolute;
    left:-4px;
    top:50%;
    transform:translateY(-50%);
    width:60px;
    height:60px;
    border-radius:999px;
    overflow:hidden;
    z-index:5;

    background: radial-gradient(circle at 30% 20%, rgba(99,102,241,0.22), rgba(13,10,58,1));
    border:1px solid rgba(99,102,241,0.25);
    box-shadow:
            0 14px 28px rgba(0,0,0,0.45),
            0 0 0 6px rgba(99,102,241,0.06);
}
.profile-avatar img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

.profile-resources{
    width:100%;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    padding-left:6px;
    flex-wrap: nowrap; 
    min-width: 0; 
}

.res-pill{
    --badge: 26px;

    flex:1 1 0;
    min-width:0;
    max-width:100%; 
    height:30px;
    border-radius:999px;
    position:relative;

    background: rgba(17,20,89,0.72);
    border:1px solid rgba(96,165,250,0.14);
    box-shadow:
            inset 0 1px 0 rgba(255,255,255,0.05),
            0 10px 16px rgba(0,0,0,0.18);

    display:flex;
    align-items:center;

    padding-left: calc(var(--badge) + 8px);
    padding-right: 10px;
    overflow:hidden;
}

.res-badge{
    position:absolute;
    left:0;
    top:50%;
    transform:translateY(-50%);
    width: var(--badge);
    height: var(--badge);
    border-radius:999px;

    display:flex;
    align-items:center;
    justify-content:center;

    background: radial-gradient(circle at 35% 25%,
    rgba(99,102,241,0.30),
    rgba(14, 8, 67, 0.65)
    );
    border:1px solid rgba(99,102,241,0.22);
    border-left:0; border-top:0; border-bottom:0;
    box-shadow: 0 10px 18px rgba(0,0,0,0.22);
}
.res-icon{
    width:16px;
    height:16px;
    object-fit:contain;
    display:block;
}

.res-value{
    width:100%;
    text-align:center;
    font-variant-numeric: tabular-nums;
    font-weight:900;
    font-size: clamp(10px, 2.5vw, 14px); 
    color: rgba(255,255,255,0.92);
    text-shadow: 0 1px 10px rgba(0,0,0,0.35);
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}

.profile-xp{
    position:relative;
    height:10px;
}

.profile-xp .level-badge{
    position:absolute;
    left:7px;
    top:50%;
    transform:translateY(-50%);
    width:44px;
    height:22px;
    border-radius:999px;

    background: rgba(17,20,89,0.78);
    border:1px solid rgba(96,165,250,0.18);
    box-shadow:
            0 10px 18px rgba(0,0,0,0.22),
            inset 0 1px 0 rgba(255,255,255,0.06);

    display:flex;
    align-items:center;
    justify-content:center;

    font-weight:900;
    font-size:13px;
    color: rgba(255,255,255,0.92);
    z-index:2;
}

.profile-xp .xp-line{
    position:absolute;
    left:52px;
    right:60px;
    top:50%;
    transform:translateY(-50%);
    height:14px;
    border-radius:999px;
    overflow:hidden;

    background: rgba(26,38,97,0.72);
    border:1px solid rgba(96,165,250,0.14);
    box-shadow:
            inset 0 1px 0 rgba(255,255,255,0.05),
            0 10px 16px rgba(0,0,0,0.16);
}
.profile-xp .xp-fill{
    height:100%;
    width: var(--p, 0%);
    border-radius:999px;
    background: linear-gradient(90deg, #2dd4bf, #60a5fa, #6366f1);
    box-shadow: 0 10px 22px rgba(99,102,241,0.22);
}
.profile-xp .xp-text{
    position:absolute;
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;

    font-size:11px;
    font-weight:900;
    letter-spacing:.2px;
    color: rgba(255,255,255,0.92);
    text-shadow: 0 1px 10px rgba(0,0,0,0.55);
    pointer-events:none;
    z-index:2;
}

@media (max-width: 380px){
    .profile-main{ height:54px; padding-left:58px; }
    .profile-avatar{ width:56px; height:56px; }
    .res-pill{
        height:28px;
        --badge: 22px;
        padding-left: calc(var(--badge) + 6px);
        padding-right: 8px;
    }
    .res-value{
        font-size: clamp(10px, 2.5vw, 13px); 
    }
    .res-icon{
        width: 14px;
        height: 14px;
    }
    .profile-xp .xp-line{ left:56px; }
}

.quick-icons{
    display:flex;
    justify-content:space-between;
    align-items:center;
    flex-direction:column;   
    gap:14px;

    padding:6px 8px;
    border-radius:14px;

}

.quick-group{
    display:flex;
    gap:12px;
    align-items:center;
    flex-direction:column;   
    background:
            radial-gradient(60px 30px at 50% -6px,
            rgba(255, 170, 60, 0.35) 0%,
            rgba(255, 170, 60, 0.12) 35%,
            rgba(229, 113, 3, 0.012) 70%),

            linear-gradient(180deg,
            rgba(255,255,255,0.06) 0%,
            rgba(229, 113, 3, 0.02) 100%),
            rgba(137, 137, 137, 0.05);

    border-radius: 12px;
}

.quick-icons{
    position: fixed;          
    right: 14px;              
    top: 72px;               
    z-index: 9999;

    display:flex;
    flex-direction:column;    
    gap:14px;
    padding:6px 8px;
    border-radius:14px;

    pointer-events:auto;      
}
.quick-group{
    display:flex;
    flex-direction:column;
    gap:1px;
    align-items:center;
}

.quick-group + .quick-group{
    padding-left:10px;
    position:relative;
}
.quick-group + .quick-group::before{
    content:"";
    position:absolute;
    left:0;
    top:6px;
    bottom:6px;
    width:1px;
    background: rgba(148,163,184,0.10);
}

.quick-item{
    width:auto;
    padding:4px 4px 6px;
    border-radius:14px;
    background:transparent;
    border:0;
    cursor:pointer;
    color: rgba(226,232,240,.92);

    display:flex;
    flex-direction:column;
    align-items:center;
    gap:5px;

    -webkit-tap-highlight-color: transparent;
    user-select:none;

    transition: transform .12s ease, filter .15s ease;
}
.quick-item:active{ transform: translateY(1px) scale(0.985); }

.quick-box img{
    width:36px;
    height:36px;
    object-fit:contain;
    display:block;
    filter: drop-shadow(0 10px 14px rgba(0,0,0,.45));
}

.quick-item.is-active .quick-box{
    border-color: rgba(99,102,241,0.28);
    box-shadow:
            0 0 0 2px rgba(99,102,241,0.26),
            0 16px 24px rgba(0,0,0,0.22),
            inset 0 1px 0 rgba(255,255,255,0.06);
    background: radial-gradient(circle at 40% 25%,
    rgba(99,102,241,0.26),
    rgba(17,20,89,0.55)
    );
}

.quick-label{
    font-size:8px;
    line-height:1;
    font-weight:400;
    letter-spacing:.2px;
    opacity:.88;
    text-shadow: 0 2px 10px rgba(0,0,0,.6);
    white-space:nowrap;
}

.quick-icons{
    position: fixed;
    top: 120px;          
    z-index: 9999;

    display:flex;
    flex-direction:column;
    gap:14px;

    padding:6px 8px;
    border-radius:14px;
}

.quick-group{
    display:flex;
    flex-direction:column;
    gap:1px;
    align-items:center;
}

.quick-icons{
    position: fixed;
    z-index: 9999;

    display:flex;
    flex-direction:column;
    gap:14px;

    padding:6px 8px;
    border-radius:14px;

    top: 65px;          
    transform: none;     
    left: auto;          
    right: auto;         
}

.quick-icons--left{
    left: calc(8px + env(safe-area-inset-left, 0px));
    right: auto;
}

.quick-icons--right{
    right: calc(8px + env(safe-area-inset-right, 0px));
    left: auto;
}

.quick-icons.is-middle{
    top: 50%;
    transform: translateY(-50%);
}

.resource-badge{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:6px;
}

.coins-badge{
    position: relative;
    height: 46px;
    min-width: 120px; 
    max-width: 100%; 
    border-radius: 18px;

    background: linear-gradient(180deg,
    rgba(14, 8, 67, 0.62),
    rgba(10, 6, 40, 0.28)
    );
    border: 1px solid rgba(148,163,184,0.14);
    box-shadow:
            0 16px 30px rgba(0,0,0,0.32),
            inset 0 1px 0 rgba(255,255,255,0.06);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden;
}

.coins-badge::after{
    content:"";
    position:absolute;
    left:18px;
    right:18px;
    bottom:3px;
    height:2px;
    border-radius:999px;
    background: linear-gradient(90deg,
    rgba(250,204,21,0),
    rgba(250,204,21,.55),
    rgba(45,212,191,.35),
    rgba(250,204,21,0)
    );
    opacity:.9;
    pointer-events:none;
}

.coins-badge .coins-value{
    position:absolute;
    left:50%;
    top:50%;
    transform:translate(-50%,-50%);
    white-space:nowrap;
    font-variant-numeric: tabular-nums;
    font-weight: 950;
    font-size: clamp(16px, 4.5vw, 22px); 
    line-height: 1;
    color: rgba(255,255,255,.95);
    text-shadow:
            0 2px 10px rgba(0,0,0,.55),
            0 0 14px rgba(250,204,21,.10);
    max-width: calc(100% - 60px); 
    overflow: hidden;
    text-overflow: ellipsis;
}

.coins-badge .coins-icon{
    position:absolute;
    top:50%;
    transform: translate(-50%,-50%);
    width: 38px;
    height: 38px;
    display:flex;
    align-items:center;
    justify-content:center;
    pointer-events:none;
}
.coins-badge .coins-icon img{
    width: 30px;
    height: 30px;
    object-fit: contain;
    display:block;
    filter:
            drop-shadow(0 10px 14px rgba(0,0,0,.40))
            drop-shadow(0 0 18px rgba(250,204,21,.18));
}

@media (max-width:380px){
    .coins-badge{
        height:44px;
        min-width: 100px; 
    }
    .coins-badge .coins-value{
        font-size: clamp(14px, 4vw, 20px); 
    }
    .coins-badge .coins-icon{ width:34px; height:34px; }
    .coins-badge .coins-icon img{ width:26px; height:26px; }

    .res-pill{
        --badge: 22px;
        height: 28px;
        padding-left: calc(var(--badge) + 6px);
        padding-right: 8px;
    }
    .res-value{
        font-size: clamp(9px, 2.2vw, 12px);
    }
    .res-icon{
        width: 14px;
        height: 14px;
    }
}

.win-amount-section{
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.12) 0%, rgba(250, 204, 21, 0.06) 100%);
    border: 1.5px solid rgba(250, 204, 21, 0.4);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-lg);
    margin-bottom: var(--space-md);
    box-shadow:
            0 0 20px rgba(250, 204, 21, 0.15),
            inset 0 0 20px rgba(250, 204, 21, 0.05);
    position: relative;
    overflow: hidden;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.win-amount-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
    transparent 0%,
    rgba(250, 204, 21, 0.6) 50%,
    transparent 100%);
    animation: win-shimmer 2s ease-in-out infinite;
}

@keyframes win-shimmer {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

#win-amount,
#boss-battle-win-amount{
    font-size: 20px;
    font-weight: 800;
    color: var(--text-muted);
    text-shadow: none;
    min-height: 28px;
    text-align: center;
    line-height: 1.2;
    transition: all var(--transition-base);
}

#win-amount.has-win,
#boss-battle-win-amount.has-win {
    animation: win-pulse 0.6s ease-out;
    color: var(--gold);
    text-shadow:
            0 0 10px rgba(250, 204, 21, 0.8),
            0 0 20px rgba(250, 204, 21, 0.4),
            0 2px 4px rgba(0, 0, 0, 0.5);
}

#win-amount:empty,
#boss-battle-win-amount:empty,
#win-amount:not(.has-win),
#boss-battle-win-amount:not(.has-win) {
    color: var(--text-muted);
}

@keyframes win-pulse {
    0% { transform: scale(0.9); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

#win-amount.win-tick{
    animation: win-line-tick 0.35s ease-out;
}

@keyframes win-line-tick {
    0% { transform: translateX(-50%) scale(1); }
    40% { transform: translateX(-50%) scale(1.12); }
    100% { transform: translateX(-50%) scale(1); }
}

.slots-wrapper{
    position:relative;
    margin-top:6px;
}

.slots-clip{
    position:relative;
    height:210px;
    overflow:hidden;
}

.slots{
    position:relative;
    display:flex;
    gap:6px;
    justify-content:center;
    z-index:2;
}

.reel{
    width:64px;
    height:210px;
    background: radial-gradient(circle at top, #020617, #020617);
    border-radius:9px;
    overflow:hidden;
    position:relative;
    border:1px solid rgba(30,64,175,0.85);

}

.reel-inner{
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:auto;
    display:flex;
    flex-direction:column;
    will-change:transform;
    transform:translate3d(0, 0, 0);
}

.reel.is-spinning{
    box-shadow: inset 0 0 20px rgba(99,102,241,.18);
}

.reel.is-spinning::after{
    content:"";
    position:absolute;
    inset:0;
    z-index:8;
    pointer-events:none;
    border-radius:inherit;
    background: linear-gradient(
            180deg,
            rgba(0,0,0,.5) 0%,
            transparent 12%,
            transparent 88%,
            rgba(0,0,0,.5) 100%
    );
}

.reel.reel-landed{
    box-shadow: inset 0 0 16px rgba(250,204,21,.25);
}

.cell{
    width:64px;
    height:70px;
    display:flex;
    justify-content:center;
    align-items:center;
    font-size:0;
    position:relative;
    overflow:hidden;
}

.cell-icon{
    width:42px;
    height:42px;
    object-fit:contain;
    display:block;
}

.cell.cell--has-mods{
    box-sizing: border-box;
    padding-bottom: 11px;
}

.cell.cell--has-mods-multi{
    padding-bottom: 23px;
}

.cell-mod-strip{
    position: absolute;
    left: 1px;
    right: 1px;
    bottom: 1px;
    z-index: 4;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: flex-end;
    gap: 1px;
    overflow: visible;
    pointer-events: none;
}

.cell-mod-strip--multi{
    flex-direction: column-reverse;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 2px;
}

.cell-mod-tag{
    display: inline-flex;
    align-items: center;
    gap: 1px;
    flex: 0 0 auto;
    max-width: 100%;
    padding: 0 3px 0 4px;
    border-radius: 4px;
    font-size: 7px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
    background: rgba(15,23,42,.9);
    border: 1px solid rgba(255,255,255,.14);
    box-shadow: 0 1px 3px rgba(0,0,0,.4);
    white-space: nowrap;
}

.cell-mod-tag--ticket{ color: #86efac; border-color: rgba(74,222,128,.35); }
.cell-mod-tag--coin{ color: #fde68a; border-color: rgba(250,204,21,.35); }
.cell-mod-tag--star{ color: #7dd3fc; border-color: rgba(56,189,248,.35); }
.cell-mod-tag--misc{ color: #e2e8f0; border-color: rgba(148,163,184,.3); }

.cell-mod-tag__val{
    letter-spacing: -.03em;
}

.cell-mod-tag__ic{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cell-mod-tag .ui-res-ic--cell{
    width: 8px;
    height: 8px;
}

.cell-mod-ic-emoji{
    font-size: 7px;
    line-height: 1;
}

.mod-badge{
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

#linesCanvas{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    pointer-events:none;
    z-index:10;
}

.cell.highlight{
    box-shadow:
            0 0 0 2px rgba(250,204,21,0.95),
            0 0 18px rgba(250,204,21,0.55),
            inset 0 0 12px rgba(250,204,21,0.25);
    background: rgba(250,204,21,0.12);
    border-radius: 8px;
}

.cell.shake{
    animation: cellWinShake 0.4s ease-in-out;
}

@keyframes cellWinShake{
    0%, 100%{ transform: translateX(0); }
    25%{ transform: translateX(-2px); }
    75%{ transform: translateX(2px); }
}

@media (max-width:400px){
    .slots-clip{ height:192px; }
    .reel{ width:58px; height:192px; }
    .cell{ width:58px; height:64px; }
    .cell-icon{ width:36px; height:36px; }

    .win-amount-section {
        padding: var(--space-sm) var(--space-md);
        margin-bottom: var(--space-sm);
        min-height: 40px;
    }

    #win-amount,
    #boss-battle-win-amount {
        font-size: 18px;
    }
}

.chest-panel{
    margin-top: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
}

.bonus-panel .chest-panel{
    position: relative;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
    transition:
        background .35s ease,
        border-color .35s ease,
        box-shadow .35s ease,
        transform .25s ease;
}

.chest-panel-ambient{
    position: absolute;
    inset: -30% -10%;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity .45s ease;
}

.chest-panel.is-farming .chest-panel-ambient{
    opacity: 1;
    background:
        radial-gradient(ellipse 70% 90% at 15% 50%, rgba(99,102,241,.22), transparent 65%),
        radial-gradient(ellipse 50% 80% at 85% 50%, rgba(34,211,238,.12), transparent 60%);
    animation: chestAmbientPulse 3.2s ease-in-out infinite;
}

.chest-panel.is-ready .chest-panel-ambient,
.chest-panel.is-complete .chest-panel-ambient{
    opacity: 1;
    background:
        radial-gradient(ellipse 80% 100% at 75% 40%, rgba(250,204,21,.24), transparent 62%),
        radial-gradient(ellipse 55% 80% at 20% 60%, rgba(74,222,128,.14), transparent 58%);
    animation: chestAmbientPulse 1.6s ease-in-out infinite;
}

.chest-panel.is-progress-bump #chest-progress-fill{
    animation: chestProgressBump .48s cubic-bezier(.34,1.35,.64,1);
}

.chest-panel.is-just-ready{
    animation: chestReadyFlash 1s ease-out;
}

.chest-panel.is-just-ready .chest-farm-pct{
    animation: chestPctPop .65s cubic-bezier(.34,1.4,.64,1);
}

@keyframes chestAmbientPulse{
    0%, 100% { opacity: .55; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.04); }
}

@keyframes chestProgressBump{
    0% { filter: brightness(1); }
    35% { filter: brightness(1.35); box-shadow: 0 0 22px rgba(34,211,238,.75); }
    100% { filter: brightness(1); }
}

@keyframes chestReadyFlash{
    0% { box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 0 0 rgba(250,204,21,0); }
    35% { box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 0 28px rgba(250,204,21,.5); }
    100% { box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 20px rgba(250,204,21,.12); }
}

.chest-panel.is-idle{
    background: rgba(15,23,42,.55);
    border: 1px dashed rgba(148,163,184,.22);
    box-shadow: none;
}

.chest-panel.is-idle .chest-farm-icon-ring,
.chest-panel.is-idle .chest-farm-icon-pulse{
    opacity: 0 !important;
    animation: none !important;
}

.chest-panel.is-idle .chest-farm-icon-btn{
    background: rgba(30,41,59,.65);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

.chest-panel.is-idle .chest-farm-icon-btn .pick-plus{
    animation: chestIdlePlusPulse 2.4s ease-in-out infinite;
}

.chest-panel.is-idle .chest-farm-icon-btn .pick-plus::before,
.chest-panel.is-idle .chest-farm-icon-btn .pick-plus::after{
    background: rgba(253,224,71,.9);
}

.chest-panel.is-idle .chest-progress-track-bg{
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(15,23,42,.96), rgba(24,32,48,.88));
    animation: none;
}

.chest-panel.is-idle .chest-status{
    color: rgba(148,163,184,.9);
}

.chest-panel.is-idle .chest-farm-sub{
    color: rgba(148,163,184,.55);
}

.chest-panel.is-idle .chest-farm-pct{
    color: rgba(148,163,184,.4);
    border-color: rgba(148,163,184,.15);
    background: rgba(2,6,23,.35);
}

.chest-panel.is-idle .chest-progress-bar{
    border-color: rgba(148,163,184,.12);
    background: rgba(2,6,23,.4);
}

.chest-panel.is-idle #chest-progress-fill{
    width: 0 !important;
    opacity: 0;
    box-shadow: none;
}

.chest-panel.is-idle .chest-progress-idle-msg{
    opacity: 0;
    visibility: hidden;
}

.chest-panel.is-idle .chest-progress-bar{
    animation: chestBarIdleBreath 3.2s ease-in-out infinite;
}

@keyframes chestBarIdleBreath{
    0%, 100% { border-color: rgba(148,163,184,.12); }
    50% { border-color: rgba(148,163,184,.22); }
}

@keyframes chestIdlePlusPulse{
    0%, 100% { opacity: .7; filter: drop-shadow(0 0 0 transparent); }
    50% { opacity: 1; filter: drop-shadow(0 0 6px rgba(253,224,71,.45)); }
}

.chest-panel.is-idle .chest-farm-chip{
    color: rgba(148,163,184,.45);
    border-color: rgba(148,163,184,.12);
}

.chest-panel.is-idle .chest-progress-frac{
    color: rgba(148,163,184,.35);
}

.chest-panel.is-farming{
    background:
            radial-gradient(100% 80% at 0% 0%, rgba(99,102,241,.14), transparent 55%),
            linear-gradient(165deg, rgba(15,23,42,.92), rgba(30,27,75,.82));
    border: 1px solid rgba(99,102,241,.28);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}

.chest-panel.is-farming .chest-farm-icon-ring{
    opacity: .65;
    animation: chestFarmRing 5s linear infinite;
}

.chest-panel.is-farming .chest-farm-icon-pulse{
    animation: chestFarmPulse 2.2s ease-out infinite;
}

.chest-panel.is-farming .chest-progress-idle-msg{
    opacity: 0;
    pointer-events: none;
}

.chest-panel.is-farming #chest-progress-fill{
    opacity: 1;
    overflow: hidden;
    background-size: 100% 100%;
    animation: chestFillBreathe 2.4s ease-in-out infinite;
}

.chest-panel.is-farming #chest-progress-fill::after{
    opacity: 1;
}

.chest-panel.is-farming .pick-chest-img{
    animation: chestIconBob 2.6s ease-in-out infinite;
}

.chest-panel.is-farming .chest-farm-pct{
    animation: chestPctTick 3s ease-in-out infinite;
}

.chest-panel.is-farming .chest-farm-chip{
    color: #a5b4fc;
    border-color: rgba(99,102,241,.35);
    background: rgba(99,102,241,.12);
}

.chest-panel.is-farming .chest-farm-pct{
    color: #c7d2fe;
    border-color: rgba(99,102,241,.35);
}

.chest-panel.is-ready,
.chest-panel.is-complete{
    background:
            radial-gradient(90% 70% at 100% 0%, rgba(250,204,21,.12), transparent 50%),
            linear-gradient(165deg, rgba(20,30,20,.95), rgba(30,27,20,.88));
    border: 1px solid rgba(250,204,21,.4);
    box-shadow:
            inset 0 1px 0 rgba(255,255,255,.08),
            0 0 20px rgba(250,204,21,.1);
}

.chest-panel.is-ready .chest-farm-icon-ring,
.chest-panel.is-complete .chest-farm-icon-ring{
    opacity: .9;
    background: conic-gradient(from 0deg, #fbbf24, #4ade80, #fbbf24, #4ade80);
    animation: chestFarmRing 3s linear infinite;
}

.chest-panel.is-ready .chest-farm-icon-pulse,
.chest-panel.is-complete .chest-farm-icon-pulse{
    animation: chestFarmPulse 1.4s ease-out infinite;
    border-color: rgba(250,204,21,.5);
}

.chest-panel.is-ready .chest-status,
.chest-panel.is-complete .chest-status{
    color: #fde68a;
}

.chest-panel.is-ready .chest-farm-sub,
.chest-panel.is-complete .chest-farm-sub{
    color: rgba(134,239,172,.85);
}

.chest-panel.is-ready .chest-farm-pct,
.chest-panel.is-complete .chest-farm-pct{
    color: #4ade80;
    border-color: rgba(74,222,128,.45);
    background: rgba(34,197,94,.15);
    animation: chestPctPop .7s ease;
}

.chest-panel.is-ready #chest-progress-fill,
.chest-panel.is-complete #chest-progress-fill{
    background: linear-gradient(90deg, #ca8a04, #fbbf24, #4ade80);
    background-size: 100% 100%;
    animation: chestReadyFillPulse 1.8s ease-in-out infinite;
    box-shadow: 0 0 14px rgba(250,204,21,.45);
}

.chest-panel.is-ready #chest-progress-fill::after,
.chest-panel.is-complete #chest-progress-fill::after{
    opacity: .55;
    background: rgba(255,255,255,.35);
    box-shadow: none;
}

.chest-panel.is-ready .pick-chest-img,
.chest-panel.is-complete .pick-chest-img{
    animation: chestIconReadyPop .85s cubic-bezier(.34,1.4,.64,1);
}

.chest-panel.is-ready .chest-farm-chip,
.chest-panel.is-complete .chest-farm-chip{
    color: #86efac;
    border-color: rgba(74,222,128,.45);
    background: rgba(34,197,94,.18);
    box-shadow: 0 0 10px rgba(34,197,94,.2);
}

.chest-panel.is-ready .chest-progress-idle-msg{
    opacity: 0;
}

@keyframes chestPctPop{
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes chestFillGlow{
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.12); }
}

@keyframes chestFillBreathe{
    0%, 100% {
        filter: brightness(1);
        box-shadow: 0 0 8px rgba(34,211,238,.28);
    }
    50% {
        filter: brightness(1.06);
        box-shadow: 0 0 14px rgba(34,211,238,.48);
    }
}

@keyframes chestReadyFillPulse{
    0%, 100% {
        filter: brightness(1);
        box-shadow: 0 0 12px rgba(250,204,21,.4);
    }
    50% {
        filter: brightness(1.08);
        box-shadow: 0 0 20px rgba(250,204,21,.62);
    }
}

@keyframes chestIconBob{
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

@keyframes chestIconReadyPop{
    0% { transform: scale(.88); filter: brightness(.9); }
    60% { transform: scale(1.08); filter: brightness(1.15); }
    100% { transform: scale(1); filter: brightness(1); }
}

@keyframes chestPctTick{
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

@keyframes chestFarmRing{
    to { transform: rotate(360deg); }
}

@keyframes chestFarmPulse{
    0% { opacity: .65; transform: scale(.94); }
    100% { opacity: 0; transform: scale(1.12); }
}

.chest-farm-icon-btn{
    position: relative;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 12px;
    display: grid;
    place-items: center;
    cursor: pointer;
    padding: 0;
    background: linear-gradient(145deg, rgba(30,27,75,.9), rgba(15,23,42,.95));
    box-shadow: 0 6px 16px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.08);
    -webkit-tap-highlight-color: transparent;
    overflow: visible;
}

.chest-farm-icon-ring{
    position: absolute;
    inset: -2px;
    border-radius: 14px;
    background: conic-gradient(from 200deg, #6366f1, #22d3ee, #a855f7, #6366f1);
    opacity: 0;
    z-index: 0;
}

.chest-farm-icon-pulse{
    position: absolute;
    inset: -4px;
    border-radius: 16px;
    border: 2px solid rgba(34,211,238,.3);
    opacity: 0;
    z-index: 0;
}

.chest-farm-icon-btn .pick-plus,
.chest-farm-icon-btn .pick-emoji{
    position: relative;
    z-index: 1;
}

.chest-farm-icon-btn .pick-plus{
    position: relative;
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    font-size: 0;
    line-height: 0;
    color: transparent;
}

.chest-farm-icon-btn .pick-plus::before,
.chest-farm-icon-btn .pick-plus::after{
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    background: #fde68a;
    border-radius: 1px;
    transform: translate(-50%, -50%);
}

.chest-farm-icon-btn .pick-plus::before{
    width: 16px;
    height: 2.5px;
}

.chest-farm-icon-btn .pick-plus::after{
    width: 2.5px;
    height: 16px;
}

.chest-farm-icon-btn .pick-emoji{
    display: none;
    font-size: 22px;
    line-height: 1;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,.45));
}

.chest-farm-icon-btn .pick-emoji .pick-chest-img{
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,.45));
}

.chest-farm-icon-btn.is-selected .pick-plus{ display: none; }
.chest-farm-icon-btn.is-selected .pick-emoji{ display: block; }
.chest-farm-icon-btn.is-empty .pick-plus{ display: block; }
.chest-farm-icon-btn.is-empty .pick-emoji{ display: none; }
.chest-farm-icon-btn:active{ transform: scale(.96); }

.chest-farm-info{
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    justify-content: center;
}

.chest-farm-top{
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 6px;
    min-width: 0;
}

.chest-farm-titles{
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chest-status{
    display: block;
    font-size: 11px;
    font-weight: 900;
    color: #f1f5f9;
    line-height: 1.25;
    min-width: 0;
    white-space: normal;
    word-break: break-word;
}

.chest-farm-sub{
    font-size: 9px;
    font-weight: 700;
    color: rgba(203,213,225,.55);
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chest-farm-pct{
    flex: 0 0 auto;
    min-width: 32px;
    text-align: center;
    font-size: 10px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    color: #a5b4fc;
    padding: 3px 7px;
    border-radius: 8px;
    background: rgba(2,6,23,.5);
    border: 1px solid rgba(99,102,241,.28);
}

.chest-progress-bar{
    position: relative;
    height: 12px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(99,102,241,.2);
    box-shadow: inset 0 2px 5px rgba(0,0,0,.4);
}

.chest-progress-track-bg{
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(15,23,42,.95), rgba(30,27,75,.8));
}

.chest-progress-idle-msg{
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    opacity: 0;
    transition: opacity .2s ease;
    pointer-events: none;
}

.chest-progress-idle-text{
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(148,163,184,.45);
}

.chest-progress-idle-dash{
    width: 24px;
    height: 1px;
    background: rgba(148,163,184,.25);
}

#chest-progress-fill{
    position: relative;
    z-index: 1;
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, #6366f1, #22d3ee, #4ade80);
    box-shadow: 0 0 10px rgba(34,211,238,.32);
    transition: width .5s cubic-bezier(.22,1,.36,1);
    overflow: hidden;
}

#chest-progress-fill::after{
    content: "";
    position: absolute;
    top: 1px;
    right: 0;
    width: 4px;
    height: calc(100% - 2px);
    border-radius: 18px;
    background: rgba(255,255,255,.72);
    box-shadow: 0 0 10px rgba(255,255,255,.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}

.chest-farm-meta{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-width: 0;
}

.chest-progress-frac{
    font-size: 9px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: rgba(203,213,225,.7);
}

.chest-farm-chip{
    flex-shrink: 0;
    font-size: 8px;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 18px;
    background: rgba(2,6,23,.45);
    border: 1px solid rgba(148,163,184,.14);
    color: rgba(226,232,240,.65);
    letter-spacing: .04em;
    text-transform: uppercase;
}

.chest-panel.is-farming[data-rarity="rare"] .chest-farm-icon-ring,
.chest-panel.is-ready[data-rarity="rare"] .chest-farm-icon-ring{
    background: conic-gradient(from 200deg, #3b82f6, #60a5fa, #818cf8, #3b82f6);
}
.chest-panel.is-farming[data-rarity="epic"] .chest-farm-icon-ring,
.chest-panel.is-ready[data-rarity="epic"] .chest-farm-icon-ring{
    background: conic-gradient(from 200deg, #a855f7, #ec4899, #c084fc, #a855f7);
}
.chest-panel.is-farming[data-rarity="legendary"] .chest-farm-icon-ring,
.chest-panel.is-ready[data-rarity="legendary"] .chest-farm-icon-ring{
    background: conic-gradient(from 200deg, #fbbf24, #f59e0b, #fde68a, #fbbf24);
}

.chest-panel.is-farming[data-rarity="common"] #chest-progress-fill{
    background: linear-gradient(90deg, #64748b, #94a3b8, #22d3ee);
}
.chest-panel.is-farming[data-rarity="rare"] #chest-progress-fill{
    background: linear-gradient(90deg, #3b82f6, #60a5fa, #4ade80);
}
.chest-panel.is-farming[data-rarity="epic"] #chest-progress-fill{
    background: linear-gradient(90deg, #a855f7, #ec4899, #4ade80);
}
.chest-panel.is-farming[data-rarity="mythic"] #chest-progress-fill{
    background: linear-gradient(90deg, #f472b6, #e879f9, #4ade80);
}
.chest-panel.is-farming[data-rarity="legendary"] #chest-progress-fill{
    background: linear-gradient(90deg, #f59e0b, #fbbf24, #4ade80);
}

.chest-panel.is-farming[data-rarity="mythic"] .chest-farm-icon-ring,
.chest-panel.is-ready[data-rarity="mythic"] .chest-farm-icon-ring{
    background: conic-gradient(from 200deg, #f472b6, #e879f9, #fb7185, #f472b6);
}

.chest-farm-repeat-btn,
.chest-farm-queue-btn{
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 16px;
    line-height: 1;
    border-radius: 10px;
    border: 1px solid rgba(148,163,184,.18);
    background: rgba(2,6,23,.55);
    color: rgba(203,213,225,.85);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: border-color .15s, background .15s, color .15s, box-shadow .15s;
}

.chest-farm-repeat-btn.is-on{
    border-color: rgba(74,222,128,.45);
    background: rgba(74,222,128,.12);
    color: #86efac;
    box-shadow: 0 0 12px rgba(74,222,128,.2);
    animation: chestRepeatGlow 2.4s ease-in-out infinite;
}

@keyframes chestRepeatGlow{
    0%, 100% { box-shadow: 0 0 8px rgba(74,222,128,.15); }
    50% { box-shadow: 0 0 18px rgba(74,222,128,.38); }
}

.chest-panel.is-idle .chest-farm-repeat-btn,
.chest-panel.is-idle .chest-farm-queue-btn{
    opacity: .55;
}

.chest-farm-repeat-btn:active,
.chest-farm-queue-btn:active{
    transform: scale(.94);
}
