@font-face {
  font-family: 'Cinzel';
  src: url('/assets/fonts/Cinzel_Decorative/CinzelDecorative-Regular.ttf') format('truetype');
}



html{
    background-image: url('/assets/background_index.png');
    min-height: 100%;
}

*{
    box-sizing: border-box;
}

header{
    background-color: grey;
    margin: 0;
    padding: 0;
}
#body_index{
    /*background-image: url("assets/background_index.png");*/
    background-color: rgb(35, 89, 102);
    background-repeat: no-repeat;
    width: min(100%, 1120px);
    margin: 0 auto;
    padding: 0;
    border: 5px solid rgb(19, 53, 61);
    box-sizing: border-box;
    min-height: 100vh;
    overflow-x: hidden;

}

h1{
    margin: 0;
    padding-top: 10px;
    text-align: center;
    font-family: 'Cinzel';
    font-size: 42px;
    white-space: nowrap;
}

h1 a{
    color: inherit;
    text-decoration: none;
}

header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 0 24px;
    background-color: rgba(68, 96, 112, 0.72);
}

.header-main{
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.nav-tab{
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 9px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #eef2f6;
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 700;
    background-color: rgba(255, 255, 255, 0.08);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.nav-tab:hover,
.nav-tab.active{
    transform: translateY(-1px);
    background-color: rgba(255, 255, 255, 0.16);
}

.header-actions{
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.coins-display{
    min-width: 110px;
    padding: 9px 14px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 10px;
    background-color: rgba(255, 204, 84, 0.16);
    color: #fff2b8;
    font-weight: 700;
    text-align: center;
}

.account-btn,
#accountNavBtn{
    border: none;
    border-radius: 999px;
    padding: 10px 18px;
    background-color: rgb(54, 114, 255);
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.account-btn:hover,
#accountNavBtn:hover{
    transform: translateY(-1px);
    background-color: rgb(38, 90, 255);
}

.account-page{
    display: flex;
    justify-content: center;
    padding: 60px 16px;
    min-height: calc(100vh - 120px);
}

.auth-card{
    width: min(520px, 100%);
    padding: 28px;
    border-radius: 28px;
    border: 2px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.16);
}

.information-page{
    padding: 46px 20px 64px;
}

.information-panel{
    max-width: 980px;
    margin: 0 auto;
    color: #eef2f6;
}

.information-panel h2{
    margin: 0 0 22px;
    font-size: 2rem;
}

.information-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.information-grid article{
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.07);
}

.information-grid h3{
    margin: 0 0 10px;
    color: #fff2b8;
}

.information-grid p{
    margin: 0;
    line-height: 1.55;
}

.auth-header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.auth-switches{
    display: flex;
    gap: 10px;
}

.auth-switch{
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: #f5f7fb;
    padding: 10px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.auth-switch.active,
.auth-switch:hover{
    background-color: rgba(255, 255, 255, 0.14);
}

.auth-form {
    display: flex;
    flex-direction: column;
}

.auth-form.hidden,
.hidden{
    display: none !important;
}

.auth-form label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    color: #e8eef5;
    font-size: 0.95rem;
}

.auth-form input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: white;
}

.auth-message {
    margin-bottom: 16px;
    min-height: 22px;
    font-size: 0.95rem;
}

.primary-button,
.secondary-button,
.google-button {
    border: none;
    border-radius: 999px;
    padding: 12px 18px;
    cursor: pointer;
    font-weight: 700;
    margin-top: 4px;
}

.primary-button {
    background-color: rgb(92, 203, 118);
    color: white;
}

.secondary-button {
    background-color: rgba(255, 255, 255, 0.12);
    color: #eef2f6;
}

.google-button {
    width: 100%;
    text-align: center;
    background-color: rgb(66, 133, 244);
    color: white;
}

.auth-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 18px 0;
    color: rgba(255, 255, 255, 0.7);
}

.auth-divider span {
    padding: 0 14px;
    background: rgba(35, 89, 102, 0.95);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
}

.auth-info {
    margin-top: 20px;
    color: #eef2f6;
}

.account-stats{
    margin: 20px 0;
}

