/* 全新的GIF转换工具样式 */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #2d3748;
    font-size: 16px;
    line-height: 1.6;
}

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

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

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

header p {
    font-size: 1.1rem;
    opacity: 0.95;
    line-height: 1.6;
    font-weight: 500;
}

.help-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255,255,255,0.2);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.help-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255,255,255,0.15);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lang-btn:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-2px);
}

/* 标签页样式 */
.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    gap: 10px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 15px 25px;
    border: none;
    background: rgba(255,255,255,0.2);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.tab-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: white;
    color: #667eea;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* 标签页内容 */
.tab-content {
    display: none;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 
        0 10px 30px rgba(0,0,0,0.2),
        0 1px 3px rgba(0,0,0,0.08),
        0 3px 6px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(20px) scale(0.95);
}

.tab-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tab-content.active::before {
    opacity: 1;
}

.tab-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* 上传区域样式 */
.upload-section {
    margin-bottom: 30px;
}

.upload-area {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(145deg, #ffffff 0%, #f8f9ff 100%);
    position: relative;
    box-shadow: 
        0 2px 8px rgba(102, 126, 234, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 18px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.upload-area:hover {
    border-color: #764ba2;
    background: #f0f2ff;
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.15),
        0 3px 10px rgba(102, 126, 234, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.upload-area.dragover {
    border-color: #764ba2;
    background: #e8ebff;
    transform: scale(1.02);
    box-shadow: 
        0 12px 35px rgba(102, 126, 234, 0.25),
        0 5px 15px rgba(102, 126, 234, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    animation: pulse 1.5s ease-in-out infinite;
}

.upload-area.dragover::before {
    opacity: 1;
}

.upload-icon {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 15px;
}

.upload-area p {
    font-size: 1.2rem;
    color: #5a6fd1;
    margin-bottom: 5px;
    font-weight: 600;
    line-height: 1.4;
}

.upload-hint {
    font-size: 0.9rem !important;
    color: #999 !important;
}

/* 预览区域 */
.preview-section {
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(145deg, #f8f9ff 0%, #ffffff 100%);
    border-radius: 10px;
    box-shadow: 
        0 4px 12px rgba(102, 126, 234, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(102, 126, 234, 0.08);
    transition: all 0.3s ease;
    color: #2d3748;
}

.preview-section:hover {
    box-shadow: 
        0 6px 20px rgba(102, 126, 234, 0.12),
        0 2px 6px rgba(102, 126, 234, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

#videoElement {
    width: 100%;
    max-width: 500px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.video-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.control-btn {
    padding: 8px 15px;
    border: none;
    background: linear-gradient(145deg, #667eea, #5a6fd1);
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.control-btn:hover {
    background: linear-gradient(145deg, #5a6fd1, #4c5bb0);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

#timeDisplay {
    font-weight: 700;
    color: #5a6fd1;
    margin-left: 10px;
    font-size: 0.95rem;
}

/* 图片列表 */
.image-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.image-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
}

.image-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
}

.image-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.image-name {
    display: block;
    padding: 8px;
    font-size: 0.8rem;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 25px;
    height: 25px;
    border: none;
    background: rgba(255,0,0,0.8);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: all 0.3s ease;
    opacity: 0.8;
    transform: scale(0.9);
}

.remove-btn:hover {
    background: rgba(255,0,0,1);
    transform: scale(1.2);
    opacity: 1;
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
}

/* 设置区域 */
.settings-section {
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9ff 100%);
    border-radius: 15px;
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.1),
        0 3px 10px rgba(102, 126, 234, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(102, 126, 234, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    transform-style: preserve-3d;
}

.settings-section:hover {
    box-shadow: 
        0 12px 35px rgba(102, 126, 234, 0.15),
        0 5px 15px rgba(102, 126, 234, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

.settings-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

/* 设置区域标题样式 */
.settings-section h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #4a5568;
    text-align: center;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: linear-gradient(145deg, #f8f9ff, #ffffff);
    border-radius: 10px;
    border: 1px solid rgba(102, 126, 234, 0.08);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.05);
}

.settings-section h3 i {
    color: #667eea;
    margin-right: 8px;
}

.setting-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 20px;
}

.setting-group label {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #3d4856;
}

.setting-group input[type="number"], .setting-group select {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    background: linear-gradient(145deg, #ffffff, #f8f9ff);
    color: #3d4856;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23667eea" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.setting-group select {
    width: 100%;
}

.setting-group input[type="number"] {
    width: 100px;
    text-align: center;
    appearance: textfield;
}

.setting-group input[type="number"]::-webkit-inner-spin-button,
.setting-group input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.setting-group select:focus,
.setting-group input[type="number"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15), 0 4px 12px rgba(102, 126, 234, 0.2);
    transform: translateY(-1px);
}

.setting-group select:hover,
.setting-group input[type="number"]:hover {
    border-color: #a0aec0;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.12);
    transform: translateY(-1px);
}

.setting-group select option {
    background: white;
    color: #3d4856;
    padding: 12px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.setting-group select option:hover {
    background: #f0f2ff;
    color: #667eea;
}

.setting-group select option:checked {
    background: #667eea;
    color: white;
    font-weight: 600;
}

/* 修复选中选项不显示的问题 */
.setting-group select {
    color: #3d4856;
    background-color: white;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23667eea" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 40px;
}

.setting-group select:focus {
    color: #3d4856;
}

.setting-group select option:checked::after {
    content: "✓";
    float: right;
    margin-left: 10px;
    font-weight: bold;
    color: white;
}

/* 美化滑块样式 */
.setting-group input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, #667eea var(--value), #e2e8f0 var(--value));
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: all 0.3s ease;
}

.setting-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(145deg, #667eea, #764ba2);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    transform: scale(1);
    border: 2px solid white;
}

.setting-group input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4), 0 0 0 8px rgba(102, 126, 234, 0.1);
}

.setting-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(145deg, #667eea, #764ba2);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    transform: scale(1);
}

.setting-group input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4), 0 0 0 8px rgba(102, 126, 234, 0.1);
}

.setting-group input[type="range"]::-moz-range-track {
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    border: none;
}

/* 滑块值显示样式 */
.setting-group label span[id$="Value"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    padding: 4px 8px;
    background: linear-gradient(145deg, #667eea, #764ba2);
    color: white;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

/* 滑块容器样式 */
.slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

/* 单位标签样式 */
.slider-container span:not([id]) {
    font-size: 0.9rem;
    font-weight: 600;
    color: #718096;
    background: #f7fafc;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    min-width: 35px;
    text-align: center;
}

.slider-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 0.8rem;
    color: #718096;
}

.setting-hint {
    text-align: center;
    margin-top: 15px;
    color: #f59e0b;
    background-color: #fef3c7;
    padding: 8px 16px;
    border-radius: 4px;
    border-left: 4px solid #f59e0b;
}

.setting-hint small {
    font-size: 0.85rem;
    font-weight: 500;
}

/* 符号转换样式 */
.converter-section {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: linear-gradient(145deg, #f8f9ff 0%, #ffffff 100%);
    border-radius: 15px;
    box-shadow: 
        0 6px 20px rgba(102, 126, 234, 0.1),
        0 2px 8px rgba(102, 126, 234, 0.05);
    border: 1px solid rgba(102, 126, 234, 0.08);
}

.converter-section h3 {
    text-align: center;
    margin-bottom: 25px;
    color: #667eea;
    font-size: 1.5rem;
}

.input-group, .output-group {
    margin-bottom: 20px;
}

.input-group label, .output-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #3d4856;
    font-size: 0.95rem;
}

.input-group textarea, .output-group textarea {
    width: 100%;
    height: 120px;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
    background: linear-gradient(145deg, #ffffff, #f8f9ff);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
    color: #2d3748;
    line-height: 1.5;
}

.input-group textarea:focus, .output-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1), inset 0 2px 4px rgba(0,0,0,0.05);
    transform: translateY(-1px);
}

.convert-options {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.convert-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #4a5568;
    cursor: pointer;
    font-weight: 500;
}

.convert-options input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
}

.convert-options input[type="checkbox"]:hover {
    transform: scale(1.1);
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s ease-in-out infinite;
}

.loading.large {
    width: 40px;
    height: 40px;
    border-width: 4px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 加载遮罩 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 元素进入动画 */
.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* 按钮样式 */
.convert-btn {
    width: 100%;
    padding: 15px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    box-shadow: 
        0 4px 12px rgba(102, 126, 234, 0.3),
        0 1px 3px rgba(102, 126, 234, 0.15);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.convert-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.convert-btn:hover:not(:disabled)::before {
    left: 100%;
}

.convert-btn:hover:not(:disabled) {
    transform: translateY(-2px) translateZ(2px);
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.4),
        0 3px 10px rgba(102, 126, 234, 0.2),
        0 1px 3px rgba(102, 126, 234, 0.15);
}

.convert-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.action-btn {
    padding: 10px 20px;
    border: 2px solid #667eea;
    background: transparent;
    color: #667eea;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn:hover {
    background: #667eea;
    color: white;
}

.download-btn {
    width: 100%;
    padding: 14px 20px;
    border: none;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 
        0 6px 20px rgba(40, 167, 69, 0.35),
        0 2px 8px rgba(40, 167, 69, 0.2);
    margin-top: 10px;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.download-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.download-btn:hover {
    background: linear-gradient(135deg, #218838 0%, #17a2b8 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(40, 167, 69, 0.4),
        0 3px 10px rgba(40, 167, 69, 0.2),
        0 1px 3px rgba(40, 167, 69, 0.15);
}

.download-btn:hover::before {
    left: 100%;
}

/* 结果区域 */
.result-section {
    text-align: center;
    padding: 25px;
    background: linear-gradient(145deg, #f8f9ff 0%, #ffffff 100%);
    border-radius: 15px;
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.12),
        0 3px 12px rgba(102, 126, 234, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(102, 126, 234, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 20px;
    position: relative;
    overflow: hidden;
}

.result-section:hover {
    box-shadow: 
        0 12px 35px rgba(102, 126, 234, 0.18),
        0 5px 20px rgba(102, 126, 234, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

.result-section img {
    max-width: 100%;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    border: 3px solid white;
}

.result-section img:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 35px rgba(0,0,0,0.2);
}

/* 还原结果样式 */
.restore-result-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.08);
    margin-bottom: 20px;
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.08);
}

.restore-result-item:hover {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.restore-result-item h4 {
    margin: 0 0 15px 0;
    color: #3d4856;
    font-size: 1.1rem;
    font-weight: 600;
}

.restore-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 15px;
}

.restore-image-container {
    background: linear-gradient(145deg, #f8f9ff 0%, #ffffff 100%);
    border-radius: 10px;
    padding: 15px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid rgba(102, 126, 234, 0.08);
}

.restore-image-label {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #718096;
    text-align: center;
}

.restore-image-container img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 0;
    transition: all 0.3s ease;
}

.restore-image-container img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.restore-download-btn {
    width: 100%;
    margin-top: 15px;
}

.restore-result-item .download-btn {
    margin-top: 15px;
    font-size: 1rem;
    padding: 12px 20px;
}

/* 消息提示 */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    z-index: 1000;
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 320px;
    word-wrap: break-word;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-left: 4px solid currentColor;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.message.success {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.95), rgba(32, 201, 151, 0.95));
    border-left-color: #28a745;
}

.message.error {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.95), rgba(255, 72, 87, 0.95));
    border-left-color: #dc3545;
}

.message.warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.95), rgba(255, 214, 10, 0.95));
    color: #333;
    border-left-color: #ffc107;
}

.message.info {
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.95), rgba(0, 193, 222, 0.95));
    border-left-color: #17a2b8;
}

