/* 全局样式 */
:root {
    --primary-color: #4CAF50;
    --secondary-color: #2196F3;
    --warning-color: #FF9800;
    --error-color: #F44336;
    --success-color: #8BC34A;
    --info-color: #00BCD4;
    --dark-color: #333;
    --light-color: #f4f4f4;
    --border-color: #ddd;
    --box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f9f9f9;
    color: var(--dark-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
}

/* User Bar */
.user-bar {
    background-color: #fff;
    padding: 10px 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.user-info, .guest-info {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.9rem;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
}

.btn-danger {
    background-color: var(--error-color);
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 30px;
    margin-top: 20px;
}

.home-link {
    text-decoration: none;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo {
    width: 60px;
    height: 60px;
    margin-right: 15px;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 20px;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    padding: 25px;
    margin-bottom: 30px;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

input, select, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

textarea {
    resize: vertical;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.form-actions {
    margin-top: 30px;
    text-align: center;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #388E3C;
}

.btn-secondary {
    background-color: #9E9E9E;
    color: white;
}

.btn-secondary:hover {
    background-color: #757575;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid #ccc;
    color: #333;
}

.btn-outline:hover {
    background-color: #f0f0f0;
}

/* Modal */
.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.5); 
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto; 
    padding: 20px;
    border: 1px solid #888;
    width: 80%; 
    max-width: 500px;
    border-radius: 8px;
    position: relative;
    animation: modalFadeIn 0.3s;
}

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

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* 进度条 */
.progress-container {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 4px;
    margin: 20px 0;
    height: 20px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary-color);
    width: 0%;
    transition: width 0.3s ease;
}

/* 日志显示 */
.log-container {
    background-color: #1e1e1e;
    color: #d4d4d4;
    border-radius: 4px;
    padding: 15px;
    height: 400px;
    overflow-y: auto;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.log-entry {
    margin-bottom: 5px;
    word-wrap: break-word;
}

.log-info { color: #d4d4d4; }
.log-success { color: var(--success-color); }
.log-warning { color: var(--warning-color); }
.log-error { color: var(--error-color); }

/* 文件列表 */
.files-container {
    margin-top: 30px;
}

.file-list {
    list-style: none;
}

.file-item {
    background: #f9f9f9;
    border: 1px solid var(--border-color);
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.file-item:hover {
    background-color: #f0f0f0;
}

.file-name {
    font-weight: 600;
}

.file-path {
    font-size: 0.8rem;
    color: #666;
}

/* Footer Styles */
footer {
    text-align: center;
    padding: 30px 0;
    margin-top: auto;
    border-top: 1px solid #e0e0e0;
    color: #666;
    background-color: #fff;
    width: 100%;
}

footer p {
    margin-bottom: 10px;
}

footer a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .card {
        padding: 15px;
    }
}