/* 图片转ICO工具专用样式 */

/* 上传区域样式 */
.upload-area {
    margin-bottom: 30px;
}

.upload-title {
    font-size: 1.8em;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}

.upload-subtitle {
    color: #666;
    text-align: center;
    margin-bottom: 25px;
    font-size: 1em;
}

.upload-zone {
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 60px 30px;
    text-align: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.upload-zone:hover {
    border-color: #4facfe;
    background: linear-gradient(135deg, #e8ecf1 0%, #b8c6db 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.upload-zone.drag-over {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-width: 3px;
}

.upload-zone.drag-over .upload-icon,
.upload-zone.drag-over .upload-text {
    color: white;
}

.upload-icon {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.8;
}

.upload-text {
    margin-bottom: 20px;
}

.upload-main-text {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 8px;
}

.upload-sub-text {
    font-size: 0.9em;
    color: #666;
}

/* 文件列表样式 */
.file-list {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: white;
    border-radius: 6px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.file-item:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transform: translateX(5px);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.file-icon {
    font-size: 1.5em;
}

.file-details {
    flex: 1;
}

.file-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.file-size {
    font-size: 0.85em;
    color: #999;
}

.file-remove {
    background: #ff4444;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    transition: background 0.2s ease;
}

.file-remove:hover {
    background: #cc0000;
}

/* 配置选项区域 */
.options-area {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.options-title {
    font-size: 1.4em;
    color: #333;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.option-group {
    margin-bottom: 25px;
}

.option-label {
    display: block;
    font-weight: 500;
    color: #555;
    margin-bottom: 12px;
    font-size: 1em;
}

.option-label input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    vertical-align: middle;
    cursor: pointer;
}

.option-hint {
    font-size: 0.85em;
    color: #999;
    margin-top: 8px;
    font-style: italic;
}

/* 尺寸选择样式 */
.size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 15px;
}

.size-checkbox {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.size-checkbox:hover {
    background: linear-gradient(135deg, #e8ecf1 0%, #d4dbe3 100%);
    border-color: #4facfe;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.size-checkbox input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.size-checkbox input[type="checkbox"]:checked + span {
    font-weight: 600;
    color: #667eea;
}

.size-checkbox:has(input:checked) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
}

.size-checkbox:has(input:checked) span {
    color: white;
}

/* 自定义尺寸输入 */
.custom-size-input {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.custom-size-input input[type="number"] {
    flex: 1;
    max-width: 200px;
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.custom-size-input input[type="number"]:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

/* 颜色选择器组 */
.color-input-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-input-group input[type="color"] {
    width: 60px;
    height: 40px;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.color-input-group input[type="color"]:hover {
    border-color: #4facfe;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.color-input-group input[type="text"] {
    flex: 1;
    max-width: 150px;
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    font-family: monospace;
    transition: border-color 0.3s ease;
}

.color-input-group input[type="text"]:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

/* 转换按钮区域 */
.convert-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #f0f0f0;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #555;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #e8ecf1 0%, #b8c6db 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.btn-large {
    padding: 15px 40px;
    font-size: 1.1em;
}

.btn-sm {
    padding: 6px 15px;
    font-size: 0.9em;
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 消息提示样式 */
#message-container {
    margin: 20px 0;
}

.message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-success {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

.message-error {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
}

.message-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.message-close {
    margin-left: auto;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2em;
    line-height: 1;
    transition: background 0.2s ease;
}

.message-close:hover {
    background: rgba(255,255,255,0.3);
}

/* 预览区域样式 */
.preview-area {
    margin-top: 30px;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.preview-title {
    font-size: 1.4em;
    color: #333;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.preview-item {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    transition: all 0.3s ease;
}

.preview-item:hover {
    border-color: #4facfe;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.preview-image {
    width: 64px;
    height: 64px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.preview-image img {
    max-width: 100%;
    max-height: 100%;
    image-rendering: crisp-edges;
}

.preview-info {
    margin-bottom: 15px;
}

.preview-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
    word-break: break-all;
}

.preview-size {
    font-size: 0.85em;
    color: #999;
}

.preview-download {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    width: 100%;
    transition: all 0.3s ease;
}

.preview-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 233, 123, 0.4);
}

/* 工具介绍卡片样式 */
.ico-info-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 16px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.ico-info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.ico-info-card.info-card {
    text-align: left;
    color: white;
    border: none;
}

.ico-info-card.info-card:nth-child(1) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.ico-info-card.info-card:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.ico-info-card.info-card:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.ico-info-card.info-card:nth-child(4) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.ico-info-card.info-card:nth-child(5) {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.ico-info-card.info-card:nth-child(6) {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}

.ico-info-card.info-card:nth-child(7) {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.ico-info-card.info-card:nth-child(8) {
    background: linear-gradient(135deg, #d299c2 0%, #fef9d3 100%);
}

.ico-info-card.info-card:nth-child(9) {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

.ico-info-card.info-card h3 {
    text-align: center;
    color: white;
    font-size: 1.4em;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ico-info-card.info-card h3::before {
    font-size: 1.2em;
}

.ico-info-card.info-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ico-info-card.info-card li {
    background: rgba(255,255,255,0.1);
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 8px;
    border-left: 4px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.ico-info-card.info-card li:hover {
    background: rgba(255,255,255,0.15);
    transform: translateX(5px);
}

.ico-info-card.info-card li strong {
    color: rgba(255,255,255,0.9);
    font-weight: 600;
}

.ico-info-card.info-card p {
    background: rgba(255,255,255,0.1);
    padding: 16px;
    border-radius: 8px;
    line-height: 1.6;
    margin: 0;
    backdrop-filter: blur(10px);
}

.ico-info-card h3 {
    margin-top: 0;
    color: #555;
}

/* 增强原有的工具内容样式 */
.tool-content {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .ico-info-card {
        padding: 20px;
        margin: 20px 0;
    }

    .upload-zone {
        padding: 40px 20px;
    }

    .upload-icon {
        font-size: 3em;
    }

    .options-area {
        padding: 20px;
    }

    .size-options {
        gap: 8px;
    }

    .size-checkbox {
        padding: 8px 12px;
        font-size: 0.9em;
    }

    .convert-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .custom-size-input {
        flex-direction: column;
        align-items: stretch;
    }

    .custom-size-input input[type="number"] {
        max-width: none;
    }
}
