/* ========== 炫酷主题全局样式 ========== */

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --warning-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --info-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --dark-gradient: linear-gradient(135deg, #434343 0%, #000000 100%);
    --glass-bg: rgba(255,255,255,0.95);
    --glass-border: rgba(255,255,255,0.18);
    --shadow-sm: 0 4px 15px rgba(0,0,0,0.08);
    --shadow-md: 0 8px 32px rgba(0,0,0,0.1);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.15);
}

/* ========== 页面头部 ========== */
.page-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 20px;
    padding: 24px 32px;
    color: white;
    margin-bottom: 24px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}
.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(102,126,234,0.3) 0%, transparent 70%);
    animation: pulse-glow 4s ease-in-out infinite;
}
.page-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(17,153,142,0.2) 0%, transparent 70%);
    animation: pulse-glow 5s ease-in-out infinite reverse;
}
@keyframes pulse-glow {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}
.page-header h4, .page-header h5 {
    font-weight: 700;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}
.page-header p {
    opacity: 0.8;
    margin-bottom: 0;
    position: relative;
    z-index: 1;
}
.page-header .header-badge {
    background: linear-gradient(135deg, rgba(102,126,234,0.8) 0%, rgba(118,75,162,0.8) 100%);
    padding: 8px 18px;
    border-radius: 25px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    position: relative;
    z-index: 1;
}
.page-header .header-badge i { margin-right: 6px; }

/* 实时指示器 */
.live-dot {
    width: 8px; height: 8px;
    background: #38ef7d;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    animation: live-pulse 1.5s ease-in-out infinite;
}
@keyframes live-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(56,239,125,0.7); }
    50% { opacity: 0.8; box-shadow: 0 0 0 8px rgba(56,239,125,0); }
}

/* ========== 炫酷卡片 ========== */
.cool-card {
    background: var(--glass-bg);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}
.cool-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--card-accent, var(--primary-gradient));
    border-radius: 20px 20px 0 0;
}
.cool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
.cool-card .card-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}
.cool-card .card-title i {
    margin-right: 10px;
    width: 32px; height: 32px;
    background: var(--primary-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

/* ========== 统计卡片 ========== */
.stat-card-cool {
    background: var(--glass-bg);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.stat-card-cool::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: var(--stat-color, var(--primary-gradient));
}
.stat-card-cool:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-md);
}
.stat-card-cool .stat-icon {
    width: 50px; height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
    margin-bottom: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.stat-card-cool .stat-value {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #1a1a2e 0%, #434343 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-card-cool .stat-label {
    font-size: 13px;
    color: #6c757d;
    margin-top: 4px;
}
.stat-card-cool .stat-trend {
    font-size: 12px;
    margin-top: 8px;
    padding: 4px 10px;
    background: #f8f9fa;
    border-radius: 20px;
    display: inline-block;
}

/* ========== 炫酷表格 ========== */
.cool-table-wrapper {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.cool-table {
    margin-bottom: 0;
}
.cool-table thead th {
    background: linear-gradient(135deg, #f8fafc 0%, #e9ecef 100%);
    font-weight: 600;
    color: #1a1a2e;
    padding: 14px 16px;
    border: none;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.cool-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    transition: background 0.2s;
}
.cool-table tbody tr:hover td {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
}
.cool-table tbody tr:last-child td {
    border-bottom: none;
}

/* ========== 炫酷按钮 ========== */
.btn-cool {
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102,126,234,0.3);
}
.btn-cool:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102,126,234,0.4);
    color: white;
}
.btn-cool-success {
    background: var(--success-gradient);
    box-shadow: 0 4px 15px rgba(17,153,142,0.3);
}
.btn-cool-success:hover {
    box-shadow: 0 8px 25px rgba(17,153,142,0.4);
}
.btn-cool-warning {
    background: var(--warning-gradient);
    box-shadow: 0 4px 15px rgba(240,147,251,0.3);
}
.btn-cool-warning:hover {
    box-shadow: 0 8px 25px rgba(240,147,251,0.4);
}
.btn-cool-info {
    background: var(--info-gradient);
    box-shadow: 0 4px 15px rgba(79,172,254,0.3);
}
.btn-cool-info:hover {
    box-shadow: 0 8px 25px rgba(79,172,254,0.4);
}

/* ========== 炫酷徽章 ========== */
.badge-cool {
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
}
.badge-cool-primary {
    background: var(--primary-gradient);
    color: white;
}
.badge-cool-success {
    background: var(--success-gradient);
    color: white;
}
.badge-cool-warning {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #c05621;
}
.badge-cool-danger {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: #c53030;
}
.badge-cool-info {
    background: var(--info-gradient);
    color: white;
}

/* ========== 炫酷表单 ========== */
.form-control-cool {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 12px 16px;
    transition: all 0.3s ease;
    background: #fafafa;
}
.form-control-cool:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102,126,234,0.1);
    background: white;
}
.form-select-cool {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 12px 16px;
    transition: all 0.3s ease;
    background: #fafafa;
    cursor: pointer;
}
.form-select-cool:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102,126,234,0.1);
}

