: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: 100px;
    padding-right: 50px;
}

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 {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: -1;
}

#svg-container {
    top: 0;
    left: 0;
    overflow: hidden;
    opacity: 0.7;
}

#svg-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

path {
    fill: url(#bg);
    opacity: 0.7;
}

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

.character-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
    width: calc(100% - 60px);
    margin-left: 10px;
}

.character {
    text-align: center;
    cursor: pointer;
    position: relative;
    flex: 1 1 100px;
    max-width: 100px;
    max-height: 100px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.character:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.character:hover img {
    transform: scale(1.1);
}

.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: 50px;
    height: 50px;
    margin-right: 10px;
    flex-shrink: 0;
}

.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;
}