@import url('https://fonts.googleapis.com/css?family=Arvo');

/* ----------- Non-Retina Screens ----------- */
@media screen 
  and (min-device-width: 1200px) 
  and (max-device-width: 1600px) 
  and (-webkit-min-device-pixel-ratio: 1) { 
}

/* ----------- Retina Screens ----------- */
@media screen 
  and (min-device-width: 1200px) 
  and (max-device-width: 1600px) 
  and (-webkit-min-device-pixel-ratio: 2)
  and (min-resolution: 192dpi) { 
} 

:root {
    --pink-100: #fff2f8;
    --pink-200: #ffd8ec;
    --pink-300: #ffb3d8;
    --pink-400: #ff8fbd;
    --pink-500: #f462a2;
    --berry: #a1245c;
    --ink: #1f0f1b;

    --mainBackground: var(--pink-100);
    --raffleRollerBackground: #ffe5f2;
    --itemBackground: #ff9ac6;

    --rollerWidth: 100rem;
    --rollerHeight: 12.7rem;

    --itemSize: 10rem;

    --colorWidth: .5rem;
    --colorMilSpec: #ff9ac6;
    --colorRestricted: #f462a2;
    --colorClassified: #e53f9c;
    --colorCovert: #d2197c;
    --colorRare: #1b1b1b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { font-size: 10px; }

.hidden {
    display: none !important;
}

body {
    display: flex;
    gap: 2rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    color: var(--ink);
    background:
        linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.45)),
        url('img/background.png') center/cover no-repeat fixed;
    font-family: 'Arvo', sans-serif;
    font-size: 1.6rem;
    line-height: 2.4rem;
    font-weight: 400;
}

.app {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    width: 100%;
}

.loading-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 20% 20%, rgba(255, 176, 207, 0.18), transparent 35%), rgba(0, 0, 0, 0.55);
    z-index: 2000000;
    backdrop-filter: blur(4px);
}

.loading-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 2.4rem 3rem;
    border-radius: 1.6rem;
    box-shadow: 0 1.6rem 3.2rem rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--berry);
    min-width: 26rem;
}

.loader {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    border: .6rem solid var(--pink-200);
    border-top-color: var(--pink-500);
    animation: spin 1s linear infinite;
}

.loading-card button {
    color: #fff;
    background: linear-gradient(135deg, var(--pink-500), var(--pink-300));
    border: none;
    padding: .8rem 1.6rem;
    border-radius: .8rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 .8rem 1.6rem rgba(161, 36, 92, 0.35);
}

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

main {
    display: flex;
    gap: 2rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    color: #fff;
    background: var(--mainBackground);
    font-family: 'Arvo', sans-serif;
    font-size: 1.6rem;
    line-height: 2.4rem;
    font-weight: 400;
}

img {
    border: 0;
    vertical-align: middle;
}

.intro {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.65);
    border-radius: 1.2rem;
    border: 1px solid rgba(255, 143, 189, 0.4);
    box-shadow: 0 0.8rem 1.6rem rgba(161, 36, 92, 0.18);
}

.intro img {
    max-width: 12rem;
}

.raffle-roller {
    position: relative;
    width: var(--rollerWidth);
    height: calc(var(--rollerHeight) - .7rem);
    background: var(--raffleRollerBackground);
    border: 2px solid var(--pink-300);
    border-radius: 50rem;
    border-width: 0 1rem;
    overflow: hidden;
    box-shadow: 0 1rem 2.5rem rgba(161, 36, 92, 0.25);
}

.raffle-roller-holder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: var(--rollerHeight);
}

.raffle-roller-holder:before {
    content: "";
    position: absolute;
    width: .5rem;
    height: 100%;
    left: 50%;
    background: var(--berry);
    border: unset;
    z-index: 999999;
}

.raffle-roller-container {
    display: flex;
    gap: 1rem;
    width: 50000rem;
    max-width: 50000rem;
    height: var(--rollerHeight);
    margin: 1rem;
    margin-left: 0;
    transition: all 8s cubic-bezier(.01, .01, .25, 1);
}

.raffle-roller-container.preview-scroll {
    width: max-content;
    max-width: none;
    animation: scrollPreview 25s linear infinite;
}

.raffle-roller-container.preview-scroll .item {
    flex: 0 0 var(--itemSize);
}

.winning-message {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 143, 189, 0.35);
    border-radius: 1rem;
    padding: 1rem 1.4rem;
    color: var(--berry);
    text-align: center;
    box-shadow: 0 .8rem 1.6rem rgba(161, 36, 92, 0.18);
}

.item {
    width: var(--itemSize);
    height: var(--itemSize);
    border: 1px solid var(--mainBackground);
    background: var(--itemBackground) center center no-repeat;
    background-size: calc(100% - 1rem);
    box-shadow: inset 0 -.4rem 1rem rgba(0,0,0,0.12);
}

.winning-item {
    transform: scale(1.1);
    transition: .6s ease-in-out;
}

