/* CSS 变量定义 - 主题颜色 */
:root {
    /* 亮色主题 */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --border-color: #dee2e6;
    --accent-color: #007bff;
    --accent-hover: #0056b3;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --drop-zone-border: #ced4da;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}


/* 暗色主题 */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #121212;
        --bg-secondary: #1e1e1e;
        --bg-tertiary: #2d2d2d;
        --text-primary: #e0e0e0;
        --text-secondary: #b0b0b0;
        --border-color: #404040;
        --accent-color: #4dabf7;
        --accent-hover: #339af0;
        --success-color: #20c997;
        --warning-color: #ffc107;
        --danger-color: #fa5252;
        --drop-zone-border: #495057;
        --shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
        --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.4);
    }
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    padding: 20px;
    transition: var(--transition);
}

/* 容器样式 */
.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--bg-secondary);
    border-radius: 12px;
    padding: 30px 30px 17px 30px;
    box-shadow: var(--shadow-lg);
}

/* 标题样式 */
h1 {
    color: var(--text-primary);
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
}

h2 {
    color: var(--text-primary);
    margin: 0px 0 20px;
    font-size: 22px;
    font-weight: 600;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
}

h3 {
    color: var(--text-primary);
    margin: 10px 0 10px;
    font-size: 18px;
    font-weight: 500;
}

/* 部分样式 */
.section {
    background-color: var(--bg-tertiary);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: var(--shadow);
}

/* 拖放区域样式 */
#dropZone {
    border: 2px dashed var(--drop-zone-border);
    border-radius: 8px;
    padding: 30px 20px;
    margin: 15px 0;
    text-align: center;
    background-color: var(--bg-primary);
    cursor: pointer;
    transition: var(--transition);
}

#dropZone:hover {
    border-color: var(--accent-color);
    background-color: rgba(0, 123, 255, 0.05);
}

#dropZone.drag-over {
    border-color: var(--accent-color);
    background-color: rgba(0, 123, 255, 0.1);
}

/* 文件列表样式 */
#fileList {
    margin-top: 10px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 12px 15px;
    margin-bottom: 10px;
    transition: var(--transition);
}

.file-item:hover {
    box-shadow: var(--shadow);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.file-size {
    color: var(--text-secondary);
    font-size: 14px;
}

.file-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: white;
    margin-left: 5px;
}

/* 按钮样式 */
button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

button:active {
    transform: translateY(0);
}

button.secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

button.secondary:hover {
    background-color: var(--border-color);
}

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

button.danger:hover {
    background-color: #c82333;
}

/* 输入框样式 */
input[type="text"] {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px 15px;
    font-size: 14px;
    width: 100%;
    max-width: 300px;
    transition: var(--transition);
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* 进度条样式 */
.progress-container {
    width: 100%;
    height: 12px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    margin: 15px 0;
}

#progressFill {
    height: 100%;
    background-color: var(--accent-color);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 5px;
}

/* 状态消息样式 */
#statusMessage {
    margin-top: 10px;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

/* 下载区域样式 */
#downloadArea {
    margin-top: 30px;
    padding: 20px;
    background-color: rgba(40, 167, 69, 0.1);
    border: 1px solid var(--success-color);
    border-radius: 8px;
    text-align: center;
}

#downloadArea h3 {
    color: var(--success-color);
    margin-bottom: 15px;
}

#downloadArea p {
    color: var(--success-color);
    margin-bottom: 15px;
}
/* 设备检测 - 平板设备 */
body.device-tablet {
    padding: 0;
}

body.device-tablet .container {
    max-width: none;
    width: 100%;
    padding: 20px;
    margin: 0;
    border-radius: 0;
}

body.device-tablet h1 {
    font-size: 24px;
}

body.device-tablet h2 {
    font-size: 20px;
}

body.device-tablet h3 {
    font-size: 16px;
}

body.device-tablet #dropZone {
    padding: 30px 15px;
}

body.device-tablet .file-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

body.device-tablet .file-item button {
    align-self: flex-end;
}

/* 设备检测 - 移动设备 */
body.device-mobile {
    padding: 5px;
}

body.device-mobile .container {
    max-width: 100%;
    padding: 12px;
    margin: 0;
    border-radius: 6px;
}

body.device-mobile h1 {
    font-size: 18px;
    margin-bottom: 15px;
}

body.device-mobile h2 {
    font-size: 16px;
    margin: 15px 0 10px;
    padding-bottom: 8px;
}

body.device-mobile h3 {
    font-size: 14px;
    margin: 8px 0;
}

body.device-mobile .section {
    padding: 12px;
    margin-bottom: 12px;
}

body.device-mobile #dropZone {
    padding: 20px 10px;
    margin: 10px 0;
}

body.device-mobile #dropZone button {
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    font-size: 14px;
}

body.device-mobile input[type="text"] {
    max-width: 100%;
    padding: 10px 12px;
    font-size: 14px;
}

body.device-mobile button {
    width: 100%;
    padding: 10px;
    font-size: 14px;
}

body.device-mobile .section button,
body.device-mobile #dropZone button {
    width: 100%;
}

body.device-mobile .file-item {
    padding: 6px 8px;
    margin-bottom: 6px;
    flex-direction: row;
    align-items: center;
    gap: 6px;
}

body.device-mobile .file-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

body.device-mobile .file-name {
    font-size: 13px;
    word-break: break-all;
    line-height: 1.3;
}

body.device-mobile .file-size {
    font-size: 11px;
}

body.device-mobile .file-type-badge {
    padding: 2px 5px;
    font-size: 9px;
    margin-left: 0;
    align-self: flex-start;
}

body.device-mobile .file-item button {
    width: auto;
    padding: 5px 10px;
    font-size: 11px;
    min-width: auto;
    flex-shrink: 0;
    white-space: nowrap;
}

body.device-mobile .progress-container {
    height: 8px;
    margin: 10px 0;
}

body.device-mobile #statusMessage {
    font-size: 12px;
    padding: 6px 8px;
    margin-top: 8px;
}

body.device-mobile #downloadArea {
    padding: 12px;
    margin-top: 20px;
}

body.device-mobile .footer-beian {
    margin-top: 0px;
}

body.device-mobile .footer-beian span {
    font-size:8px;
}

body.device-mobile .footer-beian a {
    font-size: 10px;
}

/* 保留媒体查询作为备用方案，确保兼容性 */
@media (max-width: 1024px) {
    body {
        padding: 0;
    }

    .container {
        max-width: none;
        width: 100%;
        padding: 20px;
        margin: 0;
        border-radius: 0;
    }
}

@media (max-width: 480px) {
    body {
        padding: 5px;
    }

    .container {
        max-width: 100%;
        padding: 12px;
        margin: 0;
        border-radius: 6px;
    }
}

/* 主题切换按钮 */
.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.theme-toggle:hover {
    background-color: var(--bg-tertiary);
    transform: scale(1.05);
}

/* 底部信息样式 */
.footer {
    text-align: center;
    background-color: var(--bg-secondary);
    margin-top: 10px;
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 12px 12px;
    box-shadow: none;
    font-size: 16px;
    color: var(--text-secondary);
    width: 100%;
}

.footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer a:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.footer-links {
    margin-bottom: 5px;
    margin-top: 10px;

}
.footer-links a {
    color: rgb(178, 94, 247);
    transition: rgb(94, 191, 247);
}
.footer-links a:hover {
    color: rgb(94, 191, 247);
}

.footer-beian {
    font-size: 12px;
}