/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* 头部样式 - 更加醒目 */
.header {
    text-align: center;
    margin-bottom: 50px;
    color: white;
    position: relative;
}

.header::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    z-index: 0;
}

.header h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
    font-weight: 700;
}

.subtitle {
    font-size: 1.3rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/* 特色功能展示 */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.feature {
    background: rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.feature h3 {
    color: white;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.feature p {
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
}

/* 主要内容区域 - 更现代化 */
.main-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

/* 上传区域 - 更美观 */
.upload-section {
    margin-bottom: 40px;
}

.upload-area {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 50px 30px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.upload-area:hover {
    border-color: #5a67d8;
    background: linear-gradient(135deg, #f0f4ff 0%, #e6f0ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
}

.upload-area.dragover {
    border-color: #5a67d8;
    background: linear-gradient(135deg, #e6f0ff 0%, #d6e4ff 100%);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
    color: #667eea;
}

.upload-area h3 {
    margin-bottom: 15px;
    color: #2d3748;
    font-size: 1.4rem;
    font-weight: 600;
}

.upload-area p {
    color: #718096;
    margin-bottom: 25px;
    font-size: 1rem;
    line-height: 1.5;
}

.upload-btn {
    background: linear-gradient(135deg, #667eea 0%, #5a67d8 100%);
    color: white;
    border: none;
    padding: 15px 35px;
    border-radius: 30px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* 预览区域 - 更详细 */
.preview-section {
    margin-top: 30px;
    padding: 25px;
    background: #f7fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.preview-section.visible {
    animation: fadeInUp 0.5s ease;
}

.preview-section h4 {
    margin-bottom: 20px;
    color: #2d3748;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.preview-section h4::before {
    content: '👁️';
    font-size: 1.3rem;
}

.preview-container {
    display: flex;
    align-items: center;
    gap: 30px;
}

#previewCanvas {
    border: 3px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.preview-info {
    flex: 1;
}

.preview-info p {
    margin-bottom: 10px;
    color: #4a5568;
    font-size: 0.95rem;
    display: flex;
    justify-content: space-between;
    max-width: 250px;
}

.preview-info strong {
    color: #2d3748;
}

/* 设置区域 - 更直观 */
.settings-section {
    margin-bottom: 40px;
    padding: 25px;
    background: #f7fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.settings-section h3 {
    margin-bottom: 20px;
    color: #2d3748;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-section h3::before {
    content: '⚙️';
    font-size: 1.3rem;
}

.size-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 0;
}

.size-option {
    display: flex;
    align-items: center;
    padding: 20px 15px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    justify-content: center;
}

.size-option:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.size-option input[type="radio"]:checked + span {
    color: #667eea;
    font-weight: bold;
}

.size-option input[type="radio"] {
    margin-right: 12px;
}

.size-option span {
    font-size: 1.1rem;
    font-weight: 500;
}

/* 操作区域 - 更突出 */
.action-section {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border-radius: 15px;
    border: 1px solid #e2e8f0;
}

.convert-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px 45px;
    border-radius: 30px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 25px;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.convert-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.convert-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.convert-btn:hover:not(:disabled)::before {
    left: 100%;
}

.convert-btn:disabled {
    background: #a0aec0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.download-section {
    margin-top: 0;
    animation: fadeIn 0.5s ease;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    text-decoration: none;
    padding: 15px 35px;
    border-radius: 30px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.download-btn:hover {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
}

/* 说明区域 - 更详细美观 */
.instructions, .favicon-info, .installation {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.instructions::before, .favicon-info::before, .installation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.instructions h2, .favicon-info h2, .installation h2 {
    margin-bottom: 30px;
    color: #2d3748;
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    position: relative;
}

.instructions h2::after, .favicon-info h2::after, .installation h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

.instruction-list {
    display: grid;
    gap: 25px;
}

.instruction-item {
    padding: 25px;
    background: #f7fafc;
    border-radius: 12px;
    border-left: 5px solid #667eea;
    transition: all 0.3s ease;
    position: relative;
}

.instruction-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.instruction-item h4 {
    margin-bottom: 15px;
    color: #2d3748;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.instruction-item p {
    color: #4a5568;
    line-height: 1.6;
    font-size: 1rem;
}

/* Favicon信息 - 白色背景 */
.favicon-info {
    background: white !important;
}

.info-content {
    line-height: 1.8;
    font-size: 1.05rem;
}

.info-content p {
    margin-bottom: 20px;
    color: #4a5568;
}

.browser-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.browser-example {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: #f7fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.browser-example:hover {
    background: #edf2f7;
    transform: translateY(-2px);
}

.browser-icon {
    font-size: 1.5rem;
}

/* 安装步骤 - 更清晰 */
.installation-steps {
    display: grid;
    gap: 25px;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 25px;
    background: #f7fafc;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.step:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    font-weight: bold;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.step-content {
    flex: 1;
}

.step p {
    margin-bottom: 15px;
    color: #4a5568;
    line-height: 1.6;
}

.step pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 15px 0;
    font-size: 0.95rem;
    border-left: 4px solid #667eea;
}

.step code {
    font-family: 'Courier New', Consolas, monospace;
}

/* 消息样式 */
.message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    padding: 15px 25px;
    border-radius: 10px;
    color: white;
    font-weight: 500;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    animation: slideDown 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    min-width: 300px;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.message-error {
    background: linear-gradient(135deg, #e53e3e, #c53030);
}

.message-success {
    background: linear-gradient(135deg, #38a169, #2f855a);
}

.message-warning {
    background: linear-gradient(135deg, #d69e2e, #b7791f);
}

.message-loading {
    background: linear-gradient(135deg, #3182ce, #2c5aa0);
}

.message-icon {
    font-size: 1.2rem;
}

.message-text {
    font-size: 0.95rem;
}

/* 页脚 */
.footer {
    text-align: center;
    color: white;
    padding: 30px 0 20px;
    margin-top: 40px;
}

.footer p:first-child {
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-weight: 500;
}

.footer p:last-child {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -30px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }
    
    .header h1 {
        font-size: 2.2rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    .main-content {
        padding: 25px;
        border-radius: 15px;
    }
    
    .upload-area {
        padding: 30px 20px;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
    
    .size-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .preview-container {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .preview-info {
        width: 100%;
    }
    
    .preview-info p {
        justify-content: space-between;
        max-width: none;
    }
    
    .features {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .browser-examples {
        grid-template-columns: 1fr;
    }
    
    .instructions, .favicon-info, .installation {
        padding: 25px;
        border-radius: 15px;
    }
    
    .instructions h2, .favicon-info h2, .installation h2 {
        font-size: 1.6rem;
    }
}