/* 金蚂蚁财务分销系统自定义样式 */

:root {
    --primary-color: #4f46e5;
    --secondary-color: #6c757d;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --info-color: #0891b2;
    --light-color: #f8fafc;
    --dark-color: #1e293b;
    --hero-gradient-start: #667eea;
    --hero-gradient-end: #764ba2;
    --soft-blue: #e0e7ff;
    --soft-indigo: #e0e7ff;
}

/* 全局样式 */
body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* 英雄区域样式 */
.hero-section {
    background: linear-gradient(135deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero-section .btn {
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.hero-section .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* CTA区域样式 */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #6366f1 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    opacity: 0.3;
}

.cta-section .container {
    position: relative;
    z-index: 2;
}

.cta-section h2 {
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cta-section .btn {
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.cta-section .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* 优势区域样式 */
.advantages-section .card {
    border: 1px solid rgba(79, 70, 229, 0.1);
    transition: all 0.3s ease;
    border-radius: 1rem;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, var(--soft-indigo) 100%);
}

.advantages-section .card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.advantages-section .card .bi {
    transition: all 0.3s ease;
}

.advantages-section .card:hover .bi {
    transform: scale(1.1);
}

.advantages-section .card-body {
    padding: 2rem;
}

.advantages-section .card-title {
    color: var(--primary-color);
    font-weight: 600;
}

/* 导航栏样式 */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #fff !important;
}

/* 卡片样式 */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.3s ease;
}

/* 统计数据卡片样式 */
.stats-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, #6366f1 100%);
    border-radius: 1rem;
    padding: 2rem 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(79, 70, 229, 0.1);
    color: #ffffff;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.stats-icon {
    font-size: 3rem;
    color: #ffffff;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.stats-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.stats-label {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.9;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: var(--light-color);
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

/* 按钮样式 */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background-color: #4338ca;
    border-color: #4338ca;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* 表单样式 */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 600;
    color: #495057;
}

/* 表格样式 */
.table {
    border-radius: 0.375rem;
    overflow: hidden;
}

.table thead th {
    background-color: var(--light-color);
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.075);
}

/* 徽章样式 */
.badge {
    font-size: 0.75em;
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* 分页样式 */
.pagination .page-link {
    color: var(--primary-color);
    border-color: #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.pagination .page-link:hover {
    color: #0a58ca;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

/* 警告框样式 */
.alert {
    border: none;
    border-radius: 0.375rem;
    font-weight: 500;
}

/* 模态框样式 */
.modal-header {
    background-color: var(--light-color);
    border-bottom: 1px solid #dee2e6;
}

.modal-footer {
    background-color: var(--light-color);
    border-top: 1px solid #dee2e6;
}

/* 侧边栏样式 */
.sidebar {
    background-color: var(--light-color);
    border-right: 1px solid #dee2e6;
    min-height: calc(100vh - 56px);
}

.sidebar .nav-link {
    color: #495057;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin: 0.25rem 0.5rem;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background-color: var(--primary-color);
    color: #fff;
}

/* 统计卡片样式 - 已在上方统一定义 */

/* 产品卡片样式 */
.product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card .card-text {
    flex: 1;
}

.product-card .price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--success-color);
}

.product-card {
    border: 1px solid rgba(79, 70, 229, 0.1);
    transition: all 0.3s ease;
    border-radius: 1rem;
    overflow: hidden;
}

.product-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.product-card .card-body {
    padding: 2rem;
}

.product-card .card-title {
    color: var(--primary-color);
    font-weight: 600;
}

.product-card .features {
    list-style: none;
    padding-left: 0;
}

.product-card .features li {
    padding: 0.5rem 0;
    color: #6c757d;
    position: relative;
    padding-left: 1.5rem;
}

.product-card .features li:before {
    content: "✓";
    color: var(--success-color);
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0.5rem;
}

/* 会员等级样式 */
.level-badge {
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.level-badge:hover {
    transform: scale(1.05);
}

.levels-section .card {
    border: 1px solid rgba(79, 70, 229, 0.1);
    transition: all 0.3s ease;
    border-radius: 1rem;
    overflow: hidden;
}

.levels-section .card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.levels-section .card.border-primary {
    border-color: var(--primary-color) !important;
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.15);
}

.level-badge.bronze {
    background-color: #cd7f32;
    color: #fff;
}

.level-badge.silver {
    background-color: #c0c0c0;
    color: #333;
}

.level-badge.gold {
    background-color: #ffd700;
    color: #333;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .stats-card {
        padding: 1rem;
    }
    
    .stats-card .stats-number {
        font-size: 1.5rem;
    }
    
    .sidebar {
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid #dee2e6;
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* 页面滚动平滑效果 */
html {
    scroll-behavior: smooth;
}

/* 卡片进入动画 */
.card {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 统计数据卡片动画延迟 */
.stats-card:nth-child(1) { animation-delay: 0.1s; }
.stats-card:nth-child(2) { animation-delay: 0.2s; }
.stats-card:nth-child(3) { animation-delay: 0.3s; }

/* 产品卡片动画延迟 */
.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }

/* 优势卡片动画延迟 */
.advantages-section .card:nth-child(1) { animation-delay: 0.1s; }
.advantages-section .card:nth-child(2) { animation-delay: 0.2s; }
.advantages-section .card:nth-child(3) { animation-delay: 0.3s; }

/* 会员等级卡片动画延迟 */
.levels-section .card:nth-child(1) { animation-delay: 0.1s; }
.levels-section .card:nth-child(2) { animation-delay: 0.2s; }
.levels-section .card:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

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

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 工具提示样式 */
.tooltip {
    font-size: 0.875rem;
}

/* 下拉菜单样式 */
.dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 0.375rem;
}

.dropdown-item:hover {
    background-color: var(--light-color);
}

/* 进度条样式 */
.progress {
    height: 0.5rem;
    border-radius: 0.25rem;
}

.progress-bar {
    border-radius: 0.25rem;
}

/* 面包屑导航样式 */
.breadcrumb {
    background-color: transparent;
    padding: 0.75rem 0;
    margin-bottom: 1rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: #6c757d;
}

/* 标签样式 */
.tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    margin: 0.125rem;
    background-color: var(--light-color);
    border-radius: 0.25rem;
    font-size: 0.875rem;
    color: #495057;
}

/* 状态指示器 */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-indicator.online {
    background-color: var(--success-color);
}

.status-indicator.offline {
    background-color: var(--secondary-color);
}

.status-indicator.busy {
    background-color: var(--warning-color);
}
