/* 
 * 服务器资产管理平台 - 前台样式
 * 风格：科技感 + 专业 + 简洁 + 可信赖
 */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(180deg, #f0f4ff 0%, #ffffff 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部导航 */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
}

.logo-text {
    font-size: 18px;
    font-weight: 600;
}

/* 主区域 */
.hero {
    text-align: center;
    padding: 80px 20px;
    background: var(--gradient-primary);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.hero p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 40px;
}

/* 查询表单 */
.search-box {
    background: white;
    border-radius: var(--radius-lg);
    padding: 8px;
    display: flex;
    gap: 8px;
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    margin: 0 auto;
}

.search-box input {
    flex: 1;
    border: none;
    padding: 16px 20px;
    font-size: 16px;
    outline: none;
    border-radius: var(--radius-md);
    background: var(--light-color);
}

.search-box input::placeholder {
    color: var(--text-secondary);
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--light-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

/* 提示信息 */
.tips {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 16px 24px;
    margin-top: 30px;
    display: inline-block;
    font-size: 14px;
    backdrop-filter: blur(5px);
}

.tips-icon {
    margin-right: 8px;
}

/* 内容区域 */
.content-section {
    padding: 60px 0;
}

/* 功能卡片网格 */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card .card-body {
    text-align: center;
    padding: 40px 24px;
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
}

.feature-icon.blue {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.feature-icon.green {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.feature-icon.yellow {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.feature-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.card-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.card-body {
    padding: 24px;
}

/* 服务器信息展示 */
.server-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.info-item {
    padding: 20px;
    background: var(--light-color);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-color);
}

.info-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.info-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.info-value.warning {
    color: var(--warning-color);
}

.info-value.danger {
    color: var(--danger-color);
}

.info-value.success {
    color: var(--success-color);
}

/* 配置信息 */
.config-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.config-item {
    text-align: center;
    padding: 16px;
    background: var(--light-color);
    border-radius: var(--radius-md);
}

.config-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.config-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.config-value {
    font-size: 16px;
    font-weight: 600;
}

/* 续费操作区 */
.renew-action {
    margin-top: 30px;
    padding: 24px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.renew-text h4 {
    font-size: 16px;
    color: var(--dark-color);
    margin-bottom: 4px;
}

.renew-text p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* 弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--light-color);
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* 续费周期选择 */
.period-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.period-option {
    padding: 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.period-option:hover {
    border-color: var(--primary-light);
}

.period-option.selected {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.period-name {
    font-weight: 500;
}

.period-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.period-price span {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-secondary);
}

/* USDT支付页面 */
.payment-info {
    text-align: center;
}

.qrcode-box {
    width: 200px;
    height: 200px;
    margin: 20px auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.qrcode-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.wallet-address {
    background: var(--light-color);
    padding: 16px;
    border-radius: var(--radius-md);
    margin: 16px 0;
    word-break: break-all;
    font-family: monospace;
    font-size: 14px;
}

.copy-btn {
    margin-top: 8px;
    padding: 8px 16px;
    font-size: 13px;
}

.payment-amount {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 20px 0;
}

.payment-amount span {
    font-size: 16px;
    color: var(--text-secondary);
}

.payment-notice {
    background: #fef3c7;
    padding: 16px;
    border-radius: var(--radius-md);
    margin-top: 20px;
    text-align: left;
}

.payment-notice h5 {
    color: var(--warning-color);
    margin-bottom: 8px;
    font-size: 14px;
}

.payment-notice ul {
    font-size: 13px;
    color: var(--text-secondary);
    padding-left: 20px;
}

.payment-notice li {
    margin-bottom: 4px;
}

.network-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

/* 邮箱绑定 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 15px;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-hint {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 6px;
}

.input-group {
    display: flex;
    gap: 8px;
}

.input-group .form-input {
    flex: 1;
}

/* 状态提示 */
.status-box {
    padding: 24px;
    border-radius: var(--radius-md);
    text-align: center;
}

.status-box.pending {
    background: #fef3c7;
}

.status-box.success {
    background: #d1fae5;
}

.status-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.status-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.status-desc {
    font-size: 14px;
    color: var(--text-secondary);
}

/* 页脚 */
.footer {
    background: var(--dark-color);
    color: rgba(255, 255, 255, 0.7);
    padding: 40px 0;
    text-align: center;
    font-size: 14px;
}

/* 响应式 */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 28px;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .config-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .renew-action {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
}


/* 状态标签 */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-secondary { background: #e2e8f0; color: #475569; }

/* 高级支付弹窗样式 */
.payment-modal {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    width: 380px;
    max-width: 90vw;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.payment-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #7c3aed, #2563eb);
    background-size: 200% 100%;
    animation: gradientMove 3s ease infinite;
}

@keyframes gradientMove {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.payment-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s;
    z-index: 10;
}

.payment-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1e293b;
}

.payment-header {
    padding: 24px 24px 16px;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}

.payment-amount-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    margin-bottom: 8px;
}

.amount-value {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.amount-unit {
    font-size: 16px;
    font-weight: 600;
    color: #64748b;
}

.network-tag {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.payment-content {
    padding: 20px;
}

.payment-qr-section {
    text-align: center;
}

.qr-wrapper {
    width: 140px;
    height: 140px;
    margin: 0 auto 16px;
    padding: 8px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.qr-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.address-section {
    margin-top: 12px;
}

.address-label {
    font-size: 11px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.address-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 10px 12px;
}

.address-text {
    flex: 1;
    font-size: 11px;
    font-family: 'Monaco', 'Consolas', monospace;
    color: #475569;
    word-break: break-all;
    line-height: 1.4;
}

.copy-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: none;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    color: #2563eb;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.copy-icon:hover {
    background: #2563eb;
    color: white;
    transform: scale(1.05);
}

.payment-tips {
    margin-top: 16px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(124, 58, 237, 0.05));
    border-radius: 10px;
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #64748b;
    padding: 4px 0;
}

.tip-item i {
    color: #10b981;
    font-size: 10px;
}

.payment-actions {
    display: flex;
    gap: 10px;
    padding: 16px 20px 20px;
    border-top: 1px solid #e2e8f0;
}

.btn-cancel {
    flex: 1;
    padding: 12px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn-confirm {
    flex: 2;
    padding: 12px;
    border: none;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}
