body {
    font-family: 'Roboto', sans-serif;
    background-color: #f9f9f9;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    /*align-items: center;*/
    min-height: 100vh;
}

.container {
    /*background-color: #f9f9f9;*/
    /*border-radius: 8px;*/
    /*box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);*/
    padding: 32px;
    width: 100%;
    max-width: 900px;
}

h1 {
    color: #333;
    text-align: center;
    margin-bottom: 30px;
}

.search-box {
    display: flex;
    margin-bottom: 20px;
}

input[type="text"] {
    flex: 1;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    outline: none;
}

button {
    padding: 12px 24px;
    font-size: 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

#searchResult {
    margin-top: 20px;
    /*padding: 8px;*/
    /*background-color: #f9f9f9;*/
    /*border-radius: 4px;*/
    /*font-size: 16px;*/
}

@media screen and (max-width: 600px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 24px;
    }

    input[type="text"], button {
        font-size: 14px;
    }
}


.item {
    background: #FFF;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    padding: 20px;
    transition: box-shadow 0.3s ease;
}

.item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.item h2 {
    font-size: 18px;
    margin-bottom: 5px;
}

.tag {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 5px;
    background: #edf2f7; /* 更柔和的标签背景 */
    color: #4a5568; /* 深灰色文字 */
}

.danger {
    background: #fed7d7;
    color: #c53030;
}

.normal {
    background: #ecf0f1;
    color: #7f8c8d;
}

.course-info {
    background-color: #f9f9f9;
    border-radius: 6px;
    padding: 15px;
    margin-top: 15px;
}

.course-title {
    font-size: 16px; /* 稍微减小字体大小 */
    font-weight: 500; /* 使用中等粗细而不是粗体 */
    color: #34495e; /* 深灰色标题 */
    margin-bottom: 10px;
}

.course-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.course-details .tag {
    margin-left: 0;
}

.course-type {
    background-color: #3498db;
    color: white;
}

.course-amount {
    background-color: #2ecc71;
    color: white;
}

.course-time {
    background-color: #f39c12;
    color: white;
}

.course-meta {
    font-size: 14px;
    color: #95a5a6;
}

.client-ip {
    display: inline-flex;
    align-items: center;
}

.client-ip i {
    margin-right: 5px;
    color: #3498db;
}

.time-tag {
    color: #7f8c8d;
    font-size: 12px;
    font-weight: normal;
    text-align: right;
    background: none; /* 移除背景色 */
}

/* 在文件末尾添加以下样式 */

.amount-tag {
    cursor: pointer;
    position: relative;
}

.amount-tag:hover::after {
    content: attr(data-title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s;
}

.amount-tag:hover::after {
    opacity: 1;
}

.title-popup {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 10px;
    margin-top: 10px;
    font-size: 14px;
    color: #495057;
    word-break: break-all;
    display: block; /* 确保默认显示 */
}

/* 修改 .item h2 样式 */
.item h2 {
    font-size: 18px;
    margin-bottom: 5px;
}

/* 添加新的样式 */
.tags-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 150px;
}

.amount-tag {
    margin-bottom: 5px;
}

.time-tag {
    font-size: 12px;
    color: #95a5a6;
    font-weight: normal;
}

/* 其他样式保持不变 */

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.client-info {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    overflow: hidden;
}

.item-header h2 {
    font-size: 22px;
    margin: 0;
    font-weight: 600;
    color: #2c3e50;
    margin-right: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attribute-value {
    font-size: 14px;
    color: #7f8c8d;
    margin-right: 10px;
    padding: 5px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background-color: #edf2f7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 350px; /* 增加最大宽度 */
}

.edit-attribute-icon {
    flex-shrink: 0;
}

.edit-attribute-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #95a5a6;
    padding: 5px;
    transition: color 0.3s ease;
}

.edit-attribute-icon:hover {
    color: #7f8c8d;
}