.account-stats h3{
    margin: 0 0 12px;
    color: #ffffff;
}

.account-stat-grid,
.account-rarity-stats{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.account-rarity-stats{
    margin-top: 10px;
}

.account-stat-grid div,
.account-rarity-stats div{
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.08);
}

.account-stat-grid span,
.account-rarity-stats > div > span{
    display: block;
    color: #cfe0e8;
    font-size: 0.82rem;
}

.account-stat-grid strong,
.account-rarity-stats strong{
    display: block;
    margin-top: 4px;
    color: #fff2b8;
}

.admin-page{
    padding: 56px 20px;
}

.admin-panel{
    max-width: 760px;
    margin: 0 auto;
    padding: 28px;
    border: 2px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #eef2f6;
}

.admin-panel h2{
    margin: 0 0 20px;
}

.admin-stats{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
}

.admin-stats div{
    padding: 16px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.08);
}

.admin-stats strong,
.admin-stats span{
    display: block;
}

.admin-stats strong{
    font-size: 1.4rem;
}

.admin-console{
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-top: 22px;
}

.admin-console label{
    grid-column: 1 / -1;
    font-weight: 900;
    color: #fff2b8;
}

.admin-console input{
    min-width: 0;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background-color: rgba(10, 18, 24, 0.45);
    color: white;
    font-family: Consolas, monospace;
}

.admin-command-help{
    margin: 18px 0;
    padding: 16px;
    border: 1px solid rgba(255, 242, 184, 0.28);
    border-radius: 8px;
    background-color: rgba(10, 18, 24, 0.28);
}

.admin-command-help h3{
    margin: 0;
    color: #fff2b8;
}

.admin-command-help-header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.admin-command-help.collapsed .admin-command-help-header{
    margin-bottom: 0;
}

.admin-command-help-header .secondary-button{
    padding: 8px 12px;
    font-size: 0.82rem;
}

.admin-command-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.admin-command-grid article{
    padding: 11px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.08);
}

.admin-command-grid code,
.admin-command-grid span{
    display: block;
}

.admin-command-grid code{
    color: #d2f3c4;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.admin-command-grid span{
    margin-top: 5px;
    color: #cfe0e8;
    font-size: 0.82rem;
}

#showCardCreatorBtn,
#showCardEditorBtn{
    margin-top: 18px;
}

#deleteCardsPageBtn{
    margin-top: 18px;
    margin-left: 10px;
}

.card-creator{
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.card-creator label{
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: #eef2f6;
    font-weight: 800;
}

.card-creator input,
.card-creator select,
.card-creator textarea{
    width: 100%;
    padding: 11px 13px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background-color: rgba(10, 18, 24, 0.45);
    color: white;
}

.card-creator textarea{
    resize: vertical;
}

.admin-page-title{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.admin-page-title h2{
    margin: 0;
}

.admin-search{
    display: grid;
    gap: 8px;
    color: #eef2f6;
    font-weight: 800;
}

.admin-search input{
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background-color: rgba(10, 18, 24, 0.45);
    color: white;
}

.admin-cards{
    margin-top: 24px;
}

.admin-cards h3{
    margin: 0 0 12px;
    color: #fff2b8;
}

.admin-cards-list{
    display: grid;
    gap: 10px;
}

.admin-card-row{
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.07);
}

.admin-card-info{
    display: grid;
    gap: 4px;
    min-width: 0;
}

.admin-card-info strong,
.admin-card-info span{
    overflow-wrap: anywhere;
}

.admin-card-info span{
    color: #d9e5ee;
    font-size: 0.92rem;
}

.danger-button{
    border: 0;
    border-radius: 8px;
    padding: 10px 14px;
    background-color: #b93535;
    color: white;
    font-weight: 900;
    cursor: pointer;
}

.danger-button:hover{
    background-color: #d34343;
}

.admin-empty{
    margin: 0;
    color: #d9e5ee;
}

.inventory-page{
    padding: 44px 20px 60px;
}

.inventory-panel{
    max-width: 980px;
    margin: 0 auto;
    color: #eef2f6;
}

.inventory-panel h2{
    margin: 0 0 22px;
    font-size: 2rem;
}

.inventory-message{
    min-height: 24px;
    margin-bottom: 16px;
    color: #ffdf9a;
}

.inventory-tabs{
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.inventory-tab{
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    padding: 9px 14px;
    background-color: rgba(255, 255, 255, 0.08);
    color: #eef2f6;
    font-weight: 800;
    cursor: pointer;
}

.inventory-tab.active{
    background-color: rgba(92, 203, 118, 0.35);
}

.inventory-rarity-summary{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.inventory-rarity-summary div{
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.08);
}

.inventory-rarity-summary span,
.inventory-rarity-summary strong{
    display: block;
}

.inventory-rarity-summary span{
    color: #cfe0e8;
    font-size: 0.78rem;
}

.inventory-rarity-summary strong{
    color: #fff2b8;
    font-size: 1.1rem;
}

.empty-unique-message{
    grid-column: 1 / -1;
    text-align: center;
    color: #d6e2ec;
}

.inventory-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(128px, 150px));
    gap: 14px;
    justify-content: center;
}

