/* 文件转传工具样式 - 多端适配版本 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    transition: all 0.3s ease;
}

/* 设备专属样式 */
.device-mobile {
    font-size: 16px;
}

.device-mobile .container {
    padding: 10px;
}

.device-mobile header h1 {
    font-size: 1.8rem;
}

.device-mobile header p {
    font-size: 0.9rem;
}

.device-tablet {
    font-size: 18px;
}

.device-tablet .container {
    padding: 15px;
}

.device-tablet header h1 {
    font-size: 2.2rem;
}

.device-desktop {
    font-size: 16px;
}

/* 触摸设备优化 */
.touch-device .btn {
    min-height: 44px;
    padding: 12px 20px;
    font-size: 16px;
}

.touch-device .upload-area {
    min-height: 200px;
}

.touch-device input[type="text"] {
    min-height: 44px;
    font-size: 16px;
}

/* 屏幕尺寸适配 */
.screen-small .container {
    max-width: 100%;
    padding: 10px;
}

.screen-small section {
    padding: 20px;
    margin-bottom: 15px;
}

.screen-small .upload-buttons {
    flex-direction: column;
    gap: 10px;
}

.screen-small .upload-buttons .btn {
    width: 100%;
}

.screen-medium .container {
    max-width: 800px;
    padding: 15px;
}

.screen-medium section {
    padding: 25px;
}

.screen-large .container {
    max-width: 1200px;
    padding: 20px;
}

.screen-large section {
    padding: 30px;
}

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

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    position: relative;
}

.header-center {
    flex: 1;
    text-align: center;
    min-width: 0;
}

.header-right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    position: relative;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 主要内容区域 */
main {
    display: grid;
    gap: 30px;
}

section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

section:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

/* 上传区域样式 */
.upload-area {
    border: 3px dashed #ddd;
    border-radius: 15px;
    padding: 60px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #fafafa;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.upload-area.dragover {
    border-color: #667eea;
    background: #e8f2ff;
    transform: scale(1.02);
}

.upload-content {
    pointer-events: auto;
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.upload-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333;
}

.upload-content p {
    color: #666;
    margin-bottom: 30px;
}

.upload-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 按钮样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 2px solid #dee2e6;
}

.btn-secondary:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

/* 识别码输入 */
.code-input-section {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.code-input-section label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #495057;
}

.code-input-section input {
    width: 200px;
    padding: 12px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1.1rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
}

.code-input-section input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.code-input-section small {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 0.9rem;
}

/* 上传进度 */
.upload-progress {
    margin-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    margin-top: 10px;
    color: #495057;
    font-weight: 500;
}

/* 区域标题 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

.section-header h2 {
    color: #333;
    font-size: 1.5rem;
}

/* 文件列表 */
.files-list {
    min-height: 100px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    margin-bottom: 10px;
    background: #fafafa;
    transition: all 0.3s ease;
}

.file-item:hover {
    background: #f0f4ff;
    border-color: #667eea;
}

