body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f0f2f5;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    /* 为页脚留出空间 */
    padding-bottom: 50px; 
    box-sizing: border-box;
}

.page {
    display: none;
}

.page.active {
    display: block;
    width: 100%;
}

/* 通用隐藏类 */
.hidden {
    display: none;
}

/* 表单样式 */
.form-container {
    max-width: 350px;
    margin: 50px auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.form-container h2 {
    margin-bottom: 1.5rem;
    color: #333;
}

.form-container input {
    width: calc(100% - 20px);
    padding: 10px;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.form-container button {
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.form-container button:hover {
    background-color: #0056b3;
}

.form-container p {
    margin-top: 1rem;
}

/* 主面板样式 */
.dashboard-container {
    width: 90%;
    max-width: 1200px;
    margin: 2rem auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

header h1 {
    margin: 0;
}

header button {
    margin-left: 10px;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 4px;
    border: 1px solid #007bff;
    background-color: #007bff;
    color: white;
}

#logout-button {
    background-color: #dc3545;
    border-color: #dc3545;
}

/* 进度条样式 */
#progress-container {
    margin: 1rem 0;
}

#progress-bar {
    width: 100%;
}


/* 表格样式 */
#resource-table {
    width: 100%;
    border-collapse: collapse;
}

#resource-table th, #resource-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

#resource-table th {
    background-color: #f8f9fa;
}

#resource-table tbody tr:nth-child(even) {
    background-color: #f2f2f2;
}

#resource-table button {
    padding: 5px 10px;
    margin-right: 5px;
    cursor: pointer;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
    position: relative;
}

/* 预览弹窗的特殊样式 */
.modal-content.large {
    max-width: 90%;
    height: 80%;
    margin: 5% auto;
    display: flex;
    flex-direction: column;
}

#preview-content {
    flex-grow: 1;
    overflow: auto;
    text-align: center;
    background-color: #f1f1f1;
}

#preview-content img,
#preview-content embed,
#preview-content video,
#preview-content audio {
    max-width: 100%;
    max-height: 100%;
    height: auto; /* 保持宽高比 */
}

#preview-content embed {
    height: 100%; /* PDF embed 需要明确高度 */
}

#preview-content pre {
    text-align: left;
    white-space: pre-wrap;
    word-wrap: break-word;
    padding: 1rem;
    background-color: #fff;
    height: 100%;
    box-sizing: border-box;
    margin: 0;
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 25px;
    font-size: 35px;
    font-weight: bold;
    z-index: 1001;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* 页脚样式 */
.site-footer {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    background-color: #f8f9fa;
    color: #6c757d;
    text-align: center;
    padding: 10px 0;
    font-size: 0.9em;
    border-top: 1px solid #e7e7e7;
    z-index: 100;
}

.site-footer a {
    color: #007bff;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}
