.my-stories.block > div + div {
    border-top: 1px solid var(--border-color);
    padding-top: var(--content-padding);
}

.my-stories {
    margin-top: 20px;
}

/* don't show the bullets of the ul */
.story-list {
    list-style-type: none;
    padding: 0;
}

.story-list ul {
    list-style: none;
    padding-left: 0;
    padding-bottom: 0;
    margin-bottom: var(--content-padding);
    display: grid;
    grid-template-columns: repeat(auto-fit, 9rem);
    gap: 0.9rem;
    border-bottom: 2px solid var(--border-color);
    padding-top: 0.75rem;
    padding-bottom: 1rem;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.02) 100%);
}

ul {
    margin-top:0;
}

.story-list li {
    padding: 0;
    margin: 0;
    max-width: 10rem;
    justify-self: center;
    list-style: none;
}

.story-item-li {
    padding: 0;
    margin: 0;
    max-width: 10rem;
    justify-self: center;
    list-style: none;
}

.story-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.6rem;
    min-height: 9rem;
    padding: 1rem 0.85rem 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #f7f7f7 100%);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    position: relative;
    text-align: center;
    overflow: hidden;
    transform: translateY(0);
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.story-item-link {
    display: block;
    text-decoration: none;
    color: inherit;
    margin-bottom: 0.5rem;
}

.story-item-link:hover .story-item {
    border-color: var(--primary-color);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.story-item-li.is-turn-holder a::before {
    content: none;
}

.story-item-li.is-turn-holder .story-item {
    background: linear-gradient(135deg, #eaf4ff 0%, #f6fbff 100%);
}

/* Published stories - blue background with white text */
.story-item-li.is-published .story-item {
    background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
    color: #ffffff;
}

.story-item-li.is-published .story-item-title {
    color: #ffffff;
}

.story-item-li.is-published .story-cover-subtitle {
    color: rgba(255, 255, 255, 0.85);
}

.story-item-li.is-published .story-item-with {
    color: rgba(255, 255, 255, 0.9);
}

.story-item-li.is-published .story-item-sub {
    color: rgba(255, 255, 255, 0.85);
}

.story-item-li.is-published .story-item::before {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 100%);
    opacity: 1;
}

.story-item-li.is-published .story-item::after {
    background: rgba(0, 0, 0, 0.1);
}

.story-item-li.is-published .story-item-link:hover .story-item-title {
    color: #ffffff;
    text-decoration: underline;
}

.story-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0.35rem;
    background: linear-gradient(180deg, var(--primary-color) 0%, rgba(0,0,0,0.1) 100%);
    opacity: 0.35;
}

.story-item::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 0.2rem;
    background: rgba(0,0,0,0.04);
}

.story-item-main {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-top: 1rem;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}


.story-cover-subtitle {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.story-item-title:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.story-item-sub {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
    min-height: 2.2rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.story-item-title {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    font-size: 1rem;
    color: var(--text-muted);
    padding-top: 0.15rem;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    line-height: 1.2;
    letter-spacing: 0.2px;
}

.story-item-meta {
    display: flex;
}

.story-item-with {
    color: var(--text-muted);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    justify-content: center;
    display: flex;
    text-align: left;
}

.story-item-with-text {
    display: inline-block;
}


.story-item-user {
    color: var(--text-color);
    text-decoration: none;
}

.story-item-user:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.no-stories {
    font-size: 1rem;
    color: var(--text-muted);
    padding: 0 0 var(--content-padding) 0;

}

.item-sub {
    color: var(--text-muted);
    font-size: small;
    margin-top: 0;
    margin-bottom: 0;
}

.other_user {
    display: inline-block;
    padding: 0;
    font-size: 0.85em;
    color: var(--text-muted);
    border-radius: 1em;
    margin-top: 0;
    margin-bottom: 1rem;
    width: fit-content;
    font-size: small;
}

.story-item-actions {
    align-self: flex-end;
}

/* Filter buttons */
.story-filter-buttons {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
    padding: 0.8rem;
    background: linear-gradient(180deg, rgba(0,0,0,0.01) 0%, rgba(0,0,0,0.02) 100%);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) rgba(0, 0, 0, 0.05);
}

.story-filter-buttons::-webkit-scrollbar {
    height: 6px;
}

.story-filter-buttons::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.story-filter-buttons::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.story-filter-buttons::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.story-filter-button {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.9rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-color);
    cursor: pointer;
    transition: all 160ms ease;
    white-space: nowrap;
}

.story-filter-button:hover {
    background: #f7f7f7;
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.story-filter-button.active {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(30, 136, 229, 0.25);
}

.story-filter-button.active:hover {
    background: #1565c0;
    border-color: #1565c0;
}

.filter-button-name {
    font-weight: 500;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    .story-filter-buttons {
        gap: 0.5rem;
        padding: 0.6rem;
    }

    .story-filter-button {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
}