.inventory-slot{
    position: relative;
    padding: 8px;
    border: 2px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.07);
}

.inventory-slot.empty{
    opacity: 0.48;
}

.inventory-card-frame{
    aspect-ratio: 2 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
    background-color: rgba(10, 18, 24, 0.45);
}

.inventory-card-frame img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.inventory-slot.empty .inventory-card-frame img{
    filter: grayscale(1);
}

.inventory-card-info{
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 7px;
}

.inventory-card-info strong{
    color: #ffffff;
    font-size: 0.82rem;
}

.inventory-card-info span{
    color: #cfe0e8;
    font-size: 0.76rem;
}

.inventory-count{
    margin-top: 7px;
    padding: 5px 8px;
    border-radius: 8px;
    background-color: rgba(255, 204, 84, 0.16);
    color: #fff2b8;
    font-weight: 800;
    font-size: 0.82rem;
    text-align: center;
}

.sell-card-button{
    width: 100%;
    margin-top: 7px;
    padding: 7px 8px;
    border: none;
    border-radius: 8px;
    background-color: rgb(92, 203, 118);
    color: white;
    font-weight: 800;
    font-size: 0.78rem;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.sell-card-button:hover:not(:disabled){
    transform: translateY(-1px);
    background-color: rgb(75, 178, 97);
}

.sell-card-button:disabled{
    opacity: 0.45;
    cursor: not-allowed;
}

.card-preview-overlay{
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background-color: rgba(0, 0, 0, 0.78);
    cursor: zoom-out;
}

.card-preview-overlay img{
    max-width: min(460px, 88vw);
    max-height: 88vh;
    border-radius: 12px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
}

@media (max-width: 860px) {
    #home-content{
        flex-direction: column;
        align-items: center;
        margin-top: 60px;
    }
    .account-page{
        padding-top: 30px;
    }
}

