/* 关键CSS - 首屏渲染所需样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f5f7fa;
}

header, footer {
    position: fixed;
    width: 100%;
    z-index: 1000;
}

main {
    flex: 1;
    margin-top: 60px;
    margin-bottom: 50px;
}

/* 免责声明弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 30px;
    border-radius: 12px;
    width: 80%;
    max-width: 600px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-content h2 {
    margin: 0;
    color: #0078D7;
    font-size: 24px;
    text-align: center;
}

.modal-content hr {
    margin: 0;
    border: 0;
    border-top: 1px solid #eee;
}

.modal-content p {
    margin: 0;
    line-height: 1.8;
    font-size: 15px;
    color: #555;
}

.modal-footer {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

#disclaimerConfirm {
    background: linear-gradient(135deg, #0078D7, #005fb3);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#disclaimerConfirm:hover {
    background: linear-gradient(135deg, #0066c4, #004a8f);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #0078D7, #005fb3);
    color: white;
    padding: 15px;
    text-align: center;
    font-size: 22px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header img {
    height: 40px;
    margin-right: 10px;
    vertical-align: middle;
}

/* 主体内容样式 */
main {
    flex: 1;
    display: flex;
    flex-direction: row;
    margin-top: 60px;
    margin-bottom: 50px;
    height: calc(100vh - 100px + 300px);
    overflow-y: auto;
    padding: 20px;
    gap: 20px;
}

.left-section, .right-section {
    flex: 1;
    padding: 25px;
    height: calc(100vh - 120px + 300px);
    overflow: hidden;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.left-section {
    border-right: 1px solid #ccc;
}

/* 底部样式 */
footer {
    background: linear-gradient(135deg, #0078D7, #005fb3);
    color: white;
    padding: 12px;
    text-align: center;
    font-size: 16px;
    position: fixed;
    bottom: 0;
    width: 100%;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

footer img {
    height: 20px;
    vertical-align: middle;
    margin-right: 10px;
}

/* QQ群二维码样式 */
footer .qq-group {
    position: relative;
    display: inline-block;
    cursor: pointer;
    user-select: none;
}

footer .qr-code {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 150px;
    margin-bottom: 10px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    background-color: white;
    padding: 8px;
    z-index: 1000;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

footer .qq-group:hover .qr-code {
    display: block;
    opacity: 1;
    visibility: visible;
}

footer .qr-code img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    user-drag: none;
}

/* 文件列表样式 */
#fileList {
    display: grid;
    grid-template-columns: repeat(auto-fill, 170px);
    gap: 12px;
    padding: 15px;
    border: 2px dashed #c8d1e0;
    border-radius: 12px;
    background: #fafbfc;
    transition: border-color 0.2s ease;
    min-height: 500px;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
    margin-bottom: 20px;
}

#fileList:hover {
    border-color: #0078D7;
}

/* 文件项样式 */
.file-item {
    background: white;
    border: 1px solid #e6e9ef;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 240px;
    width: 170px; 
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.file-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

.file-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
    margin-bottom: 8px;
}

.file-name {
    font-size: 13px;
    font-weight: bold;
    color: #333;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    max-height: 2.4em;
    padding: 0 4px;
    margin-bottom: 6px;
    text-align: center;
}

.file-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    width: 100%;
}

.file-preview {
    width: 100%;
    height: 120px;
    border: none;
    border-radius: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
}

.file-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.file-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 12px;
    padding: 0 3px;
    text-align: center;
}

.file-info p {
    margin: 0;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-info input[type="number"] {
    width: 50px;
    padding: 2px 4px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 12px;
}

.file-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px solid #eee;
    position: relative;
    box-sizing: border-box;
    min-height: 45px;
    bottom: 0;
    left: 0;
    right: 0;
}

.file-actions button {
    padding: 4px 8px;
    height: 36px;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-actions button:hover {
    background-color: #d32f2f;
}

.file-actions span {
    font-size: 12px;
    color: #666;
}

.file-actions input[type="number"] {
    width: 45px;
    height: 36px;
    padding: 2px 4px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 12px;
    text-align: center;
    margin-right: 10px;
}

/* 按钮样式 */
button {
    background: #0078D7;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

button:hover {
    background: #005fb3;
    transform: translateY(-1px);
}

/* 表单元素样式 */
/* 表单组样式 */
.form-group {
    margin-bottom: 15px;
}

.form-group-flex {
    display: flex;
    gap: 10px;
    align-items: center;
}

#browseFiles {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    background: #0078D7;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

#browseFiles:hover {
    background: #005fb3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

label {
    color: #4a5568;
    font-weight: 500;
    margin-bottom: 8px;
    display: inline-block;
}

input[type="text"], select, textarea {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
    border: 1px solid #e6e9ef;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

select:focus, input:focus, textarea:focus {
    outline: none;
    border-color: #0078D7;
    box-shadow: 0 0 0 3px rgba(0,120,215,0.1);
}

/* 警告信息样式 */
.alert {
    padding: 12px 16px;
    margin-top: 15px;
    border-radius: 8px;
    font-weight: 500;
    max-height: 60vh;
    overflow-y: auto;
    z-index: 2000;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.alert.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert.success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

#errorAlert, #successAlert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    max-height: 60vh;
    overflow-y: auto;
    width: 80%;
    max-width: 600px;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

/* 轨迹按钮组样式 */
.track-btn-group {
    display: inline-flex;
    background: transparent;
    padding: 3px;
    border: none;
}

.track-btn {
    min-width: 40px;
    padding: 5px 12px;
    background: #fff;
    border: 1px solid #e0e0e0;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    transition: all 0.2s ease;
    border-radius: 4px;
    margin: 0 2px;
}

.track-btn:hover {
    background: #f8f9fa;
}

.track-btn.active {
    background: #0078D7;
    color: white;
    border-color: #0078D7;
    box-shadow: 0 2px 4px rgba(0,120,215,0.2);
}

/* 版本更新通知样式 */
#versionNotice {
    position: fixed;
    bottom: 70px;
    right: 20px;
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    border-left: 4px solid #0078D7;
    padding: 15px 20px;
    border-radius: 8px;
    width: 320px;
    z-index: 1001;
    transform: translateY(150%);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

#versionNotice.show {
    transform: translateY(0);
    opacity: 1;
}

#versionNotice .notice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

#versionNotice h4 {
    margin: 0;
    color: #0078D7;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

#versionNotice h4::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #0078D7;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(0, 120, 215, 0.7);
    }
    
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(0, 120, 215, 0);
    }
    
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(0, 120, 215, 0);
    }
}

#versionNotice .close-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 18px;
    width: 32px;
    height: 32px;
    margin: -8px -8px -8px 0;
}

#versionNotice .close-btn:hover {
    background: rgba(0,0,0,0.05);
    transform: rotate(90deg);
}

#versionNotice p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    padding-right: 8px;
}

#versionNotice:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* 文件备注样式 */
.file-note {
    margin-top: 15px;
    padding: 12px;
    background-color: #fff8e6;
    border-left: 4px solid #ffd700;
    border-radius: 4px;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* 控制输入样式 */
.control-input {
    width: 60px;
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    background: transparent;
}

.control-input:focus {
    outline: none;
    background: transparent;
    box-shadow: none;
}
