body {
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    margin: 0;
    background-color: #f0f0f0;
    overflow: hidden;
}

.main-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    max-width: 1000px;
    padding: 20px;
    box-sizing: border-box;
}

.history-container {
    width: 280px;
    max-height: 545px;
    overflow-y: auto;
    background-color: #f8f8f8;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-right: 20px;
    box-sizing: border-box;
}

.tabs {
    display: flex;
    justify-content: space-around;
    margin-bottom: 10px;
}

.tabs button {
    flex-grow: 1;
    padding: 5px 10px;
    background-color: #ddd;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.tabs button.active {
    background-color: #aaa;
}

.item-list {
    display: none;
}

.item-list.active {
    display: block;
}

.item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    padding: 0 5px;
    max-width: 100%;
    overflow: hidden;
}


.item span {
    flex-grow: 1;
    max-width: 160px;
    /* 限制文字显示区域的最大宽度 */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.item button {
    flex-shrink: 0;
    background-color: #ff4d4d;
    color: white;
    border: none;
    padding: 2px 6px;
    cursor: pointer;
    border-radius: 4px;
    margin-left: 5px;
    white-space: nowrap;
    width: 32px;
    /* 固定按钮宽度 */
    height: 32px;
}

.item .favorite-btn {
    background-color: #4CAF50;
    margin-right: 5px;
    width: 32px;
    /* 同样为收藏按钮设置固定宽度 */
    height: 32px;
}


.content-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 500px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

input[type="text"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

.size-selector {
    margin-bottom: 20px;
}

.size-selector label {
    margin-right: 10px;
}

.footer {
    position: fixed;
    bottom: 10px;
    font-size: 14px;
    color: #888;
    text-align: center;
    width: 100%;
    white-space: pre;
}

#qrcode {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
        align-items: center;
        padding: 10px;
    }

    .history-container {
        width: 100%;
        max-height: 300px;
        margin-right: 0;
        margin-bottom: 10px;
    }

    .content-container {
        max-width: 100%;
        padding: 10px;
    }

    input[type="text"] {
        font-size: 14px;
        padding: 8px;
    }

    .size-selector label {
        display: block;
        margin-bottom: 5px;
    }

    .footer {
        font-size: 12px;
    }
}

.scan-button {
    padding: 10px 15px;
    background-color: #4CAF50;
    /* 按钮颜色 */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
    /* 添加顶部边距 */
    transition: background-color 0.3s;
    margin-bottom: 10px;
}

.scan-button:hover {
    background-color: #45a049;
    /* 悬停时颜色 */
}


/* 自定义滑动条样式 */
::-webkit-scrollbar {
    width: 12px; /* 竖向滑动条的宽度 */
    height: 12px; /* 横向滑动条的高度 */
}

::-webkit-scrollbar-track {
    background: #f1f1f1; /* 滑动条的背景色 */
    border-radius: 10px; /* 圆角效果 */
}

::-webkit-scrollbar-thumb {
    background: #fff; /* 滑块的颜色 */
    border-radius: 10px; /* 圆角效果 */
    border: 2px solid #f1f1f1; /* 滑块的边框颜色 */
}

::-webkit-scrollbar-thumb:hover {
    background: #e1e1e1; /* 悬停时的颜色 */
}

::-webkit-scrollbar-corner {
    background: #f1f1f1; /* 右下角的颜色 */
}