@media (max-width: 720px) {
    html{
        background-size: cover;
        background-attachment: fixed;
    }

    #body_index{
        width: 100%;
        margin: 0;
        border-width: 0;
        min-height: 100svh;
    }

    header{
        flex-direction: column;
        justify-content: center;
        padding: 10px 12px;
    }

    .header-main{
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    h1{
        flex-basis: 100%;
        padding-top: 0;
        font-size: clamp(1.65rem, 8vw, 2.2rem);
        line-height: 1.05;
    }

    .nav-tab{
        min-height: 34px;
        padding: 6px 8px;
        border-radius: 8px;
        font-size: 0.78rem;
    }

    .header-actions{
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    .coins-display{
        min-width: 0;
        padding: 8px 10px;
        font-size: 0.9rem;
    }

    .account-btn,
    #accountNavBtn{
        padding: 9px 14px;
    }

    #home-content{
        margin-top: 28px;
        padding: 0 10px 32px;
    }

    .pack-selector{
        display: grid;
        grid-template-columns: 42px minmax(0, 280px) 42px;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
    }

    .casino-shortcut{
        position: static;
        grid-column: 1 / -1;
        justify-self: center;
        flex-direction: row;
        margin-bottom: 4px;
    }

    .casino-shortcut img{
        width: 86px;
        height: 86px;
    }

    .casino-shortcut span{
        font-size: 1.35rem;
    }

    #previousPackBtn{
        grid-column: 1;
    }

    #Booster{
        grid-column: 2;
        width: 100%;
        max-width: 280px;
        padding: 16px;
        border-radius: 18px;
    }

    #nextPackBtn{
        grid-column: 3;
    }

    .pack-arrow{
        width: 42px;
        height: 58px;
        font-size: 1.9rem;
    }

    #statsToggle{
        position: static;
        align-self: flex-end;
        margin-bottom: 8px;
        padding: 7px 11px;
        font-size: 0.76rem;
    }

    .pack-name{
        margin-top: 6px;
    }

    #openBtn{
        width: 100%;
        padding: 12px 14px;
    }

    #booster-stats{
        width: 100%;
        padding: 16px;
        border-radius: 16px;
        overflow-x: auto;
    }

    #booster-stats th,
    #booster-stats td{
        padding: 9px 8px;
    }

    #pack-cards{
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        margin: 28px 10px;
        padding: 0;
    }

    .inventory-page,
    .information-page,
    .admin-page,
    .account-page,
    .casino-page,
    .leaderboard-page{
        padding: 24px 10px 44px;
    }

    .leaderboard-header{
        flex-direction: column;
        align-items: stretch;
    }

    .leaderboard-header label{
        min-width: 0;
    }

    .inventory-panel h2,
    .information-panel h2{
        font-size: 1.55rem;
    }

    .inventory-tabs{
        flex-wrap: wrap;
    }

    .inventory-grid{
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .auth-card,
    .admin-panel{
        width: 100%;
        padding: 18px;
        border-radius: 12px;
    }

    .auth-header,
    .admin-page-title{
        flex-direction: column;
        align-items: stretch;
    }

    .auth-header h2,
    .admin-panel h2{
        font-size: 1.35rem;
    }

    .auth-switches{
        display: grid;
        grid-template-columns: 1fr;
    }

    .admin-console,
    .admin-card-row{
        grid-template-columns: 1fr;
    }

    #deleteCardsPageBtn{
        margin-left: 0;
    }

    .information-grid{
        grid-template-columns: 1fr;
    }

    .casino-wheel-wrap{
        width: min(340px, 92vw);
        padding: 8px;
    }

    .casino-wheel text{
        font-size: 15px;
        stroke-width: 3px;
    }

    .casino-spin-button{
        width: min(100%, 280px);
        min-width: 0;
    }
}

@media (max-width: 380px) {
    .pack-selector{
        grid-template-columns: 34px minmax(0, 1fr) 34px;
    }

    .pack-arrow{
        width: 34px;
        height: 52px;
        font-size: 1.55rem;
    }

    .inventory-grid,
    #pack-cards{
        grid-template-columns: 1fr;
    }

    .casino-shortcut img{
        width: 72px;
        height: 72px;
    }

    .casino-shortcut span{
        font-size: 1.12rem;
    }
}

#Booster{
    width: 280px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.18);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

.casino-shortcut{
    position: absolute;
    top: -48px;
    right: -158px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #fff2b8;
    text-decoration: none;
    font-weight: 1000;
    z-index: 3;
}

.casino-shortcut img{
    width: 156px;
    height: 156px;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
    transition: transform 0.2s ease;
}

.casino-shortcut span{
    font-size: 1.92rem;
}

.casino-shortcut:hover img{
    transform: rotate(18deg) scale(1.06);
}

#home-content.casino-hidden .casino-shortcut{
    display: none;
}

.trade-shortcut{
    position: absolute;
    top: -40px;
    left: -152px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #dff8ff;
    text-decoration: none;
    font-weight: 1000;
    z-index: 3;
}

.trade-shortcut-icon{
    width: 126px;
    height: 126px;
    border: 4px solid rgba(205, 245, 255, 0.82);
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background-color: rgba(10, 18, 24, 0.45);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.34);
    transition: transform 0.2s ease;
}

