/**
 * 星云IDC - 自定义样式
 */

/* ===== 基础样式 ===== */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
}

/* ===== Hero区域渐变 ===== */
.hero-gradient {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 30%, #4f46e5 60%, #7c3aed 100%);
}

.hero-card-gradient {
    background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.04) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
}

/* ===== 产品卡片悬浮效果 ===== */
.product-card {
    transition: all 0.3s ease;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* ===== 按钮平滑过渡 ===== */
.btn-primary {
    transition: all 0.2s ease;
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* ===== AI算力卡片渐变 ===== */
.ai-card {
    background: linear-gradient(135deg, #faf5ff 0%, #eff6ff 100%);
    border: 1px solid #e0e7ff;
}

/* ===== 价格标签划线动画 ===== */
.price-strikethrough {
    position: relative;
    color: #9ca3af;
}

/* ===== 表格斑马纹 ===== */
.table-striped tbody tr:nth-child(odd) {
    background-color: #f9fafb;
}
.table-striped tbody tr:hover {
    background-color: #eff6ff;
}

/* ===== 滚到顶部按钮 ===== */
.scroll-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 40;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

/* ===== 管理后台侧边栏 ===== */
.admin-sidebar {
    min-height: calc(100vh - 64px);
}
.admin-sidebar a.active {
    background-color: #eff6ff;
    color: #2563eb;
    font-weight: 600;
}

/* ===== 统计卡片 ===== */
.stat-card {
    transition: all 0.2s ease;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

/* ===== 登录/注册表单 ===== */
.auth-form {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

/* ===== 空状态 ===== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #9ca3af;
}

/* ===== 移动端优化 ===== */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    .hero-section p {
        font-size: 0.95rem;
    }
    .product-card-grid {
        grid-template-columns: 1fr;
    }
    .admin-sidebar {
        display: none;
    }
    .admin-sidebar.open {
        display: block;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        z-index: 50;
        background: white;
        border-bottom: 1px solid #e5e7eb;
    }
}

/* ===== 规格标签 ===== */
.spec-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background: #f3f4f6;
    border-radius: 9999px;
    font-size: 0.75rem;
    color: #374151;
    font-weight: 500;
}

/* ===== 加载动画 ===== */
.loading-spinner {
    border: 3px solid #e5e7eb;
    border-top: 3px solid #2563eb;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== 通知/提示条 ===== */
.toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 100;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
