.text-slider {
    position: relative;
    /* border: 1px solid var(--border);
    border-radius: 14px; */
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    /* box-shadow: var(--shadow); */
    overflow: hidden;

    display: inline-flex;
    /* background: red; */
    width: 100%;
    flex-direction: row;
    align-items: center;
    font-size: 22px;
}

.text-slider__source {
    display: none;
    /* hidden source list; JS will read li texts */
}

.text-slider__stage {
    position: relative;
    /* min-height: 120px; */
    padding: 36px 22px 24px;

    flex: 1;
}

.text-slide {
    position: absolute;
    inset: 0;
    /* padding: 36px 22px 24px; */
    opacity: 0;
    transition: opacity var(--fade, 600ms) ease;
    display: flex;
    align-items: center;
    /* justify-content: center; */
    text-align: center;
    line-height: 1.35;
    font-size: clamp(18px, 2.8vw, 28px);
}

.text-slide.is-active {
    opacity: 1;
}

.text-slider__controls {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    padding: 12px 12px 16px;
    border-top: 1px solid var(--border);
}

.ts-btn {
    appearance: none;
    border: 1px solid var(--border);
    background: var(--btn-bg);
    color: var(--fg);
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    min-width: 44px;
}

.ts-btn:hover {
    background: var(--btn-hover);
}

.ts-btn:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.text-slider__dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 0 0 16px;
}

.text-slider__dots button {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--muted);
    border: none;
    opacity: 0.6;
    cursor: pointer;
}

.text-slider__dots button[aria-selected="true"] {
    width: 18px;
    background: var(--accent);
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .text-slide {
        transition: none;
    }
}

.text-slide {
    /* font-family: 'Inter', 'Comic Sans MS', 'Brush Script MT', cursive, sans-serif; */
    /* font-size: clamp(28px, 4vw, 48px);
    font-weight: 900; */
    /* font-style: italic; */
    background: none;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    animation: colorful-draw 4s linear infinite;
    /* text-shadow: 2px 2px 8px #0002, 0 1px 0 #0002; */
    letter-spacing: 2.5px;
    border-radius: 12px;
    padding: 12px 0;
}

.gradient-0 {
    background: linear-gradient(90deg, #ff6f61, #f7b42c, #43e97b, #38f9d7, #5a87ff, #c471f5, #ff6f61);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.gradient-1 {
    background: linear-gradient(90deg, #f7971e, #ffd200, #21d4fd, #b721ff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.gradient-2 {
    background: linear-gradient(90deg, #f953c6, #b91d73, #43e97b, #38f9d7);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.gradient-3 {
    background: linear-gradient(90deg, #fc5c7d, #6a82fb, #f7b42c);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.gradient-4 {
    background: linear-gradient(90deg, #00c3ff, #ffff1c, #fa709a);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.gradient-5 {
    background: linear-gradient(90deg, #43cea2, #185a9d, #c471f5);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.gradient-6 {
    background: linear-gradient(90deg, #ee9ca7, #ffdde1, #5a87ff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

@keyframes colorful-draw {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 50%;
    }
}

.text-slider__source li {
    font-family: 'Inter', cursive, sans-serif;
    font-size: 1.3em;
    padding: 8px 0;
    background: linear-gradient(90deg, #ff6f61, #f7b42c, #43e97b, #38f9d7, #5a87ff, #c471f5, #ff6f61);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    animation: colorful-draw 4s linear infinite;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    letter-spacing: 1px;
    border-radius: 8px;
    margin: 6px 0;
}

@keyframes colorful-draw {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 50%;
    }
}

@media (max-width:760px) {
    .text-slider {
        font-size: 16px;
        flex-wrap: wrap;
        flex-direction: column;
        width: 100%;
        margin-top: 12px;
        /* background: red; */
        align-items: start;
    }

    .text-slide {
        text-align: left;
        padding-top: 0;
    }

    .text-slider__stage {
        width: 100%;
    }
}