/**
 * 后台管理系统样式
 * 淡蓝到深蓝渐变主题
 */

/* 导入 Google Fonts - Noto Sans SC (思源黑体) - 支持中文 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #6fb5ff;
    --secondary: #8fb2ff;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #6fb5ff;
    --light: #f8fafc;
    --dark: #1f2937;
    --gradient: linear-gradient(135deg, #6fb5ff 0%, #8fb2ff 100%);
    --gradient-success: linear-gradient(135deg, #7ed67e 0%, #5cb85c 100%);
    --font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', '微软雅黑', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
}

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

html, body {
    font-family: var(--font-family);
}

/* 确保所有元素都使用字体 */
*, *::before, *::after {
    font-family: inherit;
}

body {
    background: #f8f9fa;
    color: #333;
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease-out;
    border: none;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(111, 181, 255, 0.1), transparent);
    transition: left 0.5s;
}

.card:hover::before {
    left: 100%;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 10px 30px rgba(111, 181, 255, 0.25);
    border-color: transparent;
}

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

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}


.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
    font-family: var(--font-family);
}

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

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(111, 181, 255, 0.4);
}

.btn-primary:active {
    transform: translateY(-1px) scale(1.02);
}

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

.btn-success:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

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

.btn-danger:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

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

.btn-info:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(111, 181, 255, 0.4);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.table th {
    background: linear-gradient(135deg, #6fb5ff 0%, #8fb2ff 100%);
    color: white;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.table th::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.table th:hover::before {
    left: 100%;
}

.table tr {
    transition: all 0.3s ease;
}

.table tr:hover {
    background: rgba(111, 181, 255, 0.05);
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(111, 181, 255, 0.1);
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    font-family: var(--font-family);
}

input, textarea, select, button {
    font-family: var(--font-family);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(111, 181, 255, 0.2);
    transform: scale(1.02);
}

/* 统计卡片 */
.stat-card {
    background: var(--gradient);
    color: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(111, 181, 255, 0.3);
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

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

.stat-card:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 15px 35px rgba(111, 181, 255, 0.4);
}

.stat-card.success-gradient {
    background: var(--gradient-success);
    box-shadow: 0 5px 15px rgba(126, 214, 126, 0.3);
}

.stat-card.success-gradient:hover {
    box-shadow: 0 15px 35px rgba(126, 214, 126, 0.4);
}

/* 设置卡片样式 */
.setting-card {
    transition: all 0.3s ease;
}

.setting-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(72, 209, 204, 0.25);
    border-color: #48d1cc;
}

.stat-icon {
    display: block;
    text-align: center;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: white;
    margin: 10px 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    animation: countUp 1s ease-out;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.stat-label {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

/* 统计卡片中的数字样式 */
.stats-item > div:last-child > div > div:last-child {
    transition: all 0.3s ease;
    display: inline-block;
}

.stats-item:hover > div:last-child > div > div:last-child {
    transform: scale(1.1);
    color: var(--primary) !important;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.3s;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 20px 60px rgba(111, 181, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient);
    transform: scaleX(0);
    transform-origin: left;
    animation: expandWidth 0.5s ease-out 0.2s both;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: var(--font-family);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--danger);
}

/* 标签样式 */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.badge::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.badge:hover::before {
    width: 300px;
    height: 300px;
}

.badge:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* 响应式布局 */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: -10px;
    animation: fadeIn 0.8s ease-out;
}

.col {
    flex: 1;
    padding: 10px;
    min-width: 0;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.col:nth-child(1) { animation-delay: 0.1s; }
.col:nth-child(2) { animation-delay: 0.2s; }
.col:nth-child(3) { animation-delay: 0.3s; }
.col:nth-child(4) { animation-delay: 0.4s; }

.col-3 {
    flex: 0 0 33.333%;
    max-width: 33.333%;
    padding: 10px;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.col-3:nth-child(1) { animation-delay: 0.1s; }
.col-3:nth-child(2) { animation-delay: 0.2s; }
.col-3:nth-child(3) { animation-delay: 0.3s; }

@media (max-width: 1200px) {
    .col-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 768px) {
    .col-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-icon {
        font-size: 40px !important;
    }
    
    .stat-value {
        font-size: 30px;
    }
}

@media (max-width: 480px) {
    .stat-card {
        padding: 15px;
    }
    
    .stat-icon {
        font-size: 36px !important;
    }
    
    .stat-value {
        font-size: 28px;
    }
}

/* 统计卡片合并样式增强 */
.stats-combined-card {
    position: relative;
    overflow: hidden;
}

.stats-combined-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(111, 181, 255, 0.1), transparent);
    transition: left 0.6s;
}

.stats-combined-card:hover::after {
    left: 100%;
}

.stats-combined-card .stats-item {
    position: relative;
    transition: all 0.3s ease;
}

.stats-combined-card .stats-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(111, 181, 255, 0.05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.stats-combined-card .stats-item:hover::before {
    opacity: 1;
}

.stats-combined-card .stats-item:hover {
    transform: translateY(-3px);
}

/* 页面加载动画 */
@keyframes pageLoad {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-main {
    animation: pageLoad 0.6s ease-out;
}

