/* 全局样式变量 */
:root {
    --primary-color: #10b981;
    --primary-dark: #059669;
    --secondary-color: #f1f5f9;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --border-radius-lg: 24px;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --box-shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    --gradient-primary: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-secondary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #667eea 100%);
}

/* 重置和基础样式 */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gradient-secondary);
    min-height: 100vh;
    line-height: 1.6;
    font-weight: 400;
    color: var(--dark-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 容器样式 */
.container-fluid {
    background: var(--light-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin: 2rem auto;
    max-width: 1200px;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 1.5rem;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

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

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

/* 增强按钮样式 */
.btn {
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn::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;
}

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

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(16, 185, 129, 0.4);
    color: white;
}

.btn-success {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(16, 185, 129, 0.4);
    color: white;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    color: white;
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(245, 158, 11, 0.4);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(239, 68, 68, 0.4);
    color: white;
}

/* 表单样式增强 */
.form-control, .form-select {
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius-sm);
    padding: 0.75rem 1rem;
    transition: var(--transition);
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-group-text {
    background: rgba(248, 250, 252, 0.8);
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius-sm);
    color: #64748b;
    font-weight: 500;
}

/* 导航栏增强 */
.navbar-custom {
    background: rgba(30, 41, 59, 0.95) !important;
    backdrop-filter: blur(20px);
    padding: 1rem 0;
    box-shadow: var(--box-shadow);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 700;
    color: white !important;
    font-family: 'Poppins', sans-serif;
}

.nav-link {
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

/* 统计卡片增强 */
.stats-card {
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--box-shadow);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

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

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

.stats-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px -10px rgba(16, 185, 129, 0.3);
}

.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    display: block;
    position: relative;
    z-index: 2;
}

.stats-label {
    font-size: 0.9rem;
    opacity: 0.9;
    position: relative;
    z-index: 2;
}

/* 子站点卡片增强 */
.site-card {
    border: none;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.site-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.2);
}

.site-card .card-body {
    padding: 1.5rem;
    position: relative;
}

.site-title {
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.1rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-title:hover {
    color: var(--primary-dark);
    transform: translateX(5px);
}

/* 管理面板增强 */
.manage-panel {
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: 1rem;
    border-left: 4px solid var(--primary-color);
    border: 1px solid rgba(226, 232, 240, 0.5);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 表格样式增强 */
.table {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
}

.table thead th {
    background: var(--gradient-primary);
    color: white;
    border: none;
    font-weight: 600;
    padding: 1rem;
    position: relative;
}

.table tbody tr {
    transition: var(--transition-fast);
}

.table tbody tr:nth-child(even) {
    background-color: rgba(248, 250, 252, 0.5);
}

.table tbody tr:hover {
    background-color: rgba(16, 185, 129, 0.05);
    transform: scale(1.01);
}

/* 徽章样式增强 */
.badge {
    border-radius: 6px;
    font-weight: 500;
    padding: 0.5em 0.75em;
    font-size: 0.75em;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.badge-custom {
    background: var(--gradient-primary);
    color: white;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-weight: 600;
    box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.3);
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-left: 10px;
}

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

/* 提示工具增强 */
.tooltip-custom {
    position: relative;
    cursor: help;
}

.tooltip-custom:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    white-space: nowrap;
    font-size: 0.875rem;
    z-index: 1000;
    box-shadow: var(--box-shadow);
}

/* 警告框增强 */
.alert {
    border-radius: var(--border-radius);
    border: none;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
    border-left: 4px solid var(--primary-color);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border-left: 4px solid var(--warning-color);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    border-left: 4px solid var(--info-color);
}

/* 响应式设计优化 */
@media (max-width: 768px) {
    .container-fluid {
        margin: 1rem;
        border-radius: var(--border-radius-sm);
    }

    .stats-number {
        font-size: 2rem;
    }

    .card-body {
        padding: 1rem;
    }

    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .navbar-brand {
        font-size: 1.5rem;
    }

    .hero-title {
        font-size: 2rem !important;
    }

    .feature-card {
        padding: 1.5rem !important;
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .login-card {
        margin: 0.5rem !important;
        border-radius: var(--border-radius) !important;
    }

    .stats-card {
        padding: 1.5rem;
    }

    .manage-panel {
        padding: 1rem;
    }
}

/* 深色主题支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --dark-color: #f8fafc;
        --light-color: #1e293b;
    }
}

/* 减少动画效果（无障碍支持） */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 打印样式 */
@media print {
    .navbar,
    .btn,
    .floating-elements,
    .floating-shapes {
        display: none !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* 选择文本样式 */
::selection {
    background: rgba(16, 185, 129, 0.2);
    color: var(--dark-color);
}

::-moz-selection {
    background: rgba(16, 185, 129, 0.2);
    color: var(--dark-color);
} 