.trade-shortcut span:last-child{
    font-size: 1.7rem;
}

.trade-shortcut:hover .trade-shortcut-icon{
    transform: rotate(-8deg) scale(1.05);
}

#home-content.casino-hidden .trade-shortcut{
    display: none;
}

.leaderboard-page{
    padding: 44px 20px 60px;
}

.leaderboard-panel{
    max-width: 920px;
    margin: 0 auto;
    color: #eef2f6;
}

.leaderboard-header{
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.leaderboard-header h2{
    margin: 0;
    font-size: 2rem;
}

.leaderboard-header label{
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 240px;
    color: #fff2b8;
    font-weight: 900;
}

.leaderboard-header select{
    padding: 11px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background-color: rgba(10, 18, 24, 0.72);
    color: #ffffff;
    font-weight: 800;
}

.leaderboard-table-wrap{
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.07);
}

.leaderboard-table{
    width: 100%;
    border-collapse: collapse;
    min-width: 520px;
}

.leaderboard-table th,
.leaderboard-table td{
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}

.leaderboard-table th{
    color: #fff2b8;
    font-size: 0.82rem;
    text-transform: uppercase;
}

.leaderboard-table tr:last-child td{
    border-bottom: 0;
}

.leaderboard-table td:first-child{
    width: 64px;
    font-weight: 1000;
    color: #ffffff;
}

.leaderboard-table td:last-child{
    font-weight: 1000;
    color: #d2f3c4;
}

.leaderboard-table .top-rank{
    background-color: rgba(255, 255, 255, 0.06);
}

.leaderboard-table .rank-1 td:first-child{
    color: #ffd95a;
}

.leaderboard-table .rank-2 td:first-child{
    color: #d9e4ec;
}

.leaderboard-table .rank-3 td:first-child{
    color: #f2b47d;
}

.pack-selector{
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
}

.pack-arrow{
    width: 44px;
    height: 72px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 2.3rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.pack-arrow:hover{
    transform: translateY(-1px);
    background-color: rgba(255, 255, 255, 0.18);
}

.pack-name{
    margin: 32px 0 10px;
    color: #ffffff;
    font-size: 1.1rem;
    text-align: center;
}

#Booster.gold-pack{
    border-color: rgba(255, 210, 91, 0.55);
}

#Booster.gold-pack::after{
    content: '';
    position: absolute;
    top: -30%;
    left: -60%;
    width: 42%;
    height: 160%;
    background: linear-gradient(90deg, transparent, rgba(255, 222, 116, 0.45), transparent);
    transform: rotate(18deg);
    animation: gold-shine 2.6s ease-in-out infinite;
    pointer-events: none;
}

#statsToggle{
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 8px 14px;
    border: none;
    border-radius: 999px;
    background-color: rgb(54, 114, 255);
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(20, 45, 145, 0.3);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

#statsToggle:hover{
    transform: translateY(-1px);
    background-color: rgb(38, 90, 255);
}

#home-content{
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    max-width: 1100px;
    margin: 100px auto 0;
    padding: 0 16px;
}

#booster-stats{
    display: none;
    width: min(360px, 100%);
    padding: 24px;
    border: 2px solid rgba(255, 255, 255, 0.18);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    color: #eef2f6;
}

#home-content.stats-open #booster-stats{
    display: block;
}

#booster-stats h2{
    margin: 0 0 18px;
    font-size: 1.4rem;
    color: #ffffff;
}

#booster-stats table{
    width: 100%;
    border-collapse: collapse;
    font-size: 0.98rem;
}

#booster-stats th,
#booster-stats td{
    padding: 11px 12px;
    text-align: left;
}

#booster-stats thead th{
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    font-weight: 700;
}

#booster-stats tbody tr{
    transition: background 0.2s ease;
}

#booster-stats tbody tr:hover{
    background: rgba(255, 255, 255, 0.08);
}

#booster-stats tbody td:first-child{
    font-weight: 600;
}

#booster-stats p{
    margin-top: 18px;
    line-height: 1.6;
    color: #d6e2ec;
}

