.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.modal-content {
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 48rem;
    margin: 0 1rem;
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-family: 'Syne', sans-serif;
    color: #B8BDE1;
}

.modal-close {
    background: none;
    border: none;
    color: #718096;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: #404992;
}

.modal-body {
    padding: 1rem;
    overflow-y: auto;
    max-height: calc(90vh - 4rem);
}

.story-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.story-item {
    display: flex;
    gap: 1.5rem;
    padding: 1rem;
    border-radius: 1rem;
    background-color: #f8fafc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.story-item:hover {
    background-color: #f1f5f9;
    transform: translateX(4px);
}

.story-item.active {
    background-color: #e8f0fe;
    border-left: 4px solid #B8BDE1;
}

.story-thumbnail {
    flex: 0 0 120px;
    height: 120px;
    border-radius: 0.75rem;
    overflow: hidden;
}

.story-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.story-item:hover .story-image {
    transform: scale(1.05);
}

.story-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.story-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.25rem;
    color: #B8BDE1;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.story-description {
    font-family: 'Raleway', sans-serif;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #4a5568;
}

.story-modal {
    display: flex;
    background-color: #f9f7f7;
    border-radius: 1rem;
    overflow: hidden;
    max-width: 1000px;
    width: 100%;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: solid #f9f7f7 8px;
}

.story-modal-image {
    flex: 50% 50%;
    position: relative;
}

.modal-cover {
    width: auto;
    height: 100%;
    object-fit: cover;
    padding: 0px;
}

.modal-title {
    font-family: 'Syne', sans-serif;
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #B8BDE1;
    line-height: 32px;
    font-weight: 700;
}

.customize-button {
    padding: 0.75rem 1.5rem;
    background-color: #e2e8f0;
    color: #404992;
    border: none;
    border-radius: 70px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-family: 'Raleway', sans-serif;
}

@media (max-width: 640px) {
    .modal-content {
        margin: 1rem;
        max-height: 80vh;
    }

    .modal-body {
        max-height: calc(80vh - 4rem);
    }

    .story-item {
        flex-direction: column;
        gap: 1rem;
    }

    .story-thumbnail {
        width: 100%;
        height: 160px;
        flex: none;
    }

    .story-details {
        text-align: center;
    }

    .story-modal {
        width: 90%;
        flex-direction: column;
    }

    .story-modal-image {
        height: 200px;
    }

    .modal-cover {
        width: 100%;
        height: 100%;
        padding: 0px;
    }
}
