/* ストリーク報酬ダイアログ - 水晶のような半透明デザイン + 花の装飾 */

/* オーバーレイ */
.streak-reward-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* メインコンテナ - 水晶のような半透明 */
.streak-reward-container {
    position: relative;
    max-width: 500px;
    width: 90%;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.9) 0%, 
        rgba(240, 248, 255, 0.95) 50%,
        rgba(255, 255, 255, 0.9) 100%
    );
    border-radius: 30px;
    padding: 50px 40px;
    box-shadow: 
        0 25px 70px rgba(0, 0, 0, 0.3),
        0 0 120px rgba(102, 126, 234, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.9),
        inset 0 -2px 0 rgba(102, 126, 234, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.6);
    transform: scale(0.5);
    opacity: 0;
    animation: popInBounce 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.2s forwards;
    overflow: visible;
}

@keyframes popInBounce {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 花の装飾 - 四隅 */
.flower-decoration {
    position: absolute;
    font-size: 40px;
    opacity: 0;
    animation: flowerBloom 1s ease-out forwards;
}

.flower-top-left {
    top: -20px;
    left: -20px;
    animation-delay: 0.5s;
}

.flower-top-right {
    top: -20px;
    right: -20px;
    animation-delay: 0.6s;
}

.flower-bottom-left {
    bottom: -20px;
    left: -20px;
    animation-delay: 0.7s;
}

.flower-bottom-right {
    bottom: -20px;
    right: -20px;
    animation-delay: 0.8s;
}

@keyframes flowerBloom {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* 花びらの舞い */
.petal {
    position: absolute;
    font-size: 20px;
    opacity: 0;
    pointer-events: none;
}

.petal:nth-child(1) {
    top: 10%;
    left: 10%;
    animation: petalFall 3s ease-in-out 0.5s infinite;
}

.petal:nth-child(2) {
    top: 20%;
    right: 15%;
    animation: petalFall 3.5s ease-in-out 0.8s infinite;
}

.petal:nth-child(3) {
    top: 30%;
    left: 20%;
    animation: petalFall 4s ease-in-out 1.1s infinite;
}

.petal:nth-child(4) {
    top: 15%;
    right: 25%;
    animation: petalFall 3.2s ease-in-out 1.4s infinite;
}

@keyframes petalFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* バッジアイコン */
.streak-badge {
    text-align: center;
    margin-bottom: 25px;
}

.streak-badge-icon {
    font-size: 80px;
    display: inline-block;
    animation: badgePulse 2s ease-in-out infinite;
    filter: drop-shadow(0 5px 15px rgba(255, 215, 0, 0.5));
}

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

/* タイトル */
.streak-title {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    animation: titleShine 3s ease-in-out infinite;
}

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

/* 連続日数 */
.streak-days {
    text-align: center;
    font-size: 48px;
    font-weight: 800;
    color: #667eea;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

/* メッセージ */
.streak-message {
    font-size: 18px;
    line-height: 1.8;
    color: #2d3748;
    text-align: center;
    margin-bottom: 25px;
    font-weight: 500;
    opacity: 0;
    animation: messageSlideIn 0.8s ease-out 1s forwards;
}

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

/* ポイント報酬 */
.streak-points {
    text-align: center;
    margin-bottom: 30px;
    opacity: 0;
    animation: pointsReveal 0.8s ease-out 1.3s forwards;
}

.points-label {
    font-size: 14px;
    color: #718096;
    margin-bottom: 8px;
}

.points-value {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.points-icon {
    font-size: 32px;
}

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

/* 閉じるボタン */
.streak-close-btn {
    display: block;
    margin: 0 auto;
    padding: 14px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    opacity: 0;
    animation: buttonFadeIn 0.8s ease-out 1.6s forwards;
}

@keyframes buttonFadeIn {
    to {
        opacity: 1;
    }
}

.streak-close-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.6);
}

.streak-close-btn:active {
    transform: translateY(-1px);
}

/* 水晶の輝き */
.crystal-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 70%
    );
    animation: crystalShine 4s ease-in-out infinite;
    pointer-events: none;
    border-radius: 30px;
}

@keyframes crystalShine {
    0%, 100% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    50% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* キラキラエフェクト */
.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    opacity: 0;
    animation: sparkleAnimation 2s ease-in-out infinite;
}

.sparkle:nth-child(1) {
    top: 20%;
    left: 15%;
    animation-delay: 0s;
}

.sparkle:nth-child(2) {
    top: 40%;
    right: 20%;
    animation-delay: 0.5s;
}

.sparkle:nth-child(3) {
    bottom: 30%;
    left: 25%;
    animation-delay: 1s;
}

.sparkle:nth-child(4) {
    top: 60%;
    right: 15%;
    animation-delay: 1.5s;
}

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

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .streak-reward-container {
        padding: 40px 30px;
        max-width: 95%;
    }
    
    .streak-badge-icon {
        font-size: 60px;
    }
    
    .streak-title {
        font-size: 24px;
    }
    
    .streak-days {
        font-size: 36px;
    }
    
    .streak-message {
        font-size: 16px;
    }
    
    .points-value {
        font-size: 28px;
    }
    
    .flower-decoration {
        font-size: 30px;
    }
}

@media (max-width: 480px) {
    .streak-reward-container {
        padding: 30px 20px;
    }
    
    .streak-badge-icon {
        font-size: 50px;
    }
    
    .streak-title {
        font-size: 20px;
        letter-spacing: 1px;
    }
    
    .streak-days {
        font-size: 32px;
    }
    
    .streak-message {
        font-size: 14px;
    }
    
    .points-value {
        font-size: 24px;
    }
    
    .streak-close-btn {
        padding: 12px 32px;
        font-size: 14px;
    }
    
    .flower-decoration {
        font-size: 24px;
    }
}