@media (max-width: 860px) {
    #home-content{
        flex-direction: column;
        align-items: center;
        margin-top: 60px;
    }
}

#Booster-boster{
    width: 100%;
    height: auto;
    margin: 0 auto 14px auto;
    display: block;
    transition: transform 0.3s ease, filter 0.3s ease, box-shadow 0.3s ease;
}

#Booster{
    position: relative;
}

#Booster.glowing #Booster-boster{
    animation: booster-glow 3s ease-in-out forwards;
}

#Booster.gold-glowing #Booster-boster{
    animation: booster-gold-glow 3s ease-in-out forwards;
}

@keyframes gold-shine{
    0% {
        left: -60%;
    }
    55% {
        left: 120%;
    }
    100% {
        left: 120%;
    }
}

@keyframes booster-glow{
    0% {
        box-shadow: 0 0 0 rgba(255, 255, 200, 0);
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        box-shadow: 0 0 60px 22px rgba(255, 255, 200, 0.6);
        transform: scale(1.02);
        filter: brightness(1.25);
    }
    90% {
        box-shadow: 0 0 120px 45px rgba(255, 255, 200, 1);
        transform: scale(1.05);
        filter: brightness(1.5);
    }
    100% {
        box-shadow: 0 0 140px 50px rgba(255, 255, 200, 1);
        transform: scale(1.05);
        filter: brightness(1.6);
    }
}

@keyframes booster-gold-glow{
    0% {
        box-shadow: 0 0 0 rgba(255, 190, 40, 0);
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        box-shadow: 0 0 60px 22px rgba(255, 196, 54, 0.6);
        transform: scale(1.02);
        filter: brightness(1.25) saturate(1.15);
    }
    90% {
        box-shadow: 0 0 120px 45px rgba(255, 183, 28, 1);
        transform: scale(1.05);
        filter: brightness(1.55) saturate(1.25);
    }
    100% {
        box-shadow: 0 0 140px 50px rgba(255, 183, 28, 1);
        transform: scale(1.05);
        filter: brightness(1.65) saturate(1.3);
    }
}

body.animating {
    pointer-events: none;
    user-select: none;
    cursor: wait;
}

#openBtn{
    margin: 14px auto 0;
    padding: 14px 28px;
    border: none;
    border-radius: 999px;
    background-color: rgb(92, 203, 118);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.pack-quantity{
    display: grid;
    gap: 6px;
    width: min(160px, 100%);
    color: #eef2f6;
    font-size: 0.9rem;
    font-weight: 800;
    text-align: center;
}

.pack-quantity input{
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    background-color: rgba(10, 18, 24, 0.45);
    color: white;
    font-weight: 800;
    text-align: center;
}

#openBtn:hover{
    transform: translateY(-2px);
    background-color: rgb(75, 178, 97);
}

#openBtn:active{
    transform: translateY(1px);
}

#pack-cards{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 190px));
    gap: 20px;
    justify-content: center;
    margin: 40px auto;
    max-width: 1200px;
}

.pack-card{
    width: 100%;
    cursor: pointer;
}

.card-inner{
    position: relative;
}

.card-front{
    width: 100%;
    display: block;
    border: 4px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.25);
}

.card-back{
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background-color: rgba(20,20,30,0.95);
    background-size: cover;
    background-position: center;
    transition: opacity 0.7s ease;
    opacity: 1;
}

.card-back.revealed{
    opacity: 0;
    pointer-events: none;
}

#return-container{
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

#return-container button{
    background-color: rgb(37, 115, 159);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
}

#return-container button:hover{
    background-color: rgb(28, 92, 128);
}

.casino-page{
    padding: 48px 20px 70px;
}

.casino-panel{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    color: #eef2f6;
}

.casino-wheel-wrap{
    position: relative;
    width: min(430px, 82vw);
    aspect-ratio: 1;
    padding: 10px;
}

.casino-pointer{
    position: absolute;
    top: -10px;
    left: 50%;
    width: 0;
    height: 0;
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-top: 34px solid #f7c948;
    transform: translateX(-50%);
    z-index: 2;
}

