/**
 * 音创·全自动网站更新系统 - 主样式表
 * 现代化、科技化、政务感设计风格
 */

:root {
    --primary-color: #1a3a52;
    --tech-blue: #0066cc;
    --pure-white: #ffffff;
    --light-gray: #f5f7fa;
    --neutral-gray: #909399;
    --accent-start: #409eff;
    --accent-end: #1890ff;
    --success-color: #67c23a;
    --warning-color: #e6a23c;
    --danger-color: #f56c6c;
    --shadow-light: 0 2px 12px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.12);
    --shadow-strong: 0 8px 30px rgba(0, 0, 0, 0.18);
    --border-radius: 6px;
    --border-radius-lg: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', '微软雅黑', 'PingFang SC', 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ed 100%);
    min-height: 100vh;
    color: #303133;
    line-height: 1.6;
}

/* 登录页面样式 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--tech-blue) 100%);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: float 30s linear infinite;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.login-box {
    background: var(--pure-white);
    padding: 50px 45px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-strong);
    width: 420px;
    position: relative;
    z-index: 1;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-logo {
    text-align: center;
    margin-bottom: 35px;
}

.login-logo .logo-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent-start) 0%, var(--accent-end) 100%);
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    box-shadow: 0 10px 30px rgba(64, 158, 255, 0.4);
    transform: perspective(100px) rotateX(5deg) rotateY(-5deg);
    transition: transform 0.3s ease;
}

.login-logo .logo-icon:hover {
    transform: perspective(100px) rotateX(0deg) rotateY(0deg);
}

.login-logo .logo-icon svg {
    width: 45px;
    height: 45px;
    fill: white;
}

.login-logo h1 {
    color: var(--primary-color);
    font-size: 26px;
    font-weight: 600;
    letter-spacing: 1px;
}

.login-logo p {
    color: var(--neutral-gray);
    font-size: 14px;
    margin-top: 8px;
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: #606266;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #dcdfe6;
    border-radius: var(--border-radius);
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fafafa;
}

.form-input:focus {
    outline: none;
    border-color: var(--tech-blue);
    background: var(--pure-white);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-input::placeholder {
    color: #c0c4cc;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-start) 0%, var(--accent-end) 100%);
    color: white;
    padding: 16px;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(64, 158, 255, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(64, 158, 255, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #5cb85c 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #e04040 100%);
    color: white;
}

.btn-default {
    background: var(--light-gray);
    color: #606266;
    border: 1px solid #dcdfe6;
}

.btn-default:hover {
    background: #e4e7ed;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

/* 主布局 */
.main-layout {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--primary-color) 0%, #0d2233 100%);
    color: white;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
}

.sidebar-logo {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent-start) 0%, var(--accent-end) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(64, 158, 255, 0.3);
    transform: perspective(50px) rotateX(2deg) rotateY(-2deg);
}

.sidebar-logo svg {
    width: 28px;
    height: 28px;
    fill: white;
}

.sidebar-title h2 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 3px;
}

.sidebar-title span {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 25px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    font-size: 14px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.nav-item.active {
    background: rgba(64, 158, 255, 0.2);
    color: var(--accent-start);
    border-left-color: var(--accent-start);
}

.nav-item svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 30px;
}

/* 顶部导航 */
.top-header {
    background: var(--pure-white);
    padding: 18px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.page-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--primary-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--accent-start) 0%, var(--accent-end) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.logout-btn {
    color: var(--neutral-gray);
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: var(--light-gray);
    color: var(--danger-color);
}

/* 卡片样式 */
.card {
    background: var(--pure-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
}

.card-header {
    padding: 18px 24px;
    border-bottom: 1px solid #ebeef5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--primary-color);
}

.card-body {
    padding: 24px;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: var(--pure-white);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow-light);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: perspective(50px) rotateX(3deg) rotateY(-3deg);
}

.stat-icon svg {
    width: 30px;
    height: 30px;
    fill: white;
}

.stat-icon.blue {
    background: linear-gradient(135deg, var(--accent-start) 0%, var(--accent-end) 100%);
    box-shadow: 0 8px 20px rgba(64, 158, 255, 0.35);
}

