/* 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;
    --btn-hover-bg: rgba(0, 123, 255, 0.9);
    --btn-danger-hover-bg: rgba(220, 53, 69, 0.9);
}


/* 暗色主题 */
@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: #ff9800;
        --accent-hover: #f57c00;
        --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);
        --btn-hover-bg: rgba(255, 152, 0, 0.65);
        --btn-danger-hover-bg: rgba(250, 82, 82, 0.65);
    }
}

/* 全局样式重置 */
* {
    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: transparent;
    color: var(--accent-color);
    border: 1.5px solid var(--accent-color);
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease;
    box-shadow: none;
}

button:hover {
    background-color: var(--btn-hover-bg);
    color: #fff;
}

button:active {
    background-color: var(--accent-color);
    color: #fff;
    transform: scale(0.97);
}

button.secondary {
    color: var(--text-primary);
    border-color: var(--border-color);
    background-color: transparent;
}

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

button.secondary:active {
    background-color: var(--border-color);
    color: var(--text-primary);
}

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

button.danger:hover {
    background-color: var(--btn-danger-hover-bg);
    color: #fff;
}

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

/* 输入框样式 */
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;
    }
}

/* 语言切换按钮 */
.lang-toggle {
    background-color: transparent;
    color: var(--accent-color);
    border: 1.5px solid var(--accent-color);
    border-radius: 16px;
    padding: 4px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.15s ease;
    box-shadow: none;
    width: auto;
    white-space: nowrap;
    flex-shrink: 0;
}

.lang-toggle:hover {
    background-color: var(--btn-hover-bg);
    color: #fff;
}

.lang-toggle:active {
    background-color: var(--accent-color);
    color: #fff;
    transform: scale(0.95);
}

/* 主题切换按钮 */
.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;
}

/* 格式提示文字响应式 */
.format-hint {
    font-size: 14px;
}

body.device-mobile .format-hint {
    font-size: 10px;
}

body.device-mobile .lang-toggle {
    width: auto;
    padding: 3px 10px;
    font-size: 11px;
}
