/* 自定义样式文件 - 从 index.php 提取 */

/* 加载状态样式 */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* 自定义滚动条样式 */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 加载动画样式 */
.loader {
    border: 4px solid rgb(229, 231, 235);
    border-top: 4px solid #165DFF;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 模态框动画样式 */
.modal-content {
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.3s ease-in-out;
}

.modal-content.active {
    transform: scale(1);
    opacity: 1;
}

/* 确保模态框背景层正确显示 */
.modal-backdrop {
    transition: opacity 0.3s ease-in-out;
}

.modal-backdrop.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-backdrop:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

/* 从 index.php 移动的自定义 Utility 样式 */
.content-auto {
    content-visibility: auto;
}

.text-shadow {
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.transition-height {
    transition: max-height 0.5s ease-in-out;
}

.scrollbar-thin {
    scrollbar-width: thin;
}

.scrollbar-thin::-webkit-scrollbar {
    width: 6px;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
    background-color: rgba(156, 163, 175, 0.5);
    border-radius: 3px;
}

/* 按钮和输入框样式已迁移到ui-components.css */

.card-input:focus {
    border-color: #165DFF;
    outline: none;
    box-shadow: 0 0 0 2px rgba(22, 93, 255, 0.2);
}

.btn-verify {
    background-color: #165DFF;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    font-size: 0.875rem;
}

.btn-verify:hover {
    background-color: rgba(22, 93, 255, 0.9);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
}

.btn-send {
    background-color: #165DFF;
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-send:hover {
    background-color: rgba(22, 93, 255, 0.9);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
}

/* 警告模态框样式已迁移到ui-components.css和ui-templates.js */

/* 模型选项样式 - 清晰简洁的设计 */
.model-option label {
    transition: all 0.3s ease;
    /* 默认未选中状态：灰色背景和浅黑色边框 */
    background-color: #f9fafb !important; /* gray-50 */
    border-color: rgba(107, 114, 128, 0.35) !important; /* gray-500 with 35% opacity */
    border-width: 2px !important;
    transform: translateY(0);
}

/* 悬停效果 */
.model-option label:hover {
    transform: translateY(-2px);
}

/* 卡通图标动画 */
.model-option label:hover .text-2xl {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* 特色标签动画 */
.model-option label:hover span[class*="px-2"] {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

/* 模型选项选中状态样式 */
.model-option.selected label,
.model-option input:checked + label {
    border-width: 2px !important;
}

/* 降低重复率选中状态 */
.model-option.selected[data-value="Reduce_duplication"] label,
.model-option input[value="Reduce_duplication"]:checked + label {
    border-color: #f97316 !important; /* orange-500 */
    background-color: #fff7ed !important; /* orange-50 */
}

/* 降AIGC率选中状态 */
.model-option.selected[data-value="Reduce_AIGC"] label,
.model-option input[value="Reduce_AIGC"]:checked + label {
    border-color: #3b82f6 !important; /* blue-500 */
    background-color: #eff6ff !important; /* blue-50 */
}

/* 选中状态√图标样式 */
.selected-check {
    z-index: 10;
    transition: all 0.2s ease;
}

/* 模型选项选中时显示√图标 */
.model-option.selected .selected-check,
.model-option input:checked + label .selected-check {
    opacity: 1 !important;
    transform: scale(1) !important;
}

/* 平台选项选中时显示√图标 */
.platform-option input:checked + label .selected-check {
    opacity: 1 !important;
    transform: scale(1) !important;
}

/* 手机端模型选项特殊样式 - 确保无阴影 */
@media (max-width: 1023px) {
    .model-option label {
        box-shadow: none !important;
    }
    
    .model-option label:hover {
        box-shadow: none !important;
    }
    
    .model-option.selected label,
    .model-option input:checked + label {
        box-shadow: none !important;
    }
}

/* 手机端降AIGC率选项特殊处理 - 完全移除阴影和边框效果 */
#mobile-aigc-label {
    box-shadow: none !important;
    filter: none !important;
    -webkit-filter: none !important;
    text-shadow: none !important;
    border-shadow: none !important;
}

#mobile-aigc-label:hover {
    box-shadow: none !important;
    filter: none !important;
    -webkit-filter: none !important;
}

#mobile-aigc-label:focus {
    box-shadow: none !important;
    outline: none !important;
}

#mobile-aigc-label:active {
    transform: scale(0.98);
    transition: transform 0.1s ease-in-out;
}

/* 移除差异对比样式 */

/* 自动刷新提示框样式 */
.auto-refresh-alert {
    animation: slideInFromTop 0.3s ease-out;
    backdrop-filter: blur(5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auto-refresh-alert:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

@keyframes slideInFromTop {
    from {
        transform: translate(-50%, -100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* 刷新倒计时数字强调 */
#refresh-countdown {
    font-weight: bold;
    font-size: 1.1em;
    color: #fbbf24;
}

/* 取消按钮悬停效果 */
#cancel-refresh:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 2px 6px;
    transition: all 0.2s ease;
}

/* 响应式设计 */
@media (max-width: 640px) {
    .auto-refresh-alert {
        left: 1rem !important;
        right: 1rem !important;
        transform: translateX(0) !important;
        width: auto !important;
        max-width: none !important;
    }
    
    .auto-refresh-alert .flex {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .auto-refresh-alert #cancel-refresh {
        align-self: flex-end;
        margin-left: 0 !important;
    }
}