/* 风格和预设选项卡片选中状态优化 */

/* 风格卡片选中状态 */
.style-card {
    position: relative;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.style-card.active {
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
    transform: translateY(-5px);
}

.style-card.active::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.style-card.active span {
    color: var(--primary-color);
    font-weight: bold;
}

/* 预设卡片选中状态 */
.preset-card {
    position: relative;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.preset-card.active, 
.preset-card:hover {
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
    transform: translateY(-5px);
}

.preset-card.active::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    z-index: 5;
}

.preset-card.active .preset-card-name {
    color: var(--primary-color);
    font-weight: bold;
}

/* Tab切换按钮美化 */
.tab-container {
    margin-bottom: 1.5rem;
    background-color: #f5f5ff;
    border-radius: 12px;
    padding: 6px;
    border: none;
}

.tab-buttons {
    display: flex;
    gap: 5px;
    background: transparent;
}

.tab-btn {
    flex: 1;
    padding: 12px 24px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: var(--text-light);
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: none;
}

.tab-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.1), rgba(236, 72, 153, 0.1));
    transition: width 0.3s ease;
    z-index: -1;
}

.tab-btn:hover:before {
    width: 100%;
}

.tab-btn.active {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    color: white;
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3);
    border: none;
    transform: translateY(-2px);
}

.tab-btn.active:before {
    display: none;
}

.tab-btn i {
    margin-right: 8px;
}

/* 添加动画效果 */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(139, 92, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0);
    }
}

/* 按钮脉冲动画 */
.button-pulse {
    animation: buttonPulse 0.5s ease-in-out;
}

@keyframes buttonPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 纵横比选择器样式优化 */
.option-group.ratio-group {
    position: relative;
    z-index: 10;
}

.aspect-ratio-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: #fff;
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.25rem;
    
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
    transition: all 0.2s ease;
    cursor: pointer;
}

.aspect-ratio-btn:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.2);
}

.aspect-ratio-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 160px;
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    padding: 8px 0;
    margin-top: 4px;
    z-index: 100;
    display: none;
}

.aspect-ratio-dropdown.show {
    display: block;
    animation: fadeInDropdown 0.2s ease;
}

@keyframes fadeInDropdown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ratio-option {
    padding: 8px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    transition: all 0.2s ease;
}

.ratio-option:hover {
    background-color: #f5f5ff;
    color: var(--primary-color);
}

.ratio-option.active {
    color: var(--primary-color);
    font-weight: 500;
    background-color: rgba(139, 92, 246, 0.1);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .tab-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .aspect-ratio-btn {
        /*padding: 6px 10px;*/
        font-size: 0.8rem;
    }
    
    .aspect-ratio-dropdown {
        width: 140px;
    }
}
