/* ===== EXP トースト（画面中央表示） ===== */
.exp-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18);
    padding: 28px 32px;
    z-index: 10000;
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    min-width: 300px;
    text-align: center;
}
.exp-toast.is-visible {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}
.exp-toast.is-hiding {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
}

/* 背景オーバーレイ */
.exp-toast-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.exp-toast-overlay.is-visible {
    opacity: 1;
}

.exp-toast__icon {
    font-size: 36px;
    line-height: 1;
    display: block;
    margin-bottom: 8px;
    animation: exp-toast-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.exp-toast__exp {
    font-size: 28px;
    font-weight: 900;
    color: var(--color_main, #4a5ab9);
    margin-bottom: 4px;
}
.exp-toast__total {
    font-size: 13px;
    color: #888;
    margin-bottom: 12px;
}
.exp-toast__total-value {
    font-weight: 800;
    color: var(--color_text, #333);
    font-size: 15px;
}
.exp-toast__level {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 12px;
}
.exp-toast__bar-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}
.exp-toast__bar {
    flex: 1;
    height: 8px;
    background: #ebebeb;
    border-radius: 4px;
    overflow: hidden;
}
.exp-toast__bar-fill {
    height: 100%;
    background: linear-gradient(to right, #7e7, var(--color_main, #4a5ab9));
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.exp-toast__bar-text {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
    font-weight: 600;
}
.exp-toast__btn {
    display: inline-block;
    margin-top: 16px;
    padding: 8px 32px;
    background: var(--color_main, #4a5ab9);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    border: none;
    border-radius: 60px;
    cursor: pointer;
    transition: opacity 0.2s;
}
.exp-toast__btn:hover {
    opacity: 0.85;
}

@keyframes exp-toast-pop {
    0% { transform: scale(0); }
    60% { transform: scale(1.3); }
    100% { transform: scale(1); }
}


/* ===== レベルアップ モーダル ===== */
.levelup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.levelup-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.levelup-modal {
    background: #fff;
    border-radius: 16px;
    padding: 40px 32px 32px;
    text-align: center;
    max-width: 360px;
    width: 90%;
    transform: scale(0.8) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}
.levelup-overlay.is-visible .levelup-modal {
    transform: scale(1) translateY(0);
}

.levelup-modal__sparkle {
    font-size: 14px;
    letter-spacing: 4px;
    margin-bottom: 4px;
    animation: levelup-sparkle 1.5s ease-in-out infinite;
}

.levelup-modal__title {
    font-size: 28px;
    font-weight: 900;
    color: #e88035;
    margin-bottom: 16px;
    animation: levelup-title 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

.levelup-modal__levels {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}
.levelup-modal__old-level {
    font-size: 20px;
    font-weight: 700;
    color: #aaa;
}
.levelup-modal__arrow {
    font-size: 18px;
    color: #ccc;
}
.levelup-modal__new-level {
    font-size: 28px;
    font-weight: 900;
    color: #e88035;
    animation: levelup-number 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s both;
}

.levelup-modal__rank {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    min-height: 20px;
}

.levelup-modal__stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 24px;
    font-size: 12px;
    color: #888;
}
.levelup-modal__stat-value {
    font-size: 16px;
    font-weight: 800;
    color: var(--color_text, #333);
    display: block;
}

.levelup-modal__btn {
    display: inline-block;
    padding: 12px 32px;
    background: #e88035;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    border: none;
    border-radius: 60px;
    cursor: pointer;
    transition: opacity 0.2s;
}
.levelup-modal__btn:hover {
    opacity: 0.85;
}

/* パーティクル（軽量版） */
.levelup-modal__particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.levelup-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    top: -10px;
    animation: levelup-fall linear forwards;
}

@keyframes levelup-sparkle {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}
@keyframes levelup-title {
    0% { transform: scale(0) rotate(-10deg); opacity: 0; }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}
@keyframes levelup-number {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes levelup-fall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(400px) rotate(720deg); opacity: 0; }
}

/* レスポンシブ */
@media (max-width: 480px) {
    .exp-toast {
        min-width: auto;
        width: 85%;
        padding: 24px 20px;
    }
    .exp-toast__exp {
        font-size: 24px;
    }
    .levelup-modal {
        padding: 32px 20px 24px;
    }
    .levelup-modal__title {
        font-size: 24px;
    }
}
