body {
    font-family: Arial, sans-serif;
    background-image: url('4.png');
    background-size: cover;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-position: center;
    margin: 0;
    padding: 0;
}

.container {
    position: relative;
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.text-box {
    width: 97%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 10px;
    background-color: #fff;
    font-size: 15px;
    word-wrap: break-word;
    display: block;
    margin-left: auto;
    margin-right: auto;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    transition: max-height 0.4s ease, box-shadow 0.3s ease;
    position: relative;
}


.bubble:active {
    background-color: #e6f7ff;
}

.bubble.dragged {
    opacity: 0.5;
    background-color: #d9f2ff;
}

.bubble {
    padding: 10px;
    margin: 10px 0;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    max-height: 80px;
    transition: max-height 0.4s ease, box-shadow 0.3s ease, background-color 0.2s;
    cursor: pointer;
    flex-wrap: wrap;
    flex-direction: column;
}

.bubble:hover {
    max-height: 300px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* 展开时的样式 */
.bubble:hover .text-box {
    -webkit-line-clamp: unset;
    overflow: visible;
    max-height: none;
    white-space: normal;
}

.bubble:hover .buttons {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.bubble .text-box {
    margin-right: 20px;
}

.buttons {
    display: none;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    width: 100%;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.buttons button {
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    color: white;
    max-width: 100%;
    box-sizing: border-box;
}

.bubble:hover .buttons {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.buttons button.copy {
    background-color: #28a745;
}

.buttons button.clear {
    background-color: #ffc107;
}

.buttons button.delete {
    background-color: #dc3545;
}

#saveBubble {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

#saveBubble button {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s, transform 0.2s;
}

#saveBubble button:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

#backToTop {
    position: fixed;
    bottom: 40px;
    right: 40px;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    display: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, background-color 0.2s;
}

#backToTop:hover {
    background-color: #0056b3;
    transform: scale(1.1);
}

.footer {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #666;
    padding: 10px;
    background-color: #f1f1f1;
    border-radius: 10px;
}

.footer a {
    color: #007bff;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #007bff;
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    padding: 20px;
    z-index: 1000;
    text-align: center;
    font-size: 16px;
    display: none;
    opacity: 0;
    animation: popupIn 0.3s forwards;
}

.popup.active {
    display: block;
}

@keyframes popupIn {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.popup button {
    margin: 10px 5px 0;
    padding: 10px 20px;
    background-color: #28a745;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
}

.popup button.deny {
    background-color: #dc3545;
}

#refreshPage {
    padding: 10px 20px;
    background-color: #17a2b8;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s, transform 0.2s;
    margin-left: 10px;
}

#refreshPage:hover {
    background-color: #0d6efd;
    transform: scale(1.05);
}



.thumbnail-container {
    width: 100%;
    height: 66%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
}

.thumbnail-container img {
    width: 150px;
    height: 150px;
    margin: 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s;
}

.thumbnail-container img:hover {
    transform: scale(1.2);
}

.action-buttons {
    width: 100%;
    height: 34%;
    background-color: #333;
    padding: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.action-buttons button {
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 10px;
    background-color: #17a2b8;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s;
}

.action-buttons button:hover {
    background-color: #0056b3;
}

@media (max-width: 768px) {
    .text-box {
        width: 94%
    }

    .bubble {
        margin-left: auto;
        margin-right: auto;
    }

    .container {
        padding: 10px;
    }

    .bubble {
        margin-left: 20px;
        margin-right: 20px;
    }
}

