:root {
    --bg-color: #172030;
    --text-color: white;
    --popup-bg-color: #263038;
    --popup-close-bg-color: black;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: Arial, sans-serif;
    box-sizing: border-box;
    padding-left: 20px;
    padding-right: 20px;
}

main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    padding-top: 100px;
    margin-top: auto;
    margin-bottom: auto;
    box-sizing: border-box;
}

#particles-js, #svg-container {
    display: none;
}

.character-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    width: 100%;
}

.character-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    width: 100%;
}

.character {
    text-align: center;
    cursor: pointer;
    position: relative;
    flex: 1 1 100px;
    max-width: 100px;
    max-height: 100px;
    transition: none;
}

.character img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    transition: none;
}

.five-star {
    background-image: url('https://gensh.honeyhunterworld.com/img/back/item/5star.webp');
    background-size: cover;
    border-radius: 10px;
}

.four-star {
    background-image: url('https://gensh.honeyhunterworld.com/img/back/item/4star.webp');
    background-size: cover;
    border-radius: 10px;
}

.element-icon {
    width: 30px;
    height: 30px;
    margin: 0 0 10px 0;
    align-self: center;
}

.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.popup-content {
    position: relative;
    background: var(--popup-bg-color);
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.popup img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: none;
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-color);
    background: var(--popup-close-bg-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    text-align: center;
    line-height: 30px;
}