.casino-wheel{
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 50%;
    transition: transform 3.2s cubic-bezier(0.12, 0.72, 0.12, 1);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.casino-wheel svg{
    width: 100%;
    height: 100%;
    display: block;
}

.casino-wheel text{
    color: #ffffff;
    fill: #ffffff;
    font-size: 19px;
    font-weight: 900;
    font-family: Arial, sans-serif;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.55);
    paint-order: stroke;
    stroke: rgba(0, 0, 0, 0.45);
    stroke-width: 4px;
    stroke-linejoin: round;
}

.casino-spin-button{
    min-width: 240px;
}

.casino-result{
    min-height: 28px;
    color: #fff2b8;
    font-weight: 900;
    text-align: center;
}

.trade-page{
    padding: 46px 20px 70px;
}

.trade-panel{
    max-width: 1040px;
    margin: 0 auto;
    color: #eef2f6;
}

.trade-title{
    margin-bottom: 20px;
}

.trade-title h2{
    margin: 0 0 8px;
    font-size: 2rem;
}

.trade-title p{
    margin: 0;
    color: #d7e5ee;
}

.trade-layout{
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.8fr);
    gap: 18px;
}

.trade-box{
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.07);
}

.trade-box h3,
.trade-box h4{
    margin: 0 0 12px;
}

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

.trade-field{
    display: grid;
    gap: 7px;
    color: #eef2f6;
    font-weight: 800;
    margin-bottom: 12px;
}

.trade-field input,
.trade-code-form input{
    width: 100%;
    min-width: 0;
    padding: 11px 13px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background-color: rgba(10, 18, 24, 0.45);
    color: white;
}

.trade-card-list{
    display: grid;
    gap: 8px;
    max-height: 360px;
    overflow: auto;
    padding-right: 4px;
}

.trade-card-option{
    display: grid;
    grid-template-columns: minmax(0, 1fr) 72px;
    align-items: center;
    gap: 8px;
    padding: 9px;
    border-radius: 8px;
    background-color: rgba(10, 18, 24, 0.28);
}

.trade-card-option strong,
.trade-card-option small{
    display: block;
    overflow-wrap: anywhere;
}

.trade-card-option small{
    color: #c9d9e4;
}

.trade-card-option input{
    width: 72px;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background-color: rgba(10, 18, 24, 0.45);
    color: white;
    text-align: center;
}

