/* 组件样式文件 - 包含网络指示器和其他组件样式 */

/* 网络状态指示器样式 */
.network-indicator {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-color);
    z-index: 1000;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    user-select: none;
}

.network-indicator:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.network-indicator:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.network-indicator::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-color);
    animation: pulse 2s infinite;
    box-shadow: 0 0 8px rgba(255, 230, 109, 0.5);
}

.network-indicator.mainnet {
    border-color: #00ff88;
    color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
}

.network-indicator.mainnet::before {
    background-color: #00ff88;
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.5);
}

.network-indicator.devnet {
    border-color: #ffc107;
    color: #ffc107;
    background: rgba(255, 193, 7, 0.1);
}

.network-indicator.devnet::before {
    background-color: #ffc107;
    box-shadow: 0 0 8px rgba(255, 193, 7, 0.5);
}

.network-indicator.testnet {
    border-color: #4ecdc4;
    color: #4ecdc4;
    background: rgba(78, 205, 196, 0.1);
}

.network-indicator.testnet::before {
    background-color: #4ecdc4;
    box-shadow: 0 0 8px rgba(78, 205, 196, 0.5);
}

/* 网络提醒样式 */
.network-reminder {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid #ffc107;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    margin-top: 16px;
}

.network-reminder.mainnet {
    background: rgba(0, 255, 136, 0.1);
    border-color: #00ff88;
}

.network-reminder.devnet {
    background: rgba(255, 193, 7, 0.1);
    border-color: #ffc107;
}

.network-reminder.testnet {
    background: rgba(78, 205, 196, 0.1);
    border-color: #4ecdc4;
}

.network-reminder-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: #ffc107;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 12px;
}

.network-reminder.mainnet .network-reminder-icon {
    background: #00ff88;
    color: #000;
}

.network-reminder.devnet .network-reminder-icon {
    background: #ffc107;
    color: #000;
}

.network-reminder.testnet .network-reminder-icon {
    background: #4ecdc4;
    color: #000;
}

.network-reminder-content {
    flex: 1;
}

.network-reminder-title {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
    font-size: 14px;
}

.network-reminder-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    line-height: 1.4;
}

.network-reminder-text strong {
    color: var(--accent-color);
}

.network-reminder.mainnet .network-reminder-text strong {
    color: #00ff88;
}

.network-reminder.devnet .network-reminder-text strong {
    color: #ffc107;
}

.network-reminder.testnet .network-reminder-text strong {
    color: #4ecdc4;
}

/* 呼吸动画 */
.breathing {
    -webkit-animation:breathing 3s ease-in-out infinite;
    -moz-animation:breathing 3s ease-in-out infinite;
    -o-animation:breathing 3s ease-in-out infinite;
    animation: breathing 3s ease-in-out infinite;
    display: inline-block;
}

@keyframes breathing {
    0% {
        -webkit-transform: scale(1.2);
        -moz-transform: scale(1.2);
        -o-transform: scale(1.2);
        transform: scale(1.2);
     }
    50% {
        -webkit-transform: scale(1.6);
        -moz-transform: scale(1.6);
        -o-transform: scale(1.6);
        transform: scale(1.6); 
    }
    100% {
        -webkit-transform: scale(1.2);
        -moz-transform: scale(1.2);
        -o-transform: scale(1.2);
        transform: scale(1.2); 
    }
}

/* 响应式设计 */
/* 网络不匹配警告样式 */
.network-mismatch-warning {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ff4757, #ff3742);
    border: 2px solid #ff1e30;
    border-radius: 12px;
    padding: 16px 20px;
    color: white;
    z-index: 10000;
    min-width: 400px;
    max-width: 600px;
    box-shadow: 0 8px 32px rgba(255, 71, 87, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.network-mismatch-warning.show {
    top: 20px;
    animation: slideInBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideInBounce {
    0% {
        top: -100px;
        opacity: 0;
        transform: translateX(-50%) scale(0.8);
    }
    60% {
        top: 25px;
        transform: translateX(-50%) scale(1.05);
    }
    100% {
        top: 20px;
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
}

.network-mismatch-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    margin-top: 2px;
}

.network-mismatch-content {
    flex: 1;
}

.network-mismatch-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.network-mismatch-text {
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.95;
}

.network-mismatch-instruction {
    display: block;
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    font-weight: 600;
    border-left: 3px solid rgba(255, 255, 255, 0.4);
}

.network-mismatch-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s ease;
    margin-top: 2px;
}

.network-mismatch-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.network-mismatch-close:active {
    transform: scale(0.95);
}

/* 温和友好的网络提示 */
.gentle-network-hint {
    position: fixed;
    top: 80px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 18px;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 420px;
    max-width: 480px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 4px 8px rgba(0, 0, 0, 0.04);
    z-index: 1000;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.gentle-network-hint.show {
    transform: translateX(0);
    opacity: 1;
}

.hint-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
}

.hint-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hint-text {
    font-size: 16px;
    font-weight: 500;
    color: #374151;
    line-height: 1.3;
}

.hint-text strong {
    color: #111827;
    font-weight: 600;
}

.hint-subtext {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.2;
}

.hint-network-indicator {
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: relative;
}

.hint-network-indicator::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.2;
    animation: gentle-pulse 2s infinite;
}

@keyframes gentle-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.2;
    }
    50% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.hint-network-indicator.mainnet-beta {
    background: #10b981;
    color: #10b981;
}

.hint-network-indicator.devnet {
    background: #f59e0b;
    color: #f59e0b;
}

.hint-network-indicator.testnet {
    background: #3b82f6;
    color: #3b82f6;
}

/* 深色主题适配 */
@media (prefers-color-scheme: dark) {
    .gentle-network-hint {
        background: rgba(31, 41, 55, 0.95);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .hint-icon {
        background: linear-gradient(135deg, rgba(55, 65, 81, 0.8), rgba(75, 85, 99, 0.8));
        color: #9ca3af;
    }

    .hint-text {
        color: #e5e7eb;
    }

    .hint-text strong {
        color: #f9fafb;
    }

    .hint-subtext {
        color: #9ca3af;
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .network-indicator {
        top: 15px;
        left: 15px;
        padding: 6px 12px;
        font-size: 11px;
    }

    .network-mismatch-warning {
        left: 10px;
        right: 10px;
        transform: none;
        min-width: auto;
        max-width: none;
        padding: 14px 16px;
    }

    .network-mismatch-warning.show {
        top: 15px;
    }

    .network-mismatch-title {
        font-size: 14px;
    }

    .network-mismatch-text {
        font-size: 13px;
    }

    .network-mismatch-instruction {
        margin-top: 6px;
        padding: 6px 10px;
        font-size: 12px;
    }

    /* 温和提示移动端适配 */
    .gentle-network-hint {
        top: 15px;
        right: 15px;
        left: 15px;
        min-width: auto;
        max-width: none;
        padding: 15px 21px;
    }

    .hint-icon {
        width: 42px;
        height: 42px;
    }

    .hint-text {
        font-size: 14px;
    }

    .hint-subtext {
        font-size: 12px;
    }
} 