/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

.login-body {
    background-color: #3498db;
    background: linear-gradient(135deg, #3498db, #2c3e50);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header h1 {
    text-align: center;
    margin: 0;
    font-size: 2rem;
}

/* 登录页面样式 */
.login-container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #2c3e50;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

button[type="submit"] {
    width: 100%;
    padding: 0.75rem;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

button[type="submit"]:hover {
    background: #2980b9;
}

.login-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.login-footer p {
    margin: 0;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-right: 20px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #3498db;
}

/* 主要内容区域 */
main {
    min-height: calc(100vh - 140px);
    padding: 2rem 0;
}

section {
    margin-bottom: 2rem;
}

.hero {
    background-color: #3498db;
    color: white;
    padding: 3rem 0;
    text-align: center;
    border-radius: 5px;
    margin-bottom: 2rem;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.features {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.feature-card {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 1.5rem;
    border-radius: 5px;
    margin: 1rem;
    flex: 1;
    min-width: 250px;
    max-width: 300px;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: #fff;
}

.feature-card p {
    color: #f0f0f0;
}

.search-bar {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}

.search-bar input {
    padding: 10px;
    width: 60%;
    max-width: 500px;
    border: none;
    border-radius: 5px 0 0 5px;
    font-size: 1rem;
}

.search-bar button {
    padding: 10px 20px;
    background-color: #2c3e50;
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.search-bar button:hover {
    background-color: #1a252f;
}

.content-section {
    background-color: white;
    padding: 2rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.content-section h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

/* 档案网格 */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.archive-card {
    background-color: #f8f9fa;
    border-radius: 5px;
    padding: 1.5rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.archive-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.archive-card h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.archive-card p {
    color: #666;
    margin-bottom: 1rem;
}

.archive-card .btn {
    display: inline-block;
    padding: 8px 15px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 3px;
    transition: background-color 0.3s;
}

.archive-card .btn:hover {
    background-color: #2980b9;
}

/* 配置面板 */
.config-panel {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 5px;
    margin-bottom: 2rem;
}

.config-panel h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.storage-options, .database-options {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.storage-option, .database-option {
    margin-right: 20px;
    margin-bottom: 10px;
}

.storage-config, .database-config {
    background-color: #e9ecef;
    padding: 1.5rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

.storage-config h4, .database-config h4 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.storage-config label, .database-config label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.storage-config input, .database-config input {
    width: 100%;
    padding: 10px;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-family: inherit;
}

/* 管理面板 */
.admin-panel {
    text-align: center;
}

.admin-panel button {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 12px 20px;
    margin: 0 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.admin-panel button:hover {
    background-color: #219653;
}

.upload-form {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 5px;
    margin-top: 2rem;
    text-align: left;
}

.upload-form.hidden {
    display: none;
}

.upload-form h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.upload-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.upload-form input,
.upload-form select,
.upload-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 1.5rem;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-family: inherit;
}

.upload-form textarea {
    height: 100px;
    resize: vertical;
}

.upload-form button {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.upload-form button:hover {
    background-color: #219653;
}

/* 页脚 */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}

/* 学生信息区域样式 */
.student-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.student-info {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.course-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.course-card h3 {
    margin-top: 0;
    color: #2c3e50;
}

.user-info {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.user-info .btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
}

.user-info .btn:hover {
    background: #c0392b;
}

/* 响应式设计 */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
    }
    
    nav ul li {
        margin: 5px 0;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .features {
        flex-direction: column;
        align-items: center;
    }
    
    .feature-card {
        max-width: 100%;
        margin: 1rem 0;
    }
    
    .search-bar {
        flex-direction: column;
        align-items: center;
    }
    
    .search-bar input {
        border-radius: 5px;
        margin-bottom: 10px;
        width: 90%;
    }
    
    .search-bar button {
        border-radius: 5px;
        width: 90%;
    }
    
    .admin-panel button {
        display: block;
        width: 90%;
        margin: 10px auto;
    }
    
    .storage-options, .database-options {
        flex-direction: column;
    }
    
    .storage-option, .database-option {
        margin-right: 0;
        margin-bottom: 10px;
    }
}