.trade-code-form{
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.trade-code{
    margin-top: 14px;
    padding: 13px;
    border-radius: 8px;
    background-color: rgba(255, 204, 84, 0.18);
    color: #fff2b8;
    font-size: 1.25rem;
    font-weight: 1000;
    text-align: center;
    letter-spacing: 0.08em;
}

.trade-code .secondary-button{
    margin-top: 10px;
    letter-spacing: 0;
}

.trade-preview{
    margin-top: 18px;
}

.trade-preview h4{
    margin: 0 0 12px;
    color: #fff2b8;
}

.trade-status{
    margin: 0 0 12px;
    color: #cfe0e8;
    font-weight: 800;
}

.trade-preview-grid{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.trade-preview-grid div{
    padding: 12px;
    border-radius: 8px;
    background-color: rgba(10, 18, 24, 0.28);
}

.trade-preview-grid p{
    margin: 8px 0;
}

.trade-preview-grid ul{
    margin: 0;
    padding-left: 18px;
}

.trade-preview-grid li{
    margin-bottom: 5px;
}

.trade-preview-grid span{
    color: #c9d9e4;
}

.trade-actions{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.trade-empty{
    margin: 0;
    color: #d7e5ee;
}

@media (max-width: 720px) {
    #body_index{
        width: 100%;
        margin: 0;
        border-width: 0;
        overflow-x: hidden;
    }

    header{
        flex-direction: column;
        align-items: center;
        gap: 10px;
        padding: 10px 12px;
    }

    .header-main{
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    h1{
        flex-basis: 100%;
        padding-top: 0;
        font-size: clamp(1.65rem, 8vw, 2.2rem);
        line-height: 1.05;
    }

    .header-actions{
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    .nav-tab{
        min-height: 34px;
        padding: 6px 8px;
        border-radius: 8px;
        font-size: 0.78rem;
    }

    .coins-display{
        min-width: 0;
        padding: 8px 10px;
        font-size: 0.9rem;
    }

    .account-btn,
    #accountNavBtn{
        padding: 9px 14px;
    }

    #home-content{
        margin-top: 28px;
        padding: 0 10px 32px;
    }

    .pack-selector{
        display: grid;
        grid-template-columns: 42px minmax(0, 280px) 42px;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
    }

    .casino-shortcut,
    .trade-shortcut{
        position: static;
        grid-column: 1 / -1;
        justify-self: center;
        flex-direction: row;
        margin-bottom: 4px;
    }

    .trade-shortcut{
        grid-row: 1;
    }

    .casino-shortcut{
        grid-row: 2;
    }

    .casino-shortcut img{
        width: 86px;
        height: 86px;
    }

    .trade-shortcut-icon{
        width: 76px;
        height: 76px;
        font-size: 2.4rem;
    }

    .casino-shortcut span{
        font-size: 1.35rem;
    }

    .trade-shortcut span:last-child{
        font-size: 1.28rem;
    }

    #previousPackBtn{
        grid-column: 1;
    }

    #Booster{
        grid-column: 2;
        width: 100%;
        max-width: 280px;
        padding: 16px;
        border-radius: 18px;
    }

    #nextPackBtn{
        grid-column: 3;
    }

    .pack-arrow{
        width: 42px;
        height: 58px;
        font-size: 1.9rem;
    }

    #statsToggle{
        position: static;
        align-self: flex-end;
        margin-bottom: 8px;
        padding: 7px 11px;
        font-size: 0.76rem;
    }

    .pack-name{
        margin-top: 6px;
    }

    #openBtn{
        width: 100%;
        padding: 12px 14px;
    }

    #booster-stats{
        width: 100%;
        padding: 16px;
        border-radius: 16px;
        overflow-x: auto;
    }

    #pack-cards{
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        margin: 28px 10px;
        padding: 0;
    }

    .inventory-page,
    .information-page,
    .admin-page,
    .account-page,
    .casino-page{
        padding: 24px 10px 44px;
    }

    .inventory-grid{
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .inventory-tabs{
        flex-wrap: wrap;
    }

    .auth-card,
    .admin-panel{
        width: 100%;
        padding: 18px;
        border-radius: 12px;
    }

    .auth-header,
    .admin-page-title{
        flex-direction: column;
        align-items: stretch;
    }

    .auth-switches{
        display: grid;
        grid-template-columns: 1fr;
    }

    .admin-console,
    .admin-card-row{
        grid-template-columns: 1fr;
    }

    #deleteCardsPageBtn{
        margin-left: 0;
    }

    .information-grid{
        grid-template-columns: 1fr;
    }

    .casino-wheel-wrap{
        width: min(340px, 92vw);
        padding: 8px;
    }

    .casino-wheel text{
        font-size: 15px;
        stroke-width: 3px;
    }

    .casino-spin-button{
        width: min(100%, 280px);
        min-width: 0;
    }

    .trade-page{
        padding: 24px 10px 44px;
    }

    .trade-layout,
    .trade-columns,
    .trade-preview-grid,
    .trade-code-form{
        grid-template-columns: 1fr;
    }

    .trade-box{
        padding: 16px;
    }

    .trade-card-list{
        max-height: 280px;
    }
}

@media (max-width: 380px) {
    .pack-selector{
        grid-template-columns: 34px minmax(0, 1fr) 34px;
    }

    .pack-arrow{
        width: 34px;
        height: 52px;
        font-size: 1.55rem;
    }

    .inventory-grid,
    #pack-cards{
        grid-template-columns: 1fr;
    }

    .casino-shortcut img{
        width: 72px;
        height: 72px;
    }

    .trade-shortcut-icon{
        width: 64px;
        height: 64px;
        font-size: 2rem;
    }

    .casino-shortcut span{
        font-size: 1.12rem;
    }

    .trade-shortcut span:last-child{
        font-size: 1.05rem;
    }
}