.class_milSpec_item {
    border-bottom: var(--colorWidth) solid var(--colorMilSpec);
}

.text--class_milSpec_item {
    color: var(--colorMilSpec);
}

.class_restricted_item {
    border-bottom: var(--colorWidth) solid var(--colorRestricted);
}

.text--class_restricted_item {
    color: var(--colorRestricted);
}

.class_classified_item {
    border-bottom: var(--colorWidth) solid var(--colorClassified);
}

.text--class_classified_item {
    color: var(--colorClassified);
}

.class_covert_item {
    border-bottom: var(--colorWidth) solid var(--colorCovert);
}

.text--class_covert_item {
    color: var(--colorCovert);
}

.class_rare_item {
    border-bottom: var(--colorWidth) solid var(--colorRare);
}

.text--class_rare_item {
    color: var(--colorRare);
}

.case-buttons {
    display: flex;
    gap: 1rem;
}

.case-buttons button {
    color: #1f0f1b;
    background: linear-gradient(135deg, var(--pink-400), var(--pink-200));
    font-size: 1.6rem;
    line-height: 2.4rem;
    padding: 1rem 2rem;
    outline: unset;
    border: 2px solid var(--pink-500);
    border-radius: 1rem;
    cursor: pointer;
    box-shadow: 0 .6rem 1.2rem rgba(161, 36, 92, 0.25);
    transition: transform .15s ease, box-shadow .15s ease, background .25s ease;
}

.case-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0 1rem 1.8rem rgba(161, 36, 92, 0.28);
    background: linear-gradient(135deg, var(--pink-500), var(--pink-300));
}

.case-buttons button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    background: linear-gradient(135deg, var(--pink-200), var(--pink-100));
}

.inventory:empty {
    padding: unset;
}

.inventory {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    width: 147.5rem;
    max-width: 147.5rem;
    height: auto;
    background: var(--raffleRollerBackground);
    margin: .5rem auto;
    padding: .5rem;
}

.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
    z-index: 1000000;
}

.modal.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
}

.modal-content {
    position: relative;
    width: min(90vw, 52rem);
    max-height: 90vh;
    background: linear-gradient(145deg, #2e1f2c, #3a2335);
    border: 2px solid var(--pink-300);
    border-radius: 1.6rem;
    box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.35);
    padding: 2.4rem;
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    align-items: center;
    overflow: hidden;
}

.modal-close {
    position: absolute;
    top: .8rem;
    right: 1rem;
    background: transparent;
    color: #ffd8ec;
    border: none;
    font-size: 2.4rem;
    cursor: pointer;
    line-height: 1;
}

.modal-text h2 {
    font-size: 2.4rem;
    margin-bottom: .4rem;
    color: var(--pink-200);
}

.modal-text p {
    font-size: 1.8rem;
    color: #ffeef7;
}

#modal-item-name {
    color: var(--pink-300);
    font-weight: 700;
}

#modal-image {
    width: 100%;
    max-height: 28rem;
    object-fit: contain;
    border-radius: 1rem;
    background: #2a1825;
    padding: 1rem;
}

.cow-squad {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 10;
}

.cow {
    position: absolute;
    width: 10rem;
    height: 10rem;
    background: url('https://media.tenor.com/lVY8YT2vqdEAAAAi/cow-dance.gif') center/contain no-repeat;
    opacity: 0.9;
    animation: wiggle 1.4s ease-in-out infinite alternate, floaty 9s ease-in-out infinite;
    filter: drop-shadow(0 .6rem 1.2rem rgba(0,0,0,0.25));
    --cow-scale: 1;
}

.cow-1 { top: 12%; left: 8%; --cow-scale: 0.9; animation-delay: 0s, 0s; }
.cow-2 { top: 18%; right: 10%; --cow-scale: 1.1; animation-delay: 0.2s, -2s; }
.cow-3 { bottom: 14%; left: 6%; --cow-scale: 0.85; animation-delay: 0.4s, -4s; }
.cow-4 { bottom: 12%; right: 12%; --cow-scale: 1; animation-delay: 0.1s, -6s; }
.cow-5 { top: 42%; left: 48%; --cow-scale: 0.95; animation-delay: 0.3s, -3s; }

@keyframes wiggle {
    0% { transform: translateY(0) rotate(-3deg) scale(var(--cow-scale)); }
    100% { transform: translateY(-6px) rotate(3deg) scale(calc(var(--cow-scale) * 1.02)); }
}

@keyframes floaty {
    0% { transform: translate3d(0,0,0) scale(var(--cow-scale)); }
    25% { transform: translate3d(6px,-8px,0) scale(var(--cow-scale)); }
    50% { transform: translate3d(-6px,-2px,0) scale(var(--cow-scale)); }
    75% { transform: translate3d(4px,-10px,0) scale(var(--cow-scale)); }
    100% { transform: translate3d(0,0,0) scale(var(--cow-scale)); }
}

@keyframes scrollPreview {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
