/* color-converter.html 私有样式 */

/* ================= 取色器 ================= */
.picker-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sv-panel {
    position: relative;
    height: 200px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    cursor: crosshair;
    touch-action: none;
    background:
        linear-gradient(to top, #000 0%, rgba(0,0,0,0) 100%),
        linear-gradient(to right, #fff 0%, hsl(var(--hue, 0), 100%, 50%) 100%);
    user-select: none;
    -webkit-user-select: none;
}

.sv-pointer {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.5), 0 0 6px rgba(0,0,0,0.3);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.hue-slider input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 12px;
    border-radius: 6px;
    outline: none;
    border: 1px solid #d1d5db;
    cursor: pointer;
    background:
        linear-gradient(to right,
            #f00 0%, #ff8000 8%, #ff0 17%, #80ff00 25%, #0f0 33%,
            #00ff80 42%, #0ff 50%, #0080ff 58%, #00f 67%,
            #7f00ff 75%, #f0f 83%, #ff0080 92%, #f00 100%);
}

.hue-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #667eea;
    box-shadow: 0 0 4px rgba(0,0,0,0.3);
    cursor: pointer;
}

.hue-slider input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #667eea;
    box-shadow: 0 0 4px rgba(0,0,0,0.3);
    cursor: pointer;
}

.picker-tools {
    display: flex;
    gap: 8px;
}

.picker-tool {
    flex: 1;
    justify-content: center;
}

.system-tool {
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.system-tool input[type="color"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    border: none;
    padding: 0;
    margin: 0;
}

/* ================= 颜色预览 ================= */
.color-preview-row {
    display: flex;
    gap: 12px;
}

.color-preview {
    display: flex;
    align-items: center;
    gap: 12px;
}

.preview-box {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    background: transparent;
    transition: background-color 0.3s;
}

.preview-hex {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    font-family: 'Courier New', Courier, monospace;
}

.color-badge {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    border: 3px solid rgba(255,255,255,0.3);
    flex-shrink: 0;
}

.clickable {
    cursor: pointer;
    transition: background-color 0.2s;
}

.clickable:hover {
    background: #f0f4ff;
}

.clickable:active {
    background: #e0e7ff;
}

/* ================= SEO 说明面板 ================= */
.panel.extra-panel .seo-article {
    padding: 4px 6px 2px;
    line-height: 1.85;
    color: #3f4857;
}

.panel.extra-panel .seo-article h2 {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 22px 0 10px;
    padding-left: 12px;
    border-left: 4px solid #667eea;
    line-height: 1.4;
}

.panel.extra-panel .seo-article h2:first-child {
    margin-top: 0;
}

.panel.extra-panel .seo-article p {
    font-size: 14px;
    line-height: 1.9;
    color: #4b5563;
    text-align: justify;
    margin: 8px 0;
}

.panel.extra-panel .seo-article ul {
    margin: 8px 0 0 20px;
    font-size: 14px;
    line-height: 2.1;
    color: #4b5563;
}

.panel.extra-panel .seo-article code {
    background: #eef2ff;
    color: #4338ca;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.panel.extra-panel strong {
    color: #1f2937;
}

@media (max-width: 600px) {
    .color-preview-row {
        flex-direction: column;
    }
    
    .preview-box {
        width: 100%;
        height: 50px;
    }
    
    .preview-hex {
        font-size: 16px;
    }
}