.file-icon {
    font-size: 2rem;
    margin-right: 15px;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.file-meta {
    font-size: 0.9rem;
    color: #6c757d;
}

.file-actions {
    display: flex;
    gap: 10px;
}

/* 下载表单 */
.download-form {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.download-form input {
    flex: 1;
    min-width: 200px;
    padding: 12px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1.1rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
}

.download-form input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.file-info {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.file-info h4 {
    color: #333;
    margin-bottom: 10px;
}

.file-info p {
    color: #6c757d;
    margin-bottom: 5px;
}

/* 统计网格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-label {
    color: #6c757d;
    font-size: 0.9rem;
}

/* 加载状态 */
.loading {
    text-align: center;
    color: #6c757d;
    padding: 40px;
    font-style: italic;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.empty-state .icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* 消息提示 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 300px;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background: #28a745;
}

.toast.error {
    background: #dc3545;
}

.toast.info {
    background: #17a2b8;
}

/* 手机端专属样式 */
.device-mobile .upload-area {
    min-height: 150px;
    padding: 20px;
}

.device-mobile .upload-content h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.device-mobile .upload-content p {
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.device-mobile .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.device-mobile .section-header h2 {
    font-size: 1.3rem;
}

.device-mobile .files-list {
    gap: 10px;
}

.device-mobile .file-item {
    padding: 15px;
}

.device-mobile .file-actions {
    flex-direction: column;
    gap: 8px;
}

.device-mobile .file-actions .btn {
    width: 100%;
    font-size: 14px;
}

/* 平板端专属样式 */
.device-tablet .upload-area {
    min-height: 180px;
}

.device-tablet .upload-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.device-tablet .files-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* 电脑端专属样式 */
.device-desktop .upload-area:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.device-desktop .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.device-desktop .file-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    section {
        padding: 20px;
    }
    
    .upload-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .download-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .file-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 480px) {
    .device-mobile .container {
        padding: 8px;
    }
    
    .device-mobile section {
        padding: 15px;
        border-radius: 10px;
    }
    
    .device-mobile .upload-area {
        min-height: 120px;
        padding: 15px;
    }
    
    .device-mobile .upload-icon {
        font-size: 2rem;
    }
    
    .device-mobile .code-input-section {
        margin-top: 15px;
    }
    
    .device-mobile .code-input-section input {
        font-size: 18px;
        padding: 12px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.file-item {
    animation: fadeIn 0.3s ease;
}

/* 警告横幅 */
.warning-banner {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    color: #856404;
    text-align: center;
    font-weight: 500;
}

/* 二维码区域 */
.qr-section {
    margin: 20px 0;
    text-align: center;
}

/* 桌面端二维码优化 */
.device-desktop .qr-section {
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    border: 2px solid #dee2e6;
}

.btn-qr {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-qr:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

/* 桌面端二维码按钮优化 */
.device-desktop .btn-qr {
    padding: 15px 30px;
    font-size: 1.1rem;
    border-radius: 10px;
    box-shadow: 0 6px 12px rgba(40, 167, 69, 0.4);
}

.device-desktop .btn-qr:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(40, 167, 69, 0.5);
}

.qr-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.qr-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

/* 桌面端二维码容器优化 */
.device-desktop .qr-content {
    max-width: 500px;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.qr-content h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5rem;
}

.qr-code {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.qr-code img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 桌面端二维码图片优化 */
.device-desktop .qr-code img {
    max-width: 250px;
    max-height: 250px;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.qr-tip {
    color: #495057;
    margin: 15px 0;
    font-size: 0.9rem;
    text-align: center;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.qr-tip p {
    margin: 5px 0;
}

.qr-tip p:first-child {
    color: #007bff;
    font-weight: 600;
    font-size: 1rem;
}

.qr-url-display {
    margin-top: 15px;
    padding: 10px;
    background: #e9ecef;
    border-radius: 6px;
    text-align: center;
}

.url-copy-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.qr-url-display .url-text {
    font-family: 'Courier New', monospace;
    background: #fff;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    word-break: break-all;
    font-size: 0.85rem;
    color: #495057;
    flex: 1;
    margin: 0;
}

.btn-copy {
    background: #007bff;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.btn-copy:hover {
    background: #0056b3;
}

.btn-copy:active {
    background: #004085;
}

.qr-url-display small {
    color: #6c757d;
    font-size: 0.8rem;
}

.qr-code .loading {
    color: #6c757d;
    font-style: italic;
}

.qr-code .error {
    color: #dc3545;
    font-weight: 500;
}

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

/* 下载选项对话框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.3rem;
}

.close {
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #000;
}

.modal-body {
    padding: 30px;
}

.modal-body p {
    margin-bottom: 20px;
    color: #555;
    font-size: 1rem;
}

.download-options {
    margin-bottom: 20px;
}

.option-item {
    display: block;
    margin-bottom: 15px;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-item:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.option-item input[type="radio"] {
    margin-right: 12px;
    transform: scale(1.2);
}

.option-item input[type="radio"]:checked + .option-content {
    color: #667eea;
}

.option-content {
    display: inline-block;
    vertical-align: top;
}

.option-content strong {
    display: block;
    margin-bottom: 5px;
    font-size: 1rem;
}

.option-content small {
    color: #6c757d;
    font-size: 0.85rem;
}

.warning-note {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
}

.warning-note p {
    margin: 0;
    color: #856404;
    font-size: 0.9rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px 30px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 0 0 15px 15px;
}



/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 批量下载样式 */
.batch-download-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

.batch-download-section h3 {
    color: #28a745;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.batch-info {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-top: 15px;
}

.batch-summary {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid #28a745;
}

.batch-summary h4 {
    color: #28a745;
    margin-bottom: 10px;
}

.batch-summary p {
    margin: 5px 0;
    font-size: 0.9rem;
}

.files-preview {
    background: white;
    border-radius: 8px;
    padding: 15px;
}

.files-preview h5 {
    color: #495057;
    margin-bottom: 10px;
    font-size: 1rem;
}

.files-preview .files-list {
    max-height: 200px;
    overflow-y: auto;
}

.files-preview .file-item {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.files-preview .file-item:last-child {
    border-bottom: none;
}

.files-preview .file-name {
    font-weight: 500;
    color: #495057;
}

.files-preview .file-size {
    color: #6c757d;
    font-size: 0.8rem;
}

/* W_二维码相关样式 - 右侧直接显示 */
.W_qr-display {
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.W_qr-image-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

.W_qr-image-container img {
    width: 120px;
    height: 120px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.W_qr-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #6c757d;
    font-size: 0.8rem;
}

.W_qr-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 5px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.W_qr-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.W_qr-actions input {
    padding: 6px 8px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #495057;
    background: #f8f9fa;
    text-align: center;
}

.W_btn-copy {
    background: #007bff;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.W_btn-copy:hover {
    background: #0056b3;
}

.W_btn-close {
    background: #dc3545;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: bold;
}

.W_btn-close:hover {
    background: #c82333;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .header-center {
        text-align: center;
    }
    
    .header-right {
        justify-content: center;
        margin-top: 15px;
    }
    
    .W_qr-display {
        min-width: 250px;
        max-width: 90vw;
    }
    
    .W_qr-image-container img {
        width: 150px;
        height: 150px;
    }
    
    .W_qr-actions {
        gap: 10px;
    }
    
    .W_btn-copy {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}
