/* 商城、成就、任务、VIP等高级功能样式 */

/* ==================== 商城模块 ==================== */
.shop-modal {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 10001;
    animation: fadeIn 0.3s ease-out;
}

.shop-modal-content {
    background: white;
    border-radius: 24px;
    padding: 0;
    max-width: 900px;
    width: 95%;
    max-height: 85vh;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 35px;
    border-bottom: 2px solid #f0f0f0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 24px 24px 0 0;
}

.shop-header h2 {
    font-size: 28px;
    margin: 0;
}

.user-points-display {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

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

.points-value {
    font-size: 24px;
    font-weight: bold;
}

.points-label {
    font-size: 14px;
    opacity: 0.9;
}

.shop-close-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-size: 28px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.shop-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.shop-tabs {
    display: flex;
    padding: 15px 25px;
    gap: 12px;
    border-bottom: 1px solid #e0e0e0;
    background: #fafafa;
}

.shop-tab {
    padding: 10px 24px;
    border: none;
    background: transparent;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.shop-tab:hover {
    background: #f0f0f0;
}

.shop-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.shop-content {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
}

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

.shop-item {
    background: linear-gradient(145deg, #ffffff, #f8f9ff);
    border: 2px solid #e0e5ff;
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.shop-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.shop-item.locked {
    opacity: 0.6;
    filter: grayscale(0.5);
}

.item-icon {
    font-size: 64px;
    text-align: center;
    margin-bottom: 15px;
}

.item-info {
    flex: 1;
    margin-bottom: 15px;
}

.item-name {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.item-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.vip-required {
    margin-top: 8px;
    font-size: 12px;
    color: #ff6b6b;
    font-weight: 600;
}

.item-price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 20px;
    font-weight: bold;
    color: #667eea;
}

.buy-btn {
    width: 100%;
    padding: 12px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.buy-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.buy-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* 背包界面 */
.inventory-section h3 {
    font-size: 20px;
    color: #333;
    margin: 20px 0 15px;
}

.inventory-items, .inventory-skins {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.inventory-item {
    background: #f8f9ff;
    border: 2px solid #e0e5ff;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    font-size: 40px;
}

.item-count {
    display: block;
    font-size: 16px;
    color: #667eea;
    font-weight: bold;
    margin-top: 8px;
}

.skin-item {
    background: linear-gradient(145deg, #ffffff, #f8f9ff);
    border: 2px solid #e0e5ff;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
}

.skin-item.active {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.skin-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 8px;
}

.skin-name {
    font-size: 14px;
    color: #333;
    font-weight: 600;
    display: block;
    margin-bottom: 10px;
}

.activate-btn {
    width: 100%;
    padding: 8px;
    border: none;
    background: #667eea;
    color: white;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.activate-btn:hover:not(:disabled) {
    background: #5568d3;
}

.activate-btn:disabled {
    background: #95a5f6;
    cursor: not-allowed;
}

/* 停用按钮样式（红色） */
.activate-btn.deactivate {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8787 100%);
}

.activate-btn.deactivate:hover {
    background: linear-gradient(135deg, #ff5252 0%, #ff6b6b 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

/* ==================== 成就系统 ==================== */
.achievement-modal {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 10001;
    animation: fadeIn 0.3s ease-out;
}

.achievement-modal-content {
    background: white;
    border-radius: 24px;
    padding: 0;
    max-width: 800px;
    width: 95%;
    max-height: 85vh;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
}

.achievement-header {
    position: relative;  /* 为关闭按钮提供定位参考 */
    padding: 25px 80px 25px 35px;  /* 右侧增加空间给关闭按钮 */
    border-bottom: 2px solid #f0f0f0;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-radius: 24px 24px 0 0;
}

.achievement-header h2 {
    font-size: 28px;
    margin: 0 0 15px 0;
}

.achievement-progress {
    margin-top: 15px;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: white;
    transition: width 0.5s ease;
    border-radius: 6px;
}

.progress-text {
    font-size: 14px;
    text-align: center;
}

.achievement-close-btn {
    position: absolute;
    top: 25px;
    right: 35px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-size: 28px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.achievement-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.achievement-categories {
    display: flex;
    padding: 15px 25px;
    gap: 10px;
    border-bottom: 1px solid #e0e0e0;
    background: #fafafa;
    flex-wrap: wrap;
}

.category-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.category-btn:hover {
    background: #f0f0f0;
}

.category-btn.active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.achievement-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(145deg, #ffffff, #f8f9ff);
    border: 2px solid #e0e5ff;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.achievement-item.unlocked {
    border-color: #51cf66;
    background: linear-gradient(145deg, #ffffff, #e8ffed);
}

.achievement-item.locked {
    opacity: 0.6;
}

.achievement-icon {
    font-size: 48px;
    flex-shrink: 0;
}

.achievement-details {
    flex: 1;
}

.achievement-name {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.achievement-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.achievement-points {
    font-size: 13px;
    color: #f093fb;
    font-weight: 600;
}

.achievement-date {
    font-size: 12px;
    color: #51cf66;
    margin-top: 5px;
}

.achievement-locked-msg {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

/* 成就解锁通知 */
.achievement-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10002;
    animation: slideInRight 0.5s ease-out;
}

.achievement-popup {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-radius: 16px;
    padding: 20px 25px;
    box-shadow: 0 10px 30px rgba(240, 147, 251, 0.4);
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 300px;
}

.achievement-badge {
    font-size: 48px;
}

.achievement-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
}

.achievement-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.achievement-desc {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 5px;
}

.achievement-reward {
    font-size: 14px;
    font-weight: 600;
}

/* ==================== 任务系统 ==================== */
.task-modal {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 10001;
    animation: fadeIn 0.3s ease-out;
}

.task-modal-content {
    background: white;
    border-radius: 24px;
    padding: 0;
    max-width: 700px;
    width: 95%;
    max-height: 85vh;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 35px;
    border-bottom: 2px solid #f0f0f0;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border-radius: 24px 24px 0 0;
}

.task-header h2 {
    font-size: 28px;
    margin: 0;
}

.task-close-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-size: 28px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.task-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.task-tabs {
    display: flex;
    padding: 15px 25px;
    gap: 12px;
    border-bottom: 1px solid #e0e0e0;
    background: #fafafa;
}

.task-tab {
    padding: 10px 24px;
    border: none;
    background: transparent;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.task-tab:hover {
    background: #f0f0f0;
}

.task-tab.active {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.task-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(145deg, #ffffff, #f8f9ff);
    border: 2px solid #e0e5ff;
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.task-item.completed {
    border-color: #4facfe;
}

.task-item.claimed {
    opacity: 0.6;
    background: #f5f5f5;
    border-color: #e0e0e0;
}

.task-icon {
    font-size: 40px;
    flex-shrink: 0;
}

.task-info {
    flex: 1;
}

.task-name {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
}

.task-desc {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.task-progress-bar {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.task-progress-text {
    font-size: 12px;
    color: #4facfe;
    font-weight: 600;
}

.task-reward {
    text-align: center;
    margin-right: 10px;
}

.reward-amount {
    font-size: 20px;
    font-weight: bold;
    color: #4facfe;
}

.reward-label {
    font-size: 12px;
    color: #666;
}

.claim-btn {
    padding: 10px 20px;
    border: none;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border-radius: 10px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.claim-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(79, 172, 254, 0.4);
}

.claim-btn:disabled {
    background: #d0d0d0 !important;
    color: #888 !important;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none !important;
    box-shadow: none !important;
}

/* ==================== VIP系统 ==================== */
.vip-modal {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 10001;
    animation: fadeIn 0.3s ease-out;
}

.vip-modal-content {
    background: white;
    border-radius: 24px;
    padding: 0;
    max-width: 900px;
    width: 95%;
    max-height: 85vh;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    overflow-y: auto;
}

.vip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 35px;
    border-bottom: 2px solid #f0f0f0;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
    border-radius: 24px 24px 0 0;
}

.vip-header h2 {
    font-size: 28px;
    margin: 0;
}

.vip-close-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.vip-close-btn:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
}

.vip-current-status {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 35px;
    background: linear-gradient(135deg, #fff9e6 0%, #ffeaa7 100%);
}

.vip-badge {
    font-size: 80px;
    flex-shrink: 0;
}

.vip-status-info {
    flex: 1;
}

.vip-level-name {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.vip-points {
    font-size: 18px;
    color: #666;
    margin-bottom: 15px;
}

.vip-progress-container {
    margin-top: 12px;
}

.vip-progress-bar {
    width: 100%;
    height: 16px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
}

.vip-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.5s ease;
    border-radius: 8px;
}

.vip-progress-text {
    font-size: 14px;
    color: #666;
}

.vip-max-level {
    font-size: 16px;
    color: #667eea;
    font-weight: bold;
    margin-top: 10px;
}

.vip-benefits-section {
    padding: 35px;
}

.vip-benefits-section h3 {
    font-size: 22px;
    color: #333;
    margin-bottom: 20px;
}

.vip-benefits-list {
    display: grid;
    gap: 12px;
}

.vip-benefit-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8f9ff;
    border-radius: 10px;
}

.benefit-icon {
    color: #51cf66;
    font-size: 20px;
    font-weight: bold;
}

.benefit-text {
    font-size: 15px;
    color: #333;
}

.vip-levels-section {
    padding: 35px;
    background: #fafafa;
}

.vip-levels-section h3 {
    font-size: 22px;
    color: #333;
    margin-bottom: 20px;
}

.vip-levels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.vip-level-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.vip-level-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.vip-level-card.current {
    border-color: #ffd700;
    background: linear-gradient(145deg, #fff9e6, #ffffff);
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.3);
}

.vip-level-card.locked {
    opacity: 0.5;
}

.vip-card-badge {
    font-size: 48px;
    margin-bottom: 10px;
}

.vip-card-name {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.vip-card-points {
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
}

.vip-card-benefits {
    font-size: 12px;
    color: #666;
    line-height: 1.6;
    text-align: left;
}

/* VIP升级通知 */
.vip-levelup-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10002;
    animation: slideInRight 0.5s ease-out;
}

.vip-levelup-popup {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 350px;
}

.vip-badge-large {
    font-size: 64px;
}

.vip-levelup-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.vip-levelup-level {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 10px;
}

.vip-benefits-preview div {
    font-size: 13px;
    margin-bottom: 3px;
}

/* ==================== 动画 ==================== */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-out {
    animation: fadeOut 0.5s ease-out forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* ==================== 道具特效 ==================== */
/* 道具按钮激活动画 */
.power-up-activated {
    animation: powerUpActivate 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes powerUpActivate {
    0% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.2) rotate(-5deg);
    }
    50% {
        transform: scale(0.9) rotate(5deg);
    }
    75% {
        transform: scale(1.1) rotate(-3deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

/* 全屏特效蒙层 */
.power-up-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: effectFadeIn 0.3s ease-out;
}

@keyframes effectFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 特效图标 */
.power-up-effect .effect-icon {
    font-size: 120px;
    margin-bottom: 20px;
    animation: effectIconPulse 0.6s ease-in-out;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.8));
}

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

/* 特效文字 */
.power-up-effect .effect-text {
    font-size: 36px;
    font-weight: bold;
    color: white;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5),
                 0 0 20px rgba(255, 255, 255, 0.5);
    animation: effectTextSlide 0.5s ease-out 0.2s both;
}

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

/* 粒子特效 */
.power-up-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: particleFloat 1s ease-out forwards;
    box-shadow: 0 0 10px currentColor;
}

@keyframes particleFloat {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(0);
    }
}

/* 不同道具类型的特效背景 */
.power-up-effect-bomb {
    background: radial-gradient(circle at center, 
        rgba(255, 107, 107, 0.3) 0%, 
        rgba(255, 135, 135, 0.2) 30%, 
        transparent 70%);
}

/* ==================== 炸弹爆炸特效 ==================== */
.bomb-explosion-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center,
        rgba(255, 107, 107, 0.4) 0%,
        rgba(255, 135, 135, 0.3) 20%,
        rgba(255, 167, 77, 0.2) 40%,
        transparent 70%);
    animation: explosionFlash 0.5s ease-out;
}

@keyframes explosionFlash {
    0% {
        background: white;
    }
    10% {
        background: radial-gradient(circle at center,
            rgba(255, 255, 255, 0.9) 0%,
            rgba(255, 200, 100, 0.7) 30%,
            rgba(255, 107, 107, 0.4) 50%,
            transparent 70%);
    }
    100% {
        background: radial-gradient(circle at center,
            rgba(255, 107, 107, 0.4) 0%,
            rgba(255, 135, 135, 0.3) 20%,
            rgba(255, 167, 77, 0.2) 40%,
            transparent 70%);
    }
}

/* 爆炸中心 */
.explosion-center {
    position: relative;
    animation: explosionScale 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes explosionScale {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    30% {
        transform: scale(1.5);
        opacity: 1;
    }
    60% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 爆炸图标 */
.explosion-icon {
    font-size: 150px;
    animation: bombSpin 0.6s ease-out;
    filter: drop-shadow(0 0 30px rgba(255, 107, 107, 0.8))
            drop-shadow(0 0 60px rgba(255, 167, 77, 0.6));
}

@keyframes bombSpin {
    0% {
        transform: rotate(0deg) scale(0.5);
        filter: brightness(2);
    }
    50% {
        transform: rotate(180deg) scale(1.3);
    }
    100% {
        transform: rotate(360deg) scale(1);
        filter: brightness(1);
    }
}

/* 爆炸文字 */
.explosion-text {
    font-size: 42px;
    font-weight: bold;
    color: #ff6b6b;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.8),
                 0 0 20px rgba(255, 167, 77, 0.6),
                 0 0 30px rgba(255, 107, 107, 0.4),
                 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: explosionTextBounce 0.6s ease-out 0.3s both;
    margin-top: 30px;
}

@keyframes explosionTextBounce {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.5);
    }
    60% {
        transform: translateY(-10px) scale(1.1);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 冲击波 */
.shockwave {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    margin-left: -50px;
    margin-top: -50px;
    border: 3px solid rgba(255, 107, 107, 0.8);
    border-radius: 50%;
    animation: shockwaveExpand 1s ease-out forwards;
}

@keyframes shockwaveExpand {
    0% {
        transform: scale(0);
        opacity: 1;
        border-width: 8px;
    }
    50% {
        border-color: rgba(255, 167, 77, 0.6);
    }
    100% {
        transform: scale(15);
        opacity: 0;
        border-width: 1px;
    }
}

/* 爆炸粒子 */
.explosion-particle {
    position: absolute;
    border-radius: 50%;
    box-shadow: 0 0 10px currentColor,
                0 0 20px currentColor;
    animation: explosionParticleFloat 1.2s ease-out forwards;
    left: 50%;
    top: 50%;
}

@keyframes explosionParticleFloat {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    20% {
        opacity: 1;
        transform: translate(
            calc(-50% + var(--tx) * 0.3),
            calc(-50% + var(--ty) * 0.3)
        ) scale(1.2) rotate(calc(var(--rotate) * 0.3));
    }
    100% {
        opacity: 0;
        transform: translate(
            calc(-50% + var(--tx)),
            calc(-50% + var(--ty))
        ) scale(0) rotate(var(--rotate));
    }
}

/* 屏幕震动效果 */
.screen-shake {
    animation: screenShake 0.5s ease-in-out;
}

@keyframes screenShake {
    0%, 100% {
        transform: translate(0, 0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translate(-8px, 8px);
    }
    20%, 40%, 60%, 80% {
        transform: translate(8px, -8px);
    }
}

.power-up-effect-hint {
    background: radial-gradient(circle at center, 
        rgba(255, 212, 59, 0.3) 0%, 
        rgba(255, 224, 102, 0.2) 30%, 
        transparent 70%);
}

.power-up-effect-shuffle {
    background: radial-gradient(circle at center, 
        rgba(81, 207, 102, 0.3) 0%, 
        rgba(105, 219, 124, 0.2) 30%, 
        transparent 70%);
}

.power-up-effect-freeze {
    background: radial-gradient(circle at center, 
        rgba(116, 192, 252, 0.3) 0%, 
        rgba(145, 213, 255, 0.2) 30%, 
        transparent 70%);
}

.power-up-effect-double {
    background: radial-gradient(circle at center, 
        rgba(204, 93, 232, 0.3) 0%, 
        rgba(218, 119, 242, 0.2) 30%, 
        transparent 70%);
}

/* 特效淡出 */
.power-up-effect.fade-out {
    animation: effectFadeOut 0.3s ease-out forwards;
}

@keyframes effectFadeOut {
    to {
        opacity: 0;
    }
}

/* ==================== 响应式设计 ==================== */

/* iPad Pro 横屏优化 (1024px - 1366px) */
@media (min-width: 1024px) and (max-width: 1366px) {
    .shop-modal,
    .achievement-modal,
    .task-modal,
    .vip-modal {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    .shop-modal-content,
    .achievement-modal-content,
    .task-modal-content,
    .vip-modal-content {
        max-width: 850px;
    }
    
    .shop-header h2,
    .achievement-header h2,
    .task-header h2,
    .vip-header h2 {
        font-size: 32px;
    }
    
    .shop-items {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 22px;
    }
    
    .item-icon {
        font-size: 68px;
    }
    
    .achievement-icon {
        font-size: 52px;
    }
    
    .task-icon {
        font-size: 44px;
    }
    
    .vip-badge {
        font-size: 85px;
    }
    
    .vip-levels-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

/* iPad 竖屏优化 (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .shop-modal,
    .achievement-modal,
    .task-modal,
    .vip-modal {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    .shop-modal-content,
    .achievement-modal-content,
    .task-modal-content,
    .vip-modal-content {
        max-width: 700px;
        max-height: 90vh;
    }
    
    .shop-header,
    .achievement-header,
    .task-header,
    .vip-header {
        padding: 20px 25px;
    }
    
    .shop-header h2,
    .achievement-header h2,
    .task-header h2,
    .vip-header h2 {
        font-size: 26px;
    }
    
    .shop-items {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 18px;
    }
    
    .shop-item {
        padding: 18px;
    }
    
    .item-icon {
        font-size: 58px;
    }
    
    .item-name {
        font-size: 17px;
    }
    
    .achievement-icon {
        font-size: 46px;
    }
    
    .achievement-name {
        font-size: 17px;
    }
    
    .task-icon {
        font-size: 38px;
    }
    
    .task-name {
        font-size: 15px;
    }
    
    .vip-badge {
        font-size: 72px;
    }
    
    .vip-level-name {
        font-size: 26px;
    }
    
    .vip-levels-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
    
    .achievement-notification,
    .vip-levelup-notification {
        top: 70px;
        right: 15px;
    }
    
    .achievement-popup,
    .vip-levelup-popup {
        min-width: 280px;
        padding: 18px 22px;
    }
}

/* 手机端优化 */
@media (max-width: 767px) {
    .shop-modal,
    .achievement-modal,
    .task-modal,
    .vip-modal {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    .shop-modal-content,
    .achievement-modal-content,
    .task-modal-content,
    .vip-modal-content {
        width: 95%;
        max-height: 85vh;
    }
    
    .shop-header,
    .achievement-header,
    .task-header,
    .vip-header {
        padding: 18px 20px;
    }
    
    .shop-header h2,
    .achievement-header h2,
    .task-header h2,
    .vip-header h2 {
        font-size: 22px;
    }
    
    .shop-content,
    .achievement-list,
    .task-list,
    .vip-benefits-section,
    .vip-levels-section {
        padding: 18px;
    }
    
    .shop-items,
    .vip-levels-grid {
        grid-template-columns: 1fr;
    }
    
    .shop-item {
        padding: 16px;
    }
    
    .item-icon {
        font-size: 52px;
    }
    
    .item-name {
        font-size: 16px;
    }
    
    .achievement-icon {
        font-size: 40px;
    }
    
    .achievement-name {
        font-size: 16px;
    }
    
    .task-icon {
        font-size: 34px;
    }
    
    .task-name {
        font-size: 15px;
    }
    
    .vip-badge {
        font-size: 64px;
    }
    
    .vip-level-name {
        font-size: 24px;
    }
    
    .achievement-notification,
    .vip-levelup-notification {
        right: 10px;
        left: 10px;
        top: 60px;
    }
    
    .achievement-popup,
    .vip-levelup-popup {
        min-width: auto;
        width: 100%;
        padding: 16px 20px;
    }
    
    .achievement-badge,
    .vip-badge-large {
        font-size: 40px;
    }
}
