.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000000;
    overflow: auto;
}

.popup {
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    width: auto;
    max-width: 95%;
    max-height: 90%;
    overflow: auto;
    position: relative;
    animation: popup-fade-in 0.3s;
}

/* 大文件查看器样式 */
.popup-content .git-file-viewer {
    width: 100%;
    min-width: 800px;
    max-width: 1600px;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    background-color: #f8f8f8;
    border-radius: 5px 5px 0 0;
    user-select: none;
    position: sticky;
    top: 0px;
    left: 0px;
    z-index: 1;
    /* 防止拖动时选中文本 */
}

.popup-header h2 {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    line-height: 1;
}

.popup-content {
    /* padding: 15px; */
    overflow: auto;
}

/* 全屏模式 */
.popup-fullscreen {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    border-radius: 0;
    margin: 0;
}

/* 文本区域弹窗样式 */
.popup-textarea-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 400px;
    padding: 20px;
}

.popup-textarea {
    width: 100%;
    min-height: 150px;
    margin-bottom: 10px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
}

.popup-button {
    padding: 8px 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    align-self: flex-end;
}

.popup-button:hover {
    background-color: #45a049;
}

@keyframes popup-fade-in {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .popup {
        width: 95%;
        max-width: 95%;
    }

    .popup-header h2 {
        font-size: 1rem;
    }
}
