/* ========================================
   レアリティ表示スタイル
   ======================================== */

.rarity-display {
    text-align: center;
    margin: var(--spacing-lg) 0;
    padding: var(--spacing-md);
    border-radius: 12px;
    transition: all 0.3s ease;
    animation: rarityFadeIn 0.6s ease;
}

@keyframes rarityFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.rarity-star {
    font-size: 2rem;
    margin: 0 4px;
    display: inline-block;
    animation: starPulse 1s ease infinite;
}

@keyframes starPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.rarity-text {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* レアリティ別カラー */
.rarity-1 {
    background: linear-gradient(135deg, rgba(169, 169, 169, 0.2), rgba(128, 128, 128, 0.2));
    border: 2px solid #A9A9A9;
}

.rarity-1 .rarity-star {
    color: #A9A9A9;
    text-shadow: 0 0 10px rgba(169, 169, 169, 0.6);
}

.rarity-1 .rarity-text {
    color: #C0C0C0;
}

/* アンコモン（★2） */
.rarity-2 {
    background: linear-gradient(135deg, rgba(34, 139, 34, 0.2), rgba(50, 205, 50, 0.2));
    border: 2px solid #32CD32;
}

.rarity-2 .rarity-star {
    color: #32CD32;
    text-shadow: 0 0 10px rgba(50, 205, 50, 0.6);
}

.rarity-2 .rarity-text {
    color: #7FFF00;
}

/* レア（★3） */
.rarity-3 {
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.2), rgba(0, 149, 255, 0.2));
    border: 2px solid #0095FF;
}

.rarity-3 .rarity-star {
    color: #0095FF;
    text-shadow: 0 0 10px rgba(0, 149, 255, 0.6);
}

.rarity-3 .rarity-text {
    color: #4FC3F7;
}

/* エピック（★4） */
.rarity-4 {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.2), rgba(186, 85, 211, 0.2));
    border: 2px solid #BA55D3;
}

.rarity-4 .rarity-star {
    color: #BA55D3;
    text-shadow: 0 0 10px rgba(186, 85, 211, 0.6);
    animation: starPulse 0.8s ease infinite, starGlow 2s ease infinite;
}

@keyframes starGlow {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.3);
    }
}

.rarity-4 .rarity-text {
    color: #E891FF;
}

/* レジェンダリー（★5） */
.rarity-5 {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 140, 0, 0.3));
    border: 3px solid #FFD700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    animation: legendaryPulse 2s ease infinite;
}

@keyframes legendaryPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
    }
}

.rarity-5 .rarity-star {
    color: #FFD700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
    animation: starPulse 0.6s ease infinite, starRotate 3s linear infinite;
}

@keyframes starRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.rarity-5 .rarity-text {
    color: #FFF;
    background: linear-gradient(135deg, #FFD700, #FF8C00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShine 2s ease infinite;
}

@keyframes textShine {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* レアリティ統計表示 */
.rarity-stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 10px;
    margin: var(--spacing-lg) 0;
}

.rarity-stat-item {
    text-align: center;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(30, 35, 40, 0.6);
    border: 1px solid rgba(200, 155, 60, 0.3);
}

.rarity-stat-label {
    font-size: 0.8rem;
    color: var(--text-light);
}

.rarity-stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 4px;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .rarity-star {
        font-size: 1.5rem;
        margin: 0 2px;
    }

    .rarity-text {
        font-size: 1rem;
        letter-spacing: 1px;
    }

    .rarity-display {
        padding: var(--spacing-sm);
    }
}
