/* ========================================
   index.html 专用样式
   从 HTML 中提取的内联样式
   ======================================== */

/* ========== 图片上传按钮样式 ========== */
.upload-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(79, 172, 254, 0.3);
    flex-shrink: 0;
}

.upload-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.5);
}

.upload-btn:active {
    transform: scale(0.95);
}

.upload-icon {
    font-size: 20px;
    color: white;
}

.upload-icon::before {
    content: '📷';
}

.mic-icon::before {
    content: '🎤';
}

/* ========== 图片预览样式 ========== */
.image-preview {
    max-width: 300px;
    max-height: 200px;
    border-radius: 8px;
    margin: 10px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.image-message {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.image-message img {
    max-width: 100%;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.image-message img:hover {
    transform: scale(1.02);
}

/* ==========  图片识别模式选择器样式 ========== */
.vision-mode-selector {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 8px;
    animation: fadeInSlide 0.3s ease-out;
}

.vision-mode-select,
.vision-response-length-select {
    padding: 8px 32px 8px 12px;
    font-size: 13px;
    border: 2px solid #667eea;
    border-radius: 20px;
    background: linear-gradient(135deg, #fff 0%, #f8f9ff 100%);
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
    min-width: 140px;
}

.vision-mode-select:hover,
.vision-response-length-select:hover {
    border-color: #764ba2;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transform: translateY(-1px);
}

.vision-mode-select:focus,
.vision-response-length-select:focus {
    border-color: #764ba2;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.vision-mode-select option,
.vision-response-length-select option {
    padding: 8px 12px;
    font-size: 13px;
}

/* 深色模式支持 */
body.dark-theme .vision-mode-select,
body.dark-theme .vision-response-length-select {
    background: linear-gradient(135deg, #2d2d3e 0%, #3a3a4e 100%);
    border-color: #667eea;
    color: #e0e0e0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

body.dark-theme .vision-mode-select option,
body.dark-theme .vision-response-length-select option {
    background: #2d2d3e;
    color: #e0e0e0;
}

/* 动画 */
@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式支持 */
@media (max-width: 768px) {
    .vision-mode-selector {
        margin: 4px 0;
        width: 100%;
    }
    
    .vision-mode-select {
        width: 100%;
        min-width: unset;
        font-size: 12px;
        padding: 6px 28px 6px 10px;
    }
}
