/* 钱包验证样式 */

/* 钱包验证容器 */
.wallet-verification-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 30px auto;
    padding: 25px;
    max-width: 500px;
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.9), rgba(20, 20, 30, 0.95));
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 15px rgba(78, 68, 206, 0.2);
    position: relative;
    overflow: hidden;
    animation: container-glow 3s infinite alternate, container-pulse 4s ease-in-out infinite;
    border: 1px solid rgba(78, 68, 206, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: all 0.5s ease;
}

/* 添加背景动画效果 */
.wallet-verification-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(250, 68, 109, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(78, 68, 206, 0.15) 0%, transparent 50%),
        linear-gradient(45deg, rgba(78, 68, 206, 0.05) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(78, 68, 206, 0.05) 25%, transparent 25%);
    background-size: 100% 100%, 100% 100%, 20px 20px, 20px 20px;
    z-index: -1;
    animation: moveBackground 15s linear infinite, shimmer 3s ease-in-out infinite;
    opacity: 0.8;
}

@keyframes moveBackground {
    0% { background-position: 0 0; }
    100% { background-position: 60px 60px; }
}

@keyframes shimmer {
    0% {
        opacity: 0.7;
    }
    50% {
        opacity: 0.9;
    }
    100% {
        opacity: 0.7;
    }
}

@keyframes container-glow {
    0% {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 15px rgba(78, 68, 206, 0.2);
    }
    100% {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 25px rgba(250, 68, 109, 0.4);
    }
}

@keyframes container-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.01);
    }
    100% {
        transform: scale(1);
    }
}

/* 钱包按钮 */
.wallet-button {
    display: inline-block;
    padding: 15px 30px; /* 增加内边距使按钮更大 */
    margin: 15px 0; /* 增加外边距 */
    font-size: 18px; /* 增加字体大小 */
    font-weight: bold;
    text-align: center;
    color: #ffffff;
    background-color: #4e44ce;
    border: none;
    border-radius: 8px; /* 增加圆角 */
    cursor: pointer;
    transition: all 0.2s ease; /* 加快过渡效果 */
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); /* 增强阴影效果 */
    -webkit-tap-highlight-color: rgba(0,0,0,0); /* 移除移动设备上的点击高亮 */
    user-select: none; /* 防止文本被选中 */
    touch-action: manipulation; /* 优化触摸操作 */
    -webkit-appearance: none; /* 移除iOS默认按钮样式 */
    -moz-appearance: none;
    appearance: none;
    outline: none; /* 移除点击时的轮廓 */
}

.wallet-button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 70%);
    transform: scale(0);
    opacity: 0;
    transition: transform 0.5s, opacity 0.5s;
}

.wallet-button:hover {
    background-color: #3a33a8;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(78, 68, 206, 0.3);
}

.wallet-button:hover::before {
    transform: scale(1);
    opacity: 1;
}

.wallet-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 连接状态样式 */
.wallet-button.connected {
    background-color: #34c759;
    animation: connected-glow 3s infinite alternate;
}

.wallet-button.connected:hover {
    background-color: #2aa147;
}

@keyframes connected-glow {
    0% {
        box-shadow: 0 4px 8px rgba(52, 199, 89, 0.2);
    }
    100% {
        box-shadow: 0 4px 12px rgba(52, 199, 89, 0.5);
    }
}

/* 连接中状态 */
.wallet-button.connecting {
    background-color: #ff9500;
    animation: pulse 1.5s infinite;
}

/* 错误状态 */
.wallet-button.error {
    background-color: #ff3b30;
}

.wallet-button.error:hover {
    background-color: #d63128;
}

/* 钱包状态文本 */
.wallet-status-text {
    margin-top: 15px;
    font-size: 15px;
    color: #ffffff;
    text-align: center;
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.2), rgba(30, 30, 40, 0.3));
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    letter-spacing: 0.5px;
}

/* 钱包余额文本 */
.wallet-balance-text {
    margin-top: 15px;
    font-size: 16px;
    font-weight: bold;
    color: #34c759;
    text-align: center;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.1), rgba(52, 199, 89, 0.2));
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(52, 199, 89, 0.2);
    transition: all 0.3s ease;
    animation: balance-pulse 2s infinite alternate;
}

/* W3W称号样式 */
.w3w-tier {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #FA446D;
    text-shadow: 0 0 10px rgba(250, 68, 109, 0.3);
    letter-spacing: 1px;
}

/* W3W余额样式 */
.w3w-balance {
    font-size: 16px;
    color: #34c759;
}

@keyframes balance-pulse {
    0% {
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }
    100% {
        box-shadow: 0 4px 15px rgba(52, 199, 89, 0.3);
    }
}

/* 钱包图标样式 */
.wallet-icon {
    font-size: 36px;
    color: #4e44ce;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #4e44ce, #FA446D);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: icon-glow 3s infinite alternate;
}

@keyframes icon-glow {
    0% {
        text-shadow: 0 0 10px rgba(78, 68, 206, 0.3);
        transform: scale(1);
    }
    100% {
        text-shadow: 0 0 20px rgba(250, 68, 109, 0.5);
        transform: scale(1.05);
    }
}

/* 余额显示动画 */
.balance-display {
    border-radius: 4px;
    transition: all 0.3s ease;
    animation: balance-appear 0.5s ease;
}

@keyframes balance-appear {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 游戏卡片禁用状态 */
.game-card.disabled {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
    transition: all 0.3s ease;
}

/* 代币要求覆盖层 */
.token-required-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    z-index: 10;
    transition: all 0.3s ease;
}

.token-required-message {
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    padding: 10px 15px;
    background-color: rgba(255, 59, 48, 0.8);
    border-radius: 4px;
    max-width: 80%;
    box-shadow: 0 0 10px rgba(255, 59, 48, 0.3);
    animation: message-pulse 2s infinite;
}

/* 卡片解锁动画 */
.card-unlocked {
    animation: unlock-card 1s ease;
}

@keyframes unlock-card {
    0% {
        transform: scale(0.9);
        box-shadow: 0 0 0 rgba(52, 199, 89, 0);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px rgba(52, 199, 89, 0.7);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 5px rgba(52, 199, 89, 0.3);
    }
}

@keyframes message-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* 动画效果 */
@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .wallet-verification-container {
        padding: 10px;
        margin: 15px auto;
    }
    
    .wallet-button {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .wallet-status-text {
        font-size: 12px;
    }
}