@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;700&display=swap');

body {
    font-family: 'Montserrat', sans-serif;
    text-align: center;
    background-color: #222;
    color: white;
    margin: 0;
    padding: 20px;
}

h1 {
    font-size: 28px;
    margin-bottom: 20px;
}

h2 {
    font-size: 22px;
    margin-bottom: 15px;
}

h3 {
    font-size: 16px;
    margin-bottom: 20px;
}

.gacha {
    margin-bottom: 20px;
}
.video-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.video-overlay video {
    width: 80%;
    max-height: 80%;
    border-radius: 10px;
}

button {
    padding: 12px 24px;
    font-size: 18px;
    font-weight: bold;
    margin: 10px;
    border: none;
    border-radius: 8px;
    background-color: #ffcc00;
    color: black;
    cursor: pointer;
    transition: background 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

button:hover {
    background-color: #ff9900;
}

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

.pull-rates-content {
    background: black;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    max-width: 90%;
}

.pull-rates-content img {
    width: 100%;
    max-width: 500px;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: white;
}

.results.single {
    display: flex;
    justify-content: center;
    margin: 20px auto;
}

.results.ten {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    justify-content: center;
    gap: 10px;
    margin: 20px auto;
    max-width: 600px;
}

.result-item {
    width: 100px;
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    border: 3px solid white;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.4s forwards;
    padding: 5px;
    overflow: hidden;
}

.result-item p {
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    margin: 5px 0;
    word-wrap: break-word;
    padding: 2px;
}

.result-item img {
    width: 80px;
    height: 80px;
    border-radius: 10px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rarity-5 {border-color: #FFFF00; box-shadow: 0px 0px 12px #FFFF00;}
.rarity-4 {border-color: #FF00FF; box-shadow: 0px 0px 12px #FF00FF;}
.rarity-3 {border-color: #00FFFF; box-shadow: 0px 0px 12px #00FFFF;}
.rarity-2 {border-color: #00FF00; box-shadow: 0px 0px 12px #00FF00;}
.rarity-1 {border-color: #AAAAAA; box-shadow: 0px 0px 10px #AAAAAA;}

.pinecontainer{
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: auto;
    padding: 20px;
}

.pine {
    width: 300px;
    height: auto;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.pine:hover {
    opacity: 1;
}

@keyframes bounceSpin {
    0% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-5px) rotate(90deg); }
    50% { transform: translateY(5px) rotate(180deg); }
    75% { transform: translateY(-5px) rotate(270deg); }
    100% { transform: translateY(0) rotate(360deg); }
}

.pine.clicked {
    animation: bounceSpin 2s ease-in-out;
}

@media (max-width: 600px) {
    h1 {
        font-size: 22px;
    }

    h2 {
        font-size: 16px;
    }

    .results.ten {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        justify-content: center;
        align-items: center;
        max-width: 100%;
        margin: 0 auto;
    }

    .result-item {
        width: 75px;
        height: 90px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        font-weight: bold;
        opacity: 0;
        transform: translateY(20px);
        animation: fadeIn 0.4s forwards;
        overflow: hidden;
    }

    .result-item .stars {
        font-size: 12px;
        margin-bottom: 0;
    }

    .result-item img {
        width: 55px;
        height: 55px;
        object-fit: contain;
        margin-bottom: -10px;
    }

    .result-item .name {
        font-size: 8px;
        font-weight: bold;
        text-align: center;
        margin-top: 1px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .results.ten .result-item:nth-child(10) {
        grid-column: 2 / span 1;
    }
}
