/* ============ 在线生成 favicon.ico - 工具特有样式 ============ */
/* 通用样式（卡片、按钮、分隔线、info-box、empty-state、card-header-*、
   setting-item、setting-label、mode-btn 等）已由 common.css 统一提供 */

#favicon-container {
    margin-bottom: 15px;
}

/* ---- 上传区（common.css 未提供，沿用图片 EXIF 视觉） ---- */
.upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 60px 40px;
    border: 3px dashed #d1d5db;
    border-radius: 16px;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-area:hover,
.upload-area.dragging {
    border-color: #8b5cf6;
    background: #f5f3ff;
}

.upload-icon {
    font-size: 48px;
}

.upload-text {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
}

.upload-hint {
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
    line-height: 1.6;
}

/* 已上传图片预览 */
.preview-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.preview-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* ---- 预设按钮组（基于 common.css .mode-btn） ---- */
.preset-group {
    display: flex;
    gap: 8px;
}

.preset-group .mode-btn {
    flex: 1;
    padding: 10px 8px;
    font-size: 13px;
}

/* ---- 尺寸复选网格 ---- */
.size-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}

.size-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 8px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    color: #374151;
    transition: all 0.2s;
    white-space: nowrap;
    box-sizing: border-box;
}

.size-checkbox:hover {
    border-color: #c4b5fd;
}

.size-checkbox:has(input:checked) {
    border-color: #8b5cf6;
    background: #f5f3ff;
    color: #6d28d9;
}

.size-checkbox input[type="checkbox"] {
    accent-color: #8b5cf6;
}

/* ---- 预览区 ---- */
.preview-area {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.favicon-preview {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.preview-title {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.browser-mockup {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.browser-header {
    background: #f3f4f6;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.browser-dots {
    display: flex;
    gap: 6px;
}

.browser-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d1d5db;
}

.browser-tabs {
    flex: 1;
    display: flex;
    gap: 8px;
}

.tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #ffffff;
    border-radius: 6px 6px 0 0;
    font-size: 12px;
    color: #374151;
}

.tab.active {
    border-bottom: 2px solid #8b5cf6;
}

.tab-icon {
    width: 16px;
    height: 16px;
}

.browser-content {
    background: #ffffff;
    padding: 12px;
}

.address-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f3f4f6;
    border-radius: 8px;
    font-size: 13px;
    color: #6b7280;
}

.lock-icon {
    font-size: 12px;
}

.page-content {
    margin-top: 12px;
    padding: 30px;
    background: #f9fafb;
    border-radius: 8px;
    text-align: center;
}

.welcome-text {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
}

/* ---- 多尺寸图标网格 ---- */
.icons-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 12px;
    width: 100%;
    overflow-x: auto;
}

.icon-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    min-width: 120px;
    flex-shrink: 0;
    box-sizing: border-box;
}

.icon-container {
    width: 100px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: repeating-conic-gradient(#e5e7eb 0% 25%, #f3f4f6 0% 50%) 50% / 16px 16px;
    border-radius: 4px;
}

.icon-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.icon-label {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
}

.mini-action {
    padding: 4px 10px;
    background: #f5f3ff;
    color: #7c3aed;
    border: 1px solid #e9d5ff;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.mini-action:hover {
    background: #ede9fe;
    border-color: #8b5cf6;
}

/* ---- 响应式 ---- */
@media (max-width: 1100px) {
    .size-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
