*, *::before, *::after {
    box-sizing: border-box;
}

body, html {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    font-family: "Trebuchet MS", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Tahoma, sans-serif;
    background: #1a1a2e;
}

.bg-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.gacha-content {
    position: relative;
    z-index: 1;
    margin-top: 60px;
    padding: 30px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.no-user-message {
    position: relative;
    z-index: 1;
}

.user-header {
    text-align: center;
    margin-bottom: 30px;
    background: rgba(0, 0, 0, 0.85);
    padding: 30px;
    border-radius: 10px;
}

.user-header h1 {
    font-size: 48px;
    margin: 0 0 10px;
    color: #fff;
}

.user-header .collection-count {
    font-size: 24px;
    color: #ccc;
}

.no-user-message {
    text-align: center;
    margin-top: 60px;
    padding: 60px 30px;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 10px;
}

.no-user-message h1 {
    font-size: 48px;
    color: #fff;
}

.no-user-message p {
    font-size: 24px;
    color: #ccc;
}

.series-section {
    margin-bottom: 40px;
    background: rgba(0, 0, 0, 0.85);
    padding: 30px;
    border-radius: 10px;
}

.series-title {
    font-size: 36px;
    color: #fff;
    margin: 0 0 20px;
    border-bottom: 3px solid rgba(255,255,255,0.3);
    padding-bottom: 10px;
}

.series-artist {
    font-weight: normal;
    color: #aaa;
}

.series-artist a {
    color: #44aaff;
    text-decoration: none;
}

.series-artist a:hover {
    text-decoration: underline;
}

.prizes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.prize-card {
    background: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    border: 2px solid rgba(255,255,255,0.1);
    transition: transform 200ms ease;
}

.prize-card:hover {
    transform: scale(1.03);
}

.prize-card.unlocked {
    border-color: rgba(255,255,255,0.3);
}

.prize-image-container {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    overflow: hidden;
    border-radius: 8px;
}

.prize-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.prize-image-container .silhouette {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: brightness(0) saturate(0%) invert(50%);
    opacity: 0.6;
}

.prize-name {
    font-size: 24px;
    color: #fff;
    margin-bottom: 4px;
    font-weight: bold;
}

.prize-rarity {
    font-size: 20px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.prize-count {
    font-size: 18px;
    color: #aaa;
    margin-top: 4px;
}

.rarity-common { color: #ff4444; }
.rarity-uncommon { color: #44aaff; }
.rarity-rare { color: #cc66ff; }
.rarity-epic { color: #ff69b4; }
.rarity-legendary { color: #ffdd00; }

.prize-card.locked .prize-name,
.prize-card.locked .prize-rarity {
    color: #555;
}

.leaderboard {
    background: rgba(0, 0, 0, 0.85);
    border-radius: 10px;
    padding: 20px;
}

.lb-row {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-decoration: none;
    color: #fff;
    transition: background 200ms ease;
    border-radius: 8px;
}

.lb-row:last-child {
    border-bottom: none;
}

.lb-row:hover {
    background: rgba(255,255,255,0.1);
}

.lb-rank {
    font-size: 24px;
    font-weight: bold;
    color: #ffdd00;
    min-width: 60px;
}

.lb-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 20px;
    flex-shrink: 0;
}

.lb-avatar-placeholder {
    background: rgba(255,255,255,0.15);
}

.lb-name {
    font-size: 24px;
    font-weight: bold;
    flex: 1;
}

.lb-stats {
    font-size: 24px;
    color: #ccc;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .gacha-content {
        padding: 15px;
    }

    .prizes-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 12px;
    }

    .user-header h1 {
        font-size: 36px;
    }

    .series-title {
        font-size: 28px;
    }

    .prize-name {
        font-size: 18px;
    }

    .prize-rarity {
        font-size: 16px;
    }
}
