/**
 * 钱包选择模态窗样式
 */

/* 模态窗背景 */
.wallet-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* 模态窗内容 */
.wallet-modal-content {
    position: relative;
    background: var(--bg-glass);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    max-width: 500px;
    width: 90%;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-glow);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 模态窗头部 */
.wallet-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--border-primary);
}

.wallet-modal-header h3 {
    margin: 0;
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
}

.wallet-close-btn {
    background: none;
    border: none;
    font-size: var(--font-size-2xl);
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--space-2);
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wallet-close-btn:hover {
    background: var(--bg-glass-strong);
    color: var(--text-primary);
    transform: scale(1.1);
}

/* 钱包选项 */
.wallet-option {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-3);
    cursor: pointer;
    transition: all var(--transition-normal);
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.wallet-option:hover {
    border-color: var(--border-accent);
    background: var(--bg-glass-strong);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.wallet-option:last-child {
    margin-bottom: 0;
}

/* 钱包图标 */
.wallet-icon {
    font-size: var(--font-size-3xl);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-accent);
    border-radius: var(--radius-lg);
    flex-shrink: 0;
}

/* 钱包信息 */
.wallet-info {
    flex: 1;
}

.wallet-info h4 {
    margin: 0 0 var(--space-1) 0;
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
}

.wallet-info p {
    margin: 0;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

/* 钱包状态 */
.wallet-status {
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    background: var(--gradient-accent);
    color: white;
    flex-shrink: 0;
}

.wallet-option[data-type="browser"] .wallet-status {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.wallet-option[data-type="browser"]:has(#browser-wallet-status:contains("未安装")) .wallet-status {
    background: rgba(255, 165, 0, 0.1);
    color: #ffa500;
    border: 1px solid rgba(255, 165, 0, 0.3);
}

/* 安装消息 */
.install-message {
    text-align: center;
    margin-bottom: var(--space-6);
    padding: var(--space-4);
    background: rgba(255, 165, 0, 0.1);
    border: 1px solid rgba(255, 165, 0, 0.3);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.install-icon {
    font-size: var(--font-size-4xl);
    margin-bottom: var(--space-3);
}

.install-message p {
    margin: 0;
    color: var(--text-secondary);
    font-size: var(--font-size-base);
}

/* 钱包安装选项 */
.wallet-install-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

.install-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.install-option:hover {
    border-color: var(--border-accent);
    background: var(--bg-glass-strong);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.install-option img {
    border-radius: var(--radius-md);
}

.install-option span {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
    text-align: center;
}

/* 模态窗操作按钮 */
.modal-actions {
    display: flex;
    gap: var(--space-3);
    justify-content: flex-end;
}

.modal-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    border: none;
    border-radius: var(--radius-lg);
    font-weight: var(--font-weight-medium);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.modal-actions .btn-accent {
    background: var(--gradient-accent);
    color: white;
    box-shadow: var(--shadow-glow);
}

.modal-actions .btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-strong);
}

.modal-actions .btn-secondary {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
    backdrop-filter: blur(20px);
}

.modal-actions .btn-secondary:hover {
    background: var(--bg-glass-strong);
    border-color: var(--border-accent);
}

/* 连接状态指示器 */
.wallet-connection-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--bg-glass);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.wallet-indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.wallet-indicator-connecting {
    background: #ffa500;
    animation: pulse 1.5s ease-in-out infinite alternate;
}

.wallet-indicator-connected {
    background: var(--text-accent);
}

.wallet-indicator-disconnected {
    background: #ff4757;
}

/* 钱包类型徽章 */
.wallet-type-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-2);
    background: var(--gradient-secondary);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
}

.wallet-type-badge.browser {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.wallet-type-badge.walletconnect {
    background: rgba(79, 172, 254, 0.1);
    color: var(--text-accent);
    border: 1px solid var(--border-accent);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .wallet-modal-content {
        margin: var(--space-4);
        padding: var(--space-6);
    }
    
    .wallet-install-options {
        grid-template-columns: 1fr;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .wallet-option {
        flex-direction: column;
        text-align: center;
        gap: var(--space-3);
    }
    
    .wallet-info {
        order: 1;
    }
    
    .wallet-status {
        order: 2;
    }
    
    .wallet-icon {
        order: 0;
        width: 40px;
        height: 40px;
        font-size: var(--font-size-2xl);
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    .wallet-modal-content,
    .wallet-option,
    .install-option {
        border-width: 2px;
    }
    
    .wallet-close-btn,
    .modal-actions .btn {
        border-width: 2px;
    }
}

/* 动画优化 */
@media (prefers-reduced-motion: reduce) {
    .wallet-modal-content,
    .wallet-option,
    .install-option,
    .wallet-close-btn,
    .modal-actions .btn {
        animation: none;
        transition: none;
    }
    
    .wallet-option:hover,
    .install-option:hover,
    .modal-actions .btn:hover {
        transform: none;
    }
}
