/* ===== 全局样式重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
    line-height: 1.6;
}

/* ===== 容器布局 ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== 头部样式 ===== */
header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.language-selector {
    position: absolute;
    top: 20px;
    right: 30px;
    z-index: 1000;
}

.language-selector select {
    padding: 8px 15px;
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 14px;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.language-selector select option {
    color: #333;
    background: white;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* ===== 模式切换按钮 ===== */
.mode-switcher {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.mode-btn {
    padding: 12px 30px;
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    color: white;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.mode-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.mode-btn.active {
    background: white;
    color: #667eea;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* ===== 主内容区域 ===== */
.main-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    margin-top: 30px;
}

/* ===== 左侧面板 ===== */
.left-panel {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

/* ===== 拖拽上传区域 ===== */
.drop-zone {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 50px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(to bottom, #f8f9ff, #fff);
    margin-bottom: 25px;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: #764ba2;
    background: linear-gradient(to bottom, #e8ebff, #f8f9ff);
    transform: scale(1.02);
}

.drop-zone-content {
    pointer-events: none;
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.drop-zone p {
    margin: 10px 0;
    font-size: 16px;
    color: #555;
}

.drop-hint {
    font-size: 13px !important;
    color: #888 !important;
    line-height: 1.5;
}

.browse-btn {
    margin-top: 15px;
    padding: 12px 35px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    pointer-events: auto;
}

.browse-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102,126,234,0.4);
}

/* ===== 选项区域 ===== */
.options-section {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid #eee;
}

.options-section h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 18px;
}

/* ===== 格式选择按钮 ===== */
.format-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.format-btn {
    padding: 12px 15px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 14px;
}

.format-btn:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.format-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(102,126,234,0.3);
}

/* ===== 转换选项 ===== */
.conversion-options h4 {
    margin: 20px 0 15px;
    color: #444;
    font-size: 16px;
}

.option-group {
    margin-bottom: 20px;
}

.option-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

/* ===== 滑块控件 ===== */
.slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.slider-container input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.slider-value {
    min-width: 50px;
    text-align: center;
    font-weight: bold;
    color: #667eea;
}

/* ===== 输入框组 ===== */
.size-inputs {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto;
    gap: 10px;
    align-items: end;
}

.input-group input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.input-group input[type="number"]:focus {
    border-color: #667eea;
    outline: none;
}

.checkbox-group {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

/* ===== 预设尺寸按钮 ===== */
.preset-sizes {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.preset-btn {
    padding: 8px 16px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
}

.preset-btn:hover {
    background: #667eea;
    color: white;
}

/* ===== 变换控制按钮 ===== */
.transform-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.transform-btn {
    padding: 10px 15px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
}

.transform-btn:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.transform-btn.reset {
    grid-column: span 2;
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.current-transform {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9ff;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.8;
}

/* ===== 压缩模式标签 ===== */
.compression-modes {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.compression-tab {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    color: #666;
}

.compression-tab:hover {
    color: #667eea;
}

.compression-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.compress-mode-content {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== 目标大小输入 ===== */
.target-size-input {
    display: flex;
    gap: 10px;
    align-items: center;
}

.target-size-input input {
    flex: 1;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.target-size-input select {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
}

.hint-text {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
    line-height: 1.4;
}

/* ===== 压缩级别显示 ===== */
.compression-levels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 11px;
    color: #999;
}

/* ===== 智能压缩信息 ===== */
.smart-compress-info p {
    background: #f0f9ff;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    font-size: 13px;
    line-height: 1.8;
    margin-bottom: 20px;
}

/* ===== 操作按钮 ===== */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #eee;
}

.convert-btn,
.compress-btn {
    flex: 1;
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(102,126,234,0.3);
}

.convert-btn:hover,
.compress-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(102,126,234,0.4);
}

.clear-btn {
    padding: 15px 25px;
    border: 2px solid #dc3545;
    background: white;
    color: #dc3545;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.clear-btn:hover {
    background: #dc3545;
    color: white;
}

/* ===== 进度条 ===== */
.progress-section {
    margin-top: 25px;
    padding: 20px;
    background: #f8f9ff;
    border-radius: 15px;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 6px;
}

.progress-text {
    text-align: center;
    font-weight: 600;
    color: #667eea;
    font-size: 14px;
}

/* ===== 右侧边栏 ===== */
.right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ===== 广告位样式（已隐藏）===== */
.ad-banner-top,
.ad-sidebar,
.ad-footer {
    /* 广告位已隐藏 - 后期需要时删除此行即可显示 */
    display: none !important;
    text-align: center;
    padding: 15px;
    background: #f0f0f0;
    border-radius: 10px;
    margin-bottom: 20px;
}

.ad-banner-top {
    margin-bottom: 30px;
}

.ad-footer {
    margin-top: 40px;
}

/* ===== 文件列表区域 ===== */
.files-section {
    background: white;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.files-section h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 18px;
}

.files-list {
    max-height: 400px;
    overflow-y: auto;
    border: 2px solid #eee;
    border-radius: 10px;
    padding: 15px;
}

.files-list::-webkit-scrollbar {
    width: 6px;
}

.files-list::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 3px;
}

.empty-hint {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 30px 10px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8f9ff;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid #667eea;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 600;
    font-size: 13px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-details {
    font-size: 11px;
    color: #888;
    margin-top: 3px;
}

.file-actions {
    display: flex;
    gap: 8px;
}

.file-remove {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.file-remove:hover {
    background: #c82333;
    transform: scale(1.05);
}

.files-count {
    margin-top: 15px;
    padding: 12px;
    background: linear-gradient(135deg, #667eea15, #764ba215);
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    color: #667eea;
}

/* ===== 统计信息 ===== */
.stats-summary {
    background: white;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.stats-summary h4 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 16px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-item.highlight {
    background: linear-gradient(135deg, #d4edda15, #c3e6cb15);
    padding: 12px;
    border-radius: 8px;
    margin-top: 10px;
    color: #28a745;
    font-weight: 600;
}

.stat-item strong {
    color: #333;
}

/* ===== 信息卡片区域 ===== */
.info-section {
    margin-top: 40px;
    margin-bottom: 30px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.info-card {
    background: white;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
}

.info-card h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 18px;
}

.info-card ul {
    list-style: none;
    padding-left: 0;
}

.info-card li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    font-size: 14px;
    color: #555;
}

.info-card li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

.info-card p {
    font-size: 14px;
    color: #555;
    line-height: 1.8;
}

/* ===== 页脚 ===== */
footer {
    text-align: center;
    color: white;
    padding: 30px 0;
    margin-top: 40px;
    border-top: 2px solid rgba(255,255,255,0.2);
}

.footer-links {
    margin-bottom: 15px;
    font-size: 14px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    margin: 0 10px;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

footer p {
    font-size: 13px;
    opacity: 0.9;
}

/* ===== 响应式设计 ===== */
@media (max-width: 992px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .right-sidebar {
        order: -1;
    }
    
    .language-selector {
        top: 10px;
        right: 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .mode-switcher {
        flex-direction: column;
        align-items: stretch;
    }
    
    .format-buttons {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .transform-controls {
        grid-template-columns: 1fr;
    }
    
    .transform-btn.reset {
        grid-column: span 1;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .size-inputs {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .compression-modes {
        flex-direction: column;
    }
    
    .compression-tab {
        text-align: center;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 0.95rem;
    }
    
    .format-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .drop-zone {
        padding: 30px 15px;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
}