.stat-icon.green {
    background: linear-gradient(135deg, var(--success-color) 0%, #5cb85c 100%);
    box-shadow: 0 8px 20px rgba(103, 194, 58, 0.35);
}

.stat-icon.orange {
    background: linear-gradient(135deg, var(--warning-color) 0%, #d48806 100%);
    box-shadow: 0 8px 20px rgba(230, 162, 60, 0.35);
}

.stat-icon.navy {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0d2233 100%);
    box-shadow: 0 8px 20px rgba(26, 58, 82, 0.35);
}

.stat-info h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-info p {
    font-size: 14px;
    color: var(--neutral-gray);
}

/* 表格样式 */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 15px 18px;
    text-align: left;
    border-bottom: 1px solid #ebeef5;
}

.data-table th {
    background: var(--light-gray);
    font-weight: 600;
    color: #606266;
    font-size: 14px;
}

.data-table tr:hover {
    background: #fafbfc;
}

.data-table td {
    font-size: 14px;
    color: #303133;
}

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.success {
    background: rgba(103, 194, 58, 0.1);
    color: var(--success-color);
}

.status-badge.danger {
    background: rgba(245, 108, 108, 0.1);
    color: var(--danger-color);
}

.status-badge.warning {
    background: rgba(230, 162, 60, 0.1);
    color: var(--warning-color);
}

/* API Key显示 */
.api-key-display {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    background: var(--light-gray);
    padding: 6px 10px;
    border-radius: 4px;
    color: #606266;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--tech-blue);
    padding: 2px;
}

.copy-btn:hover {
    color: var(--accent-start);
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay.show {
    display: flex;
}

.modal-box {
    background: var(--pure-white);
    border-radius: var(--border-radius-lg);
    width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-strong);
    animation: modalSlide 0.3s ease-out;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #ebeef5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--neutral-gray);
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: var(--danger-color);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #ebeef5;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 消息提示 */
.alert {
    padding: 14px 18px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: rgba(103, 194, 58, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(103, 194, 58, 0.2);
}

.alert-error {
    background: rgba(245, 108, 108, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(245, 108, 108, 0.2);
}

/* 文件上传区域 */
.upload-zone {
    border: 2px dashed #dcdfe6;
    border-radius: var(--border-radius);
    padding: 50px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--tech-blue);
    background: rgba(0, 102, 204, 0.03);
}

.upload-zone svg {
    width: 60px;
    height: 60px;
    fill: var(--neutral-gray);
    margin-bottom: 15px;
}

.upload-zone p {
    color: #606266;
    font-size: 15px;
}

.upload-zone span {
    color: var(--tech-blue);
    font-weight: 500;
}

/* 文件列表 */
.file-list {
    margin-top: 20px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--light-gray);
    border-radius: var(--border-radius);
    margin-bottom: 10px;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-icon {
    width: 40px;
    height: 40px;
    background: var(--tech-blue);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-icon svg {
    width: 22px;
    height: 22px;
    fill: white;
}

.file-name {
    font-size: 14px;
    color: #303133;
    font-weight: 500;
}

.file-size {
    font-size: 12px;
    color: var(--neutral-gray);
}

/* 日志列表 */
.log-item {
    padding: 15px 0;
    border-bottom: 1px solid #ebeef5;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.log-item:last-child {
    border-bottom: none;
}

.log-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.log-icon.success {
    background: rgba(103, 194, 58, 0.1);
    color: var(--success-color);
}

.log-icon.error {
    background: rgba(245, 108, 108, 0.1);
    color: var(--danger-color);
}

.log-content {
    flex: 1;
}

.log-message {
    font-size: 14px;
    color: #303133;
    margin-bottom: 4px;
}

.log-time {
    font-size: 12px;
    color: var(--neutral-gray);
}

/* 操作按钮组 */
.action-btns {
    display: flex;
    gap: 8px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }
    
    .sidebar-title,
    .nav-item span {
        display: none;
    }
    
    .main-content {
        margin-left: 70px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .login-box {
        width: 90%;
        padding: 30px 25px;
    }
}

/* 进度条 */
.progress-bar {
    height: 6px;
    background: #ebeef5;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-start) 0%, var(--accent-end) 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--neutral-gray);
}

.empty-state svg {
    width: 80px;
    height: 80px;
    fill: #dcdfe6;
    margin-bottom: 15px;
}

.empty-state p {
    font-size: 15px;
}

/* 表单行内布局 */
.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 14px 20px;
    background: var(--primary-color);
    color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    z-index: 2000;
    animation: toastSlide 0.3s ease-out;
}

@keyframes toastSlide {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success {
    background: var(--success-color);
}

.toast.error {
    background: var(--danger-color);
}