/* ========== 筛选栏 ========== */
.filter-bar {
    background: white;
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
.filter-bar .filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
}
.filter-bar label {
    font-size: 13px;
    font-weight: 600;
    color: #6c757d;
    white-space: nowrap;
}

/* ========== 状态指示器 ========== */
.status-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}
.status-dot.success { background: #38ef7d; }
.status-dot.warning { background: #f5576c; }
.status-dot.info { background: #4facfe; }
.status-dot.danger { background: #e53e3e; }

/* 脉冲动画状态点 */
.status-dot-pulse {
    position: relative;
}
.status-dot-pulse::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: inherit;
    opacity: 0.3;
    animation: status-pulse 2s ease-in-out infinite;
}
@keyframes status-pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.5); opacity: 0; }
}

/* ========== 进度条 ========== */
.progress-cool {
    height: 10px;
    border-radius: 10px;
    background: #e9ecef;
    overflow: hidden;
}
.progress-cool .progress-bar {
    border-radius: 10px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}
.progress-cool .progress-bar-primary { background: var(--primary-gradient); }
.progress-cool .progress-bar-success { background: var(--success-gradient); }
.progress-cool .progress-bar-warning { background: var(--warning-gradient); }
.progress-cool .progress-bar-info { background: var(--info-gradient); }

/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}
.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}
.empty-state h5 {
    font-weight: 600;
    margin-bottom: 10px;
}
.empty-state p {
    font-size: 14px;
}

/* ========== 加载动画 ========== */
.loading-cool {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}
.loading-cool .spinner {
    width: 40px; height: 40px;
    border: 3px solid #e9ecef;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== 动画效果 ========== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
.animate-fadeInUp { animation: fadeInUp 0.5s ease forwards; }
.animate-fadeInLeft { animation: fadeInLeft 0.5s ease forwards; }
.animate-fadeInRight { animation: fadeInRight 0.5s ease forwards; }
.animate-scaleIn { animation: scaleIn 0.4s ease forwards; }
.delay-1 { animation-delay: 0.1s; opacity: 0; }
.delay-2 { animation-delay: 0.2s; opacity: 0; }
.delay-3 { animation-delay: 0.3s; opacity: 0; }
.delay-4 { animation-delay: 0.4s; opacity: 0; }
.delay-5 { animation-delay: 0.5s; opacity: 0; }

/* ========== 悬浮操作按钮 ========== */
.action-btn-group {
    display: flex;
    gap: 6px;
}
.action-btn {
    width: 32px; height: 32px;
    border-radius: 8px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
.action-btn-view {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1976d2;
}
.action-btn-edit {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #f57c00;
}
.action-btn-delete {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #d32f2f;
}
.action-btn:hover {
    transform: scale(1.1);
}

/* ========== 模态框美化 ========== */
.modal-cool .modal-content {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.modal-cool .modal-header {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 20px 24px;
}
.modal-cool .modal-header .modal-title {
    font-weight: 700;
}
.modal-cool .modal-header .btn-close {
    filter: brightness(0) invert(1);
}
.modal-cool .modal-body {
    padding: 24px;
}
.modal-cool .modal-footer {
    border: none;
    padding: 16px 24px;
    background: #f8f9fa;
}

/* ========== 标签页美化 ========== */
.nav-tabs-cool {
    border: none;
    background: white;
    border-radius: 12px;
    padding: 6px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}
.nav-tabs-cool .nav-link {
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    color: #6c757d;
    transition: all 0.3s;
}
.nav-tabs-cool .nav-link:hover {
    color: #667eea;
    background: rgba(102,126,234,0.1);
}
.nav-tabs-cool .nav-link.active {
    background: var(--primary-gradient);
    color: white;
}

/* ========== 分页美化 ========== */
.pagination-cool {
    gap: 6px;
}
.pagination-cool .page-item .page-link {
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    color: #6c757d;
    font-weight: 600;
    transition: all 0.3s;
}
.pagination-cool .page-item .page-link:hover {
    background: rgba(102,126,234,0.1);
    color: #667eea;
}
.pagination-cool .page-item.active .page-link {
    background: var(--primary-gradient);
    color: white;
}

/* ========== 工具提示 ========== */
.tooltip-cool {
    position: relative;
}
.tooltip-cool::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a2e;
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}
.tooltip-cool:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: calc(100% + 8px);
}

/* ========== 移动端适配 ========== */
@media (max-width: 768px) {
    .page-header {
        padding: 16px 20px;
        border-radius: 12px;
    }
    .page-header h4, .page-header h5 {
        font-size: 1.1rem;
    }
    .cool-card {
        padding: 16px;
        border-radius: 12px;
    }
    .stat-card-cool {
        padding: 14px;
    }
    .stat-card-cool .stat-value {
        font-size: 24px;
    }
    .filter-bar {
        padding: 12px;
        gap: 8px;
    }
    .btn-cool {
        padding: 8px 16px;
        font-size: 13px;
    }
}
