/* 顶部预设分类 Tabs */
.gradient-tabs-wrapper {
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    white-space: nowrap;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.gradient-tabs-wrapper::-webkit-scrollbar {
    display: none;
}
.gradient-tabs {
    display: flex;
    gap: 1.5rem;
    padding-bottom: 0.75rem;
}
.gradient-tab-item {
    font-size: 0.95rem;
    color: #495057;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
    text-decoration: none;
    user-select: none;
}
.gradient-tab-item:hover {
    color: #0d6efd;
}
.gradient-tab-item.active {
    color: #0d6efd;
    font-weight: 600;
}
.gradient-tab-item.active::after {
    content: '';
    position: absolute;
    bottom: -0.75rem;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #0d6efd;
    border-radius: 2px;
}

/* 预设渐变卡片网格 */
.preset-gradient-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

/* 单个渐变卡片 */
.gradient-card {
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    background-color: #fff;
    border: 1px solid #f0f0f0;
}
.gradient-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.gradient-card-preview {
    height: 100px;
    width: 100%;
}
.gradient-card-info {
    padding: 0.6rem;
    text-align: center;
    background-color: #fafafa;
    border-top: 1px solid #f0f0f0;
}
.gradient-card-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gradient-card-code {
    font-size: 0.7rem;
    color: #6c757d;
    font-family: 'SFMono-Regular', Consolas, monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

/* 自定义生成器面板 */
.generator-panel {
    background-color: #f8f9fa;
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
    margin-top: 2rem;
}
.generator-preview {
    width: 100%;
    height: 200px;
    border-radius: 0.75rem;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    transition: background 0.3s ease;
}

/* 颜色节点列表 */
.color-stops-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    min-height: 50px;
}
.color-stop-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    padding: 0.4rem 0.6rem;
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
    position: relative;
}
.color-stop-item input[type="color"] {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    padding: 0;
    background: none;
}
.color-stop-item input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}
.color-stop-item input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 0.25rem;
}
.color-stop-item .remove-color {
    cursor: pointer;
    color: #adb5bd;
    font-size: 1.1rem;
    line-height: 1;
    margin-left: 0.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}
.color-stop-item .remove-color:hover {
    color: #dc3545;
}

/* 底部描述区域 */
.description-section {
    margin-top: 3rem;
    background-color: #f8f9fa;
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
}
.description-title {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}
.description-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 14px;
    background-color: #0d6efd;
    margin-right: 8px;
    border-radius: 2px;
}
.description-text {
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 0;
}

/* 复制提示 Toast */
.copy-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: #212529;
    color: #fff;
    padding: 0.6rem 1.5rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 10000;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.copy-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