.local-attribute {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.attribute-value {
    font-size: 14px;
    color: #7f8c8d;
    margin-left: 10px;
    padding: 5px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background-color: #edf2f7;
    display: inline-block;
}

.edit-attribute, .save-attribute, .cancel-edit {
    padding: 5px 10px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 5px;
}

.edit-attribute:hover, .save-attribute:hover, .cancel-edit:hover {
    background-color: #2980b9;
}

.local-attribute-input {
    flex-grow: 1;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-right: 10px;
}

.cancel-edit {
    background-color: #95a5a6;
}

.cancel-edit:hover {
    background-color: #7f8c8d;
}

.save-attribute {
    padding: 5px 10px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.save-attribute:hover {
    background-color: #2980b9;
}

.time-tag.over-one-hour {
    color: #e53e3e;
}

header {
    max-width: 800px;
    margin: 0 auto 30px;
    padding: 30px 0;
    position: relative;
    text-align: center;
}

header h1 {
    font-size: 36px;
    font-weight: bold;
    color: #2c3e50;
    margin: 0 0 10px 0;
    letter-spacing: 2px;
    position: relative;
    display: inline-block;
    padding: 0 60px;
}

header h1::before, header h1::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 50px;
    height: 2px;
    background-color: #3498db;
}

header h1::before {
    left: 0;
}

header h1::after {
    right: 0;
}

header .subtitle {
    font-size: 16px;
    color: #a0aec0; /* 更淡的颜色 */
    margin: 0;
}

/* 在媒体查询中也进行相应调整 */
@media screen and (max-width: 768px) {
    body {
        padding: 10px;
    }

    #container {
        padding: 0 10px;
    }

    header {
        padding: 20px 0; /* 移除左右内边距 */
        margin-bottom: 20px;
    }

    header h1 {
        font-size: 28px;
    }

    header h1::before, header h1::after {
        width: 30px;
    }

    .item {
        padding: 15px;
        margin-bottom: 15px;
    }

    .item-header {
        flex-direction: row; /* 改回行布局 */
        align-items: center; /* 垂直居中对齐 */
        justify-content: space-between; /* 两端对齐 */
    }

    .client-info {
        flex-direction: row; /* 保持行布局 */
        align-items: center; /* 垂直居中对齐 */
        width: 100%; /* 占满宽度 */
    }

    .item-header h2 {
        font-size: 18px; /* 减小字体大小 */
    }

    .attribute-value {
        max-width: 150px; /* 在移动端稍微减小最大宽度 */
    }

    .tags-container {
        flex-direction: row; /* 改为行布局 */
        align-items: center; /* 垂直居中对齐 */
        justify-content: flex-end; /* 右对齐 */
        margin-top: 0; /* 移除顶部边距 */
        min-width: auto;
        width: auto;
    }

    .amount-tag {
        margin-bottom: 0; /* 移除底部边距 */
        margin-right: 5px; /* 添加右侧边距 */
    }

    .course-info {
        padding: 10px;
        margin-top: 10px;
    }

    .course-details {
        gap: 5px;
    }

    .tag {
        padding: 3px 6px;
        font-size: 11px;
    }

    .attribute-edit {
        margin-bottom: 10px;
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .local-attribute-input {
        width: 100%;
        min-width: 300px; /* 添加最小宽度 */
        padding: 8px;
        border: 1px solid #ddd;
        border-radius: 4px;
        margin-bottom: 10px;
        font-size: 14px;
    }

    .attribute-edit-buttons {
        display: flex;
        justify-content: flex-end;
    }

    .save-attribute, .cancel-edit {
        padding: 8px 15px;
        background-color: #3498db;
        color: white;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        margin-left: 10px;
        font-size: 14px;
    }

    .cancel-edit {
        background-color: #95a5a6;
    }

    .attribute-edit {
        flex-direction: column;
    }

    .local-attribute-input {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .attribute-edit-buttons {
        justify-content: flex-end;
    }

    .save-attribute, .cancel-edit {
        width: auto;
    }

    .attribute-edit,
    .local-attribute-input {
        min-width: 100%; /* 在移动端使用100%宽度 */
    }
}

/* 将这些样式从媒体查询中移出，应用于所有屏幕尺寸 */
.attribute-edit {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.local-attribute-input {
    width: 100%;
    min-width: 300px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 14px;
}

.attribute-edit-buttons {
    display: flex;
    justify-content: flex-end;
}

.save-attribute, .cancel-edit {
    padding: 8px 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
    font-size: 14px;
}

.cancel-edit {
    background-color: #95a5a6;
}

/* 媒体查询中只保留特的移动端样式 */
@media screen and (max-width: 768px) {
    .attribute-edit,
    .local-attribute-input {
        min-width: 100%;
    }

    /* 其他移动端特定样式保持不变 */
}

.platform-tag {
    display: inline-block;
    padding: 2px 8px;
    background-color: #2c3e50;
    color: #FFF;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
    margin-right: 8px;
}