/* ===== ICO 工具样式 ===== */
.ico-tool {
    width: 100%;
    max-width: 100%;
}

.ico-tool-body {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 28px 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

/* ===== 介绍区 ===== */
.ico-tool-intro {
    background: #f8f9fa;
    border-left: 4px solid #ff6b00;
    padding: 14px 18px;
    border-radius: 4px;
    margin-bottom: 24px;
    font-size: 14px;
}
.ico-tool-intro code {
    background: #e9ecef;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 13px;
}
.ico-tool-intro strong {
    color: #d63031;
}
.ico-tool-intro p {
    margin: 4px 0;
}

/* ===== 上传区 ===== */
.ico-drop-zone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 44px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.25s, background 0.25s;
    background: #fafbfc;
}
.ico-drop-zone:hover,
.ico-drop-zone.dragover {
    border-color: #ff6b00;
    background: #fff6ed;
}
.ico-drop-zone p {
    margin: 0;
    font-size: 16px;
    color: #666;
}

/* ===== 预览区 ===== */
.ico-tool-preview {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 16px 0 8px 0;
}
.ico-preview-img {
    position: relative;
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    background: #f0f0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
}
.ico-preview-img img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 4px;
}
.ico-preview-size {
    position: absolute;
    bottom: -10px;
    right: -10px;
    background: #333;
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
}
.ico-preview-info {
    flex: 1;
    min-width: 280px;
}
.ico-preview-info p {
    margin: 6px 0;
    font-size: 14px;
}

/* ===== 尺寸选择器 ===== */
.ico-size-selector {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 14px 16px;
    margin: 8px 0 12px 0;
    border: 1px solid #e9ecef;
}

.ico-mode-group {
    display: flex;
    gap: 20px;
    margin-bottom: 12px;
}
.ico-radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    cursor: pointer;
}
.ico-radio-label input[type="radio"] {
    cursor: pointer;
}

.ico-size-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.ico-size-group label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}
.ico-size-group select {
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    min-width: 200px;
}
.ico-size-group select:focus {
    border-color: #ff6b00;
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 107, 0, 0.15);
}

.ico-size-warning {
    margin-top: 10px;
    padding: 8px 12px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    font-size: 13px;
    color: #856404;
}
.ico-size-warning span {
    font-weight: 600;
}

/* ===== 生成按钮 ===== */
.ico-btn-generate {
    background: #ff6b00;
    color: #fff;
    border: none;
    padding: 10px 32px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
    margin-top: 8px;
}
.ico-btn-generate:hover {
    background: #e05f00;
}
.ico-btn-generate:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== 结果区 ===== */
.ico-tool-result {
    padding: 8px 0 4px 0;
}
.ico-result-success {
    background: #e8f5e9;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 16px;
    margin-bottom: 16px;
}
.ico-result-icon {
    margin-right: 8px;
}
.ico-result-detail {
    background: #f8f9fa;
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 16px;
}
.ico-result-detail p {
    margin: 0 0 6px 0;
    font-weight: 600;
}
.ico-result-detail ul {
    margin: 4px 0 0 0;
    padding-left: 20px;
}
.ico-result-detail li {
    margin: 4px 0;
    font-size: 14px;
}
.ico-result-detail code {
    background: #e9ecef;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 13px;
}
.ico-result-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin: 16px 0 20px 0;
}
.ico-btn-download {
    background: #2d7d46;
    color: #fff;
    border: none;
    padding: 10px 30px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}
.ico-btn-download:hover {
    background: #236a3a;
}
.ico-btn-reset {
    background: #e0e0e0;
    color: #333;
    border: none;
    padding: 10px 24px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}
.ico-btn-reset:hover {
    background: #ccc;
}

/* ===== 使用说明 ===== */
.ico-tool-usage {
    background: #f0f7ff;
    padding: 14px 18px;
    border-radius: 6px;
    border-left: 4px solid #1a73e8;
    margin-top: 20px;
}
.ico-tool-usage p {
    margin: 0 0 6px 0;
}
.ico-tool-usage ol {
    margin: 4px 0 0 0;
    padding-left: 20px;
}
.ico-tool-usage li {
    margin: 4px 0;
    font-size: 14px;
}
.ico-tool-usage code {
    background: #e9ecef;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 13px;
}

/* ===== 错误区 ===== */
.ico-tool-error {
    padding: 16px 0;
}
.ico-error-msg {
    background: #ffebee;
    padding: 12px 16px;
    border-radius: 6px;
    color: #c62828;
    margin-bottom: 14px;
}

/* ===== 响应式 ===== */
@media (max-width: 640px) {
    .ico-tool-body {
        padding: 16px 14px;
    }
    .ico-tool-preview {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }
    .ico-preview-info {
        text-align: center;
        width: 100%;
        min-width: auto;
    }
    .ico-mode-group {
        justify-content: center;
    }
    .ico-size-group {
        justify-content: center;
    }
    .ico-size-group select {
        min-width: 160px;
        width: 100%;
        max-width: 280px;
    }
    .ico-result-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .ico-btn-download,
    .ico-btn-reset {
        text-align: center;
    }
    .ico-drop-zone {
        padding: 28px 16px;
    }
}