/* ========================================
   颜色选择器工具样式
   ======================================== */

/* 主内容 */
.main-content { 
    width: 100%; 
    max-width: 800px;
    height: calc(100vh - 120px); 
    display: flex; 
    align-items: center; 
    padding: 0 20px; 
    padding-bottom: 50px; 
    z-index: 10; 
}
.container { width: 100%; height: 100%; }
.tool-card { 
    background: var(--bg-card); 
    border: 1px solid var(--border-color); 
    border-radius: var(--radius-xl); 
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
    width: 100%;
    height: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.picker-area {
    display: flex;
    flex: 1;
    min-height: 0;
}

/* 左侧视觉区 */
.visual-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.2);
    border-right: 1px solid var(--border-color);
    padding: 20px;
    gap: 20px;
}

.preview-box {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    overflow: hidden;
}
.color-display {
    width: 100%;
    height: 100%;
    background-color: var(--primary-color, #3b82f6);
    transition: background-color 0.2s;
}

.native-picker-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: 0.2s;
}
.native-picker-label:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }
.native-picker-label input[type="color"] {
    visibility: hidden;
    width: 0; height: 0;
    position: absolute;
}

.hex-display {
    font-size: 24px;
    font-weight: bold;
    font-family: var(--font-mono, monospace);
    color: var(--text-primary);
    letter-spacing: 1px;
}
.color-info p { margin: 4px 0 0; font-size: 12px; color: var(--text-muted); text-align: center; }

/* 右侧输入区 */
.input-section {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.input-group label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}
.input-wrapper {
    display: flex;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 2px;
    align-items: center;
}
.input-wrapper:focus-within { border-color: var(--primary-color); }

.input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 14px;
    outline: none;
}
.btn-copy {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 12px;
    cursor: pointer;
    transition: 0.2s;
}
.btn-copy:hover { color: var(--text-primary); background: rgba(255,255,255,0.1); border-radius: 4px; }

/* 预设颜色 */
.presets { margin-top: 10px; }
.presets label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 8px; font-weight: 600; }
.preset-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.preset-color {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.1s;
}
.preset-color:hover { transform: scale(1.1); z-index: 1; }

/* 响应式 */
@media (max-width: 768px) {
    .picker-area { flex-direction: column; }
    .visual-section { flex: none; height: 280px; border-right: none; border-bottom: 1px solid var(--border-color); }
    .preview-box { width: 100px; height: 100px; }
    .hex-display { font-size: 20px; }
}