@keyframes slideIn {
    from {
        transform: translateX(100%) translateY(-20px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateX(0) translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0) translateY(0) scale(1);
        opacity: 1;
    }
    to {
        transform: translateX(100%) translateY(-20px) scale(0.9);
        opacity: 0;
    }
}

.message.fade-out {
    animation: slideOut 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* 动画效果 */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 12px 35px rgba(102, 126, 234, 0.25), 0 5px 15px rgba(102, 126, 234, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    }
    50% {
        box-shadow: 0 16px 45px rgba(102, 126, 234, 0.35), 0 8px 25px rgba(102, 126, 234, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    }
}

/* 访问量统计卡片 */
.visit-stats-card {
    margin: 40px auto 0;
    padding: 20px 30px;
    max-width: 360px;
    border-radius: 18px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    gap: 18px;
    color: white;
    backdrop-filter: blur(12px);
}

.visit-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(145deg, #ffffff33, #ffffff11);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #ffe066;
    box-shadow: inset 0 2px 6px rgba(255,255,255,0.3);
}

.visit-info span {
    display: block;
    font-size: 0.95rem;
    letter-spacing: 1px;
    opacity: 0.85;
}

.visit-info strong {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin-top: 4px;
    transition: opacity 0.3s ease;
}

.visit-info strong:not(.loaded) {
    opacity: 0.6;
}

/* 页脚 */
footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .tabs {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .tab-btn {
        width: 100%;
        max-width: 320px;
        justify-content: center;
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    .tab-content {
        padding: 20px;
        margin-top: 15px;
    }
    
    .setting-group {
        flex-direction: column;
        gap: 20px;
        margin-bottom: 15px;
    }
    
    .setting-group label {
        gap: 10px;
    }
    
    .setting-group input[type="number"] {
        width: 120px;
        padding: 14px 18px;
        font-size: 1.1rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .video-controls {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .image-list {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }
    
    .upload-area {
        padding: 50px 15px;
    }
    
    .upload-icon {
        font-size: 2.5rem;
    }
    
    .control-btn {
        padding: 10px 18px;
        font-size: 0.95rem;
    }
    
    .action-btn, .download-btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    .converter-section {
        padding: 15px;
    }
    
    .input-group textarea, .output-group textarea {
        height: 140px;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .upload-area {
        padding: 40px 15px;
    }
    
    .upload-icon {
        font-size: 2rem;
    }
    
    .message {
        right: 10px;
        left: 10px;
        max-width: none;
        padding: 14px 20px;
    }
    
    .result-section {
        padding: 20px;
    }
    
    .result-section img {
        margin-bottom: 15px;
    }
    
    .download-btn {
        padding: 12px 16px;
        font-size: 1rem;
    }
}

/* 加载动画 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spin {
    animation: spin 1s linear infinite;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #5a6fd1;
}
