.token {
    --original-gradient: linear-gradient(to bottom, var(--top-color) 50%, var(--bottom-color) 50%);
    background: var(--original-gradient);
    transition: background-color 0.1s;
    position: relative;
    display: inline;
    padding: 0;
    line-height: 1;
    vertical-align: baseline;
}

.token:hover {
    background-image:
        linear-gradient(rgba(128, 128, 128, 0.3), rgba(128, 128, 128, 0.3)),
        var(--original-gradient);
}

.token-tooltip {
    position: absolute;
    background: black;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    z-index: 1000;
    white-space: pre-wrap;
}

.feature-section {
    margin: 20px 0;
    padding: 10px;
    border: 1px solid #ccc;
}

.text-sample {
    word-wrap: break-word;
    /* Allows long words to break and wrap onto the next line */
    overflow-wrap: break-word;
    /* Ensures compatibility with different browsers */
    cursor: pointer;
    /* Add pointer cursor to indicate interactivity */
}

.text-sample::after {
    content: "Right-click to copy";
    display: block;
    color: gray;
    font-size: 0.8em;
    margin-top: 5px;
    font-style: italic;
}

.text-sample.copied::after {
    content: "Copied!";
}

/* Style the "Click to expand" text to match */
.expand-collapse-text {
    color: gray !important;
    font-size: 0.8em !important;
    margin-top: 5px !important;
    font-style: italic !important;
    margin-bottom: 0 !important;
}

.split-token {
    position: relative;
    display: inline;
    color: #000;
    line-height: 1;
    vertical-align: baseline;
}

.split-token::before,
.split-token::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 50%;
    z-index: -1;
    transition: background-color 0.1s;
    box-sizing: border-box;
    top: 0;
}

.split-token::after {
    top: 50%;
}

.split-token:hover::before,
.split-token:hover::after {
    background-image: none;
    background-color: rgba(128, 128, 128, 0.3);
}