* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-image: url('beijing.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    position: relative;
    min-height: 100vh;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: -1;
}

/* 侧边栏 */
.sidebar {
    width: 200px;
    background: linear-gradient(180deg, #1e3a5f 0%, #2d4a6f 100%);
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    box-shadow: 2px 0 12px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h1 {
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.sidebar-header p {
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
}

.sidebar-nav {
    flex: 1;
    padding: 10px 0;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    position: relative;
}

.sidebar-nav li.nav-title {
    padding: 10px 20px;
    color: rgba(255,255,255,0.4);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-nav a {
    display: block;
    padding: 12px 20px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.25s ease;
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
    background: rgba(255,255,255,0.1);
    color: #ffffff;
    border-left-color: #60a5fa;
    padding-left: 23px;
}

.sidebar-nav li:last-child {
    margin-top: auto;
}

.sidebar-nav li:last-child a {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 14px 20px;
    text-align: center;
    font-weight: 600;
    border-radius: 0;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(239,68,68,0.3);
}

.sidebar-nav li:last-child a:hover {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    border-left-color: transparent;
    padding-left: 20px;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(239,68,68,0.4);
}

/* 主内容区 */
main {
    margin-left: 200px;
    padding: 2rem;
    min-height: 100vh;
}

/* 顶部导航栏 */
.header-bar {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d4a6f 100%);
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.header-bar .left-section {
    flex: 1;
}

.header-bar .center-section {
    flex: 2;
    text-align: center;
}

.header-bar .right-section {
    flex: 1;
    text-align: right;
}

.header-bar .home-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 6px;
    background: rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.header-bar .home-link:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

.header-bar .page-title {
    color: rgba(255,255,255,0.9);
    font-size: 15px;
    font-weight: 500;
}

.header-bar .logout-link {
    color: #ff8787;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    background: rgba(255,135,135,0.15);
    transition: all 0.3s ease;
}

.header-bar .logout-link:hover {
    background: rgba(255,135,135,0.25);
    color: #ffa8a8;
}

/* 主内容区 */
main {
    padding: 2rem;
    min-height: 100vh;
}

/* 欢迎区域 */
.welcome-section {
    text-align: center;
    margin-bottom: 3rem;
}

.welcome-section h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
}

.welcome-section p {
    font-size: 1.1rem;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
}

/* 卡片网格 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.card {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

.card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.card p {
    font-size: 1rem;
    color: #666;
    line-height: 1.5;
}

/* 系统信息区域 */
.system-info {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-top: 2rem;
}

.system-info p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
}

.btn:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.btn-danger {
    background-color: #ef4444;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-secondary {
    background-color: #6b7280;
}

.btn-secondary:hover {
    background-color: #4b5563;
}

/* 消息提示 */
.message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.success {
    border-left: 4px solid #10b981;
    color: #065f46;
}

.error {
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

/* 结果容器 */
.result-container {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-top: 2rem;
}

.result-container h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

th {
    background-color: #333;
    color: #fff;
    font-weight: 600;
}

tr:hover {
    background-color: rgba(59, 130, 246, 0.05);
}

/* 搜索表单 */
.search-form {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
}

.search-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 1rem;
}

.search-form button {
    padding: 0.75rem 1.5rem;
    background-color: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.search-form button:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 主内容区调整 */
    main {
        padding: 1rem;
    }
    
    /* 卡片和表单调整 */
    .card {
        padding: 1.5rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.9rem;
    }
    
    /* 表格调整 */
    table {
        font-size: 0.85rem;
    }
    
    th, td {
        padding: 10px 12px;
    }
    
    /* 搜索表单调整 */
    .search-form {
        flex-direction: column;
    }
    
    /* 卡片网格调整 */
    .card-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* 欢迎区域调整 */
    .welcome-section h2 {
        font-size: 1.5rem;
    }
    
    .welcome-section p {
        font-size: 1rem;
    }
    
    /* 任务管理页面调整 */
    .form-row {
        grid-template-columns: 1fr;
    }
    
    /* 优化触摸体验 */
    .btn,
    .sidebar-nav a,
    .task-actions button {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* 通知位置调整 */
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        padding: 0.75rem 1rem;
    }
}

/* 小屏幕手机优化 */
@media (max-width: 480px) {
    main {
        padding: 0.75rem;
    }
    
    .card {
        padding: 1.25rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 0.65rem;
    }
    
    table {
        font-size: 0.8rem;
    }
    
    th, td {
        padding: 8px 10px;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 优化滚动性能 */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(156, 163, 175, 0.5) rgba(243, 244, 246, 0.5);
}

*::-webkit-scrollbar {
    width: 8px;
}

*::-webkit-scrollbar-track {
    background: rgba(243, 244, 246, 0.5);
}

*::-webkit-scrollbar-thumb {
    background-color: rgba(156, 163, 175, 0.5);
    border-radius: 20px;
    border: 2px solid rgba(243, 244, 246, 0.5);
}

/* 优化字体加载 */
@font-face {
    font-family: 'Arial';
    src: local('Arial'), local('ArialMT');
    font-display: swap;
}

/* 优化图片加载 */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background-color: #3b82f6;
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}