/* 全局样式 */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-radius: 0.8rem;
    --box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

body {
    background-color: #f0f2f5;
    background-image: linear-gradient(120deg, #f8f9fa 0%, #e9ecef 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
}

.card {
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    border: none;
}

.main-card {
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
}

.card-header {
    font-weight: bold;
    padding: 1.2rem 1.5rem;
}

.card-header.bg-gradient {
    background: linear-gradient(135deg, #cfe2ff, #e9ecef);
    text-align: center;
    padding: 1.5rem 1rem;
    position: relative;
}

.card-header.bg-gradient::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.3) 100%);
    z-index: 1;
}

.card-header.bg-gradient > * {
    position: relative;
    z-index: 2;
}

.app-icon {
    font-size: 2.2rem;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    backdrop-filter: blur(5px);
}

/* 格式信息部分 */
.formats-alert {
    border-left: 4px solid #0dcaf0;
    background-color: rgba(13, 202, 240, 0.1);
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.formats-header {
    display: flex;
    align-items: center;
}

.formats-list {
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
    color: #495057;
    font-weight: 500;
}

/* 文件上传区 */
.upload-card, .format-card, .advanced-card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.upload-card:hover, .format-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.upload-zone {
    position: relative;
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: var(--transition);
    background-color: #f9f9f9;
    cursor: pointer;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-zone:hover, .upload-zone.highlighted {
    border-color: var(--primary-color);
    background-color: rgba(13, 110, 253, 0.05);
}

.upload-zone.highlighted {
    border-style: solid;
    border-width: 3px;
    background-color: rgba(13, 110, 253, 0.1);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(13, 110, 253, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
    }
}

.upload-zone input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.upload-placeholder {
    padding: 20px 0;
}

.upload-placeholder i {
    font-size: 2.5rem;
    color: #6c757d;
    margin-bottom: 10px;
    transition: var(--transition);
}

.upload-zone:hover .upload-placeholder i,
.upload-zone.highlighted .upload-placeholder i {
    color: var(--primary-color);
    transform: scale(1.1);
}

.upload-placeholder p {
    margin-bottom: 5px;
    font-size: 1.1rem;
    font-weight: 500;
}

.upload-placeholder small {
    font-style: italic;
}

.custom-select {
    height: 46px;
    border-radius: 8px;
}

/* 文件列表样式 */
#selected-files {
    max-height: 180px;
    overflow-y: auto;
    padding-right: 5px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 8px;
    background-color: rgba(13, 110, 253, 0.1);
    border-radius: 6px;
    transition: var(--transition);
    border-left: 4px solid var(--primary-color);
}

.file-item:hover {
    background-color: rgba(13, 110, 253, 0.15);
}

.file-item .file-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}

.file-item .file-size {
    color: #6c757d;
    font-size: 0.85rem;
}

.file-item .remove-file {
    cursor: pointer;
    color: var(--danger-color);
    font-size: 1.2rem;
}

/* 按钮样式 */
.convert-btn {
    padding: 0.7rem 2.5rem;
    transition: var(--transition);
    font-weight: 600;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(13, 110, 253, 0.4);
    border-radius: 30px;
}

.convert-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(13, 110, 253, 0.5);
}

.download-btn {
    padding: 0.7rem 2.5rem;
    transition: var(--transition);
    font-weight: 600;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.4);
    border-radius: 30px;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(40, 167, 69, 0.5);
}

/* 转换结果表格 */
.results-header {
    padding: 1rem 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.results-table {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.results-table thead {
    background-color: #f8f9fa;
}

.results-table th, .results-table td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
}

.status-success {
    color: var(--success-color);
    font-weight: 500;
}

.status-failed {
    color: var(--danger-color);
    font-weight: 500;
}

/* 高级选项区 */
#advanced-options {
    overflow: hidden;
    transition: all 0.4s ease;
    opacity: 0;
    max-height: 0;
}

#advanced-options.show {
    opacity: 1;
    max-height: 1000px;
}

.option-group {
    margin-bottom: 1.2rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid #eee;
}

.option-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.option-group label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
        margin-top: 10px;
    }
    
    .card {
        border-radius: 5px;
    }
    
    .upload-placeholder i {
        font-size: 2rem;
    }
    
    .convert-btn, .download-btn {
        width: 100%;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#conversion-results {
    animation: fadeIn 0.5s ease-out;
}

/* 加载动画增强 */
.spinner-border {
    margin-right: 8px;
}

/* 页面加载动画 */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-in-out;
}

.loader-hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-icon {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(13, 110, 253, 0.2);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 标题区域增强 */
.main-title {
    font-weight: 800;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.7);
    color: #000;
}

.title-subtitle {
    font-size: 1rem;
    font-weight: 600;
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.6);
    color: #212529;
} 