body { font-family: Arial, sans-serif;color:#FFFFFF;font-size: 15px;text-align: center;overflow-x: hidden;


            margin: 0;
            padding: 0;
            height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            transition: background-image 0.5s, background-color 0.5s;
            background-size: cover;
            background-color: #003366;
            background-position: center;
            background-repeat: no-repeat;
            background-attachment: fixed;
}


a{color:#FFFFFF;text-decoration:none}
a:hover{color:#7485e3;text-decoration:none}


<!--雪花飘落特效第一部分 -->
font-family: Arial, sans-serif;height: 100vh;display: flex;justify-content: center;align-items: flex-start;}
h1 {margin: 0;font-size: 3rem;text-shadow: 2px 2px 4px #fff, -2px -2px 4px #fff, 2px -2px 4px #fff, -2px 2px 4px #fff;}
.snowflake {position: absolute;top: -10px;background: white;border-radius: 50%;opacity: 0.8;pointer-events: none;animation: fall linear infinite;}
@keyframes fall {to {transform: translateY(95vh);}}
@media (max-width: 768px) {.snowflake {width: 4px;height: 4px;}}
@media (min-width: 769px) {.snowflake {width: 6px;height: 6px;}}


.tooltip-container {position: relative;display: inline;auto;margin: 7px;cursor: pointer;}
.tooltip-text {visibility: hidden;background-color: #333;color: #fff;text-align: left;border-radius: 4px;padding: 10px;position: absolute;z-index: 1;top: 100%;left: 50%;transform: translateX(-50%) translateY(10px);opacity: 0;transition: opacity 0.3s, transform 0.3s;box-shadow: 0 2px 5px rgba(0,0,0,0.2);margin-top: 5px;}
.tooltip-text::after {content: "";position: absolute;bottom: 100%;left: 50%;margin-left: -5px;border-width: 5px;border-style: solid;border-color: transparent transparent #333 transparent;}
.tooltip-container:hover .tooltip-text {visibility: visible;opacity: 1;transform: translateX(-50%) translateY(0);}
.tooltip-text-width1 {width: 240px;}
.tooltip-text-width2 {width: 210px;}
.tooltip-text-width3 {width: 150px;}


.welcome {
    position: fixed;
    top: 0px;
    left: 0px;
    text-align: center;
}



        .controls {
         position: fixed;
         top: 0px;
         right: 0px;
         text-align: center;
            text-align: center;
        }

        select {
            padding: 1px 1px;
            margin: 0px;
            border-radius: 2px;
            border: 1px solid #ddd;
            min-width: 50px;
        }



.container {
    text-align: center;
    margin-top: 100px;
    width: 96%;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}



.search-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.engine-selector {
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 2px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #1e90ff #f0f0f0;
    padding-bottom: 6px;
    width: 100%;
    opacity: 1; /* 默认不透明 */
    transition: opacity 0.3s ease;
}

.engine-selector::-webkit-scrollbar {
    height: 4px;
}

.engine-selector::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.engine-selector::-webkit-scrollbar-thumb {
    background: #1e90ff;
    border-radius: 4px;
    opacity: 0.8; /* 设置滚动条透明度 */
}

.engine-selector::-webkit-scrollbar-thumb:hover {
    background: #0077cc;
}

.engine-option {
    padding: 3px 5px;
    font-size: 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    background-color: rgba(240, 240, 240, 0.2); /* 40% 透明背景 */
    color: #FFFFFF; /* 文字保持不透明 */
    flex-shrink: 0;
    white-space: nowrap;
    margin-bottom: 2px;
}


.engine-option:hover {
    color: #CCFF66; /* 悬停时文字变成深灰色 */
    background-color: #FF0000; /* 悬停时背景变成红色 */
}

.engine-option.active {
    background-color: #1e90ff;
    color: #fff;
}

.search-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 0;
    margin-top: 2px;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
}

#search-input {
    height: 40px;
    padding: 0 60px 0 10px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 8px 0 0 8px;
    width: 100%;
    outline: none;
    background-color: #fff;
    box-sizing: border-box;
    color: #333;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#search-input:focus {
    border-color: #1e90ff;
    box-shadow: 0 0 0 2px rgba(30, 144, 255, 0.2);
}

#search-input::placeholder {
    color: #999;
}

#search-button {
    height: 40px;
    padding: 0 20px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 0 8px 8px 0;
    background: linear-gradient(135deg, #1e90ff, #0077cc);
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    margin-left: -1px;
}

#search-button:hover {
    background: linear-gradient(135deg, #0077cc, #1e90ff);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-container {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.toggle-label {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.toggle-label.active {
    color: #1e90ff;
}

.toggle-button {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 16px;
}

.toggle-button input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.2s;
    border-radius: 16px;
}

.slider::before {
    position: absolute;
    content: '';
    height: 12px;
    width: 12px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.2s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #1e90ff;
}

input:checked + .slider::before {
    transform: translateX(24px);
}

.suggestions {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: #FF0000;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 10;
    overflow-y: hidden;
    max-height: none;
}

.suggestions div {
    padding: 6px 10px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    white-space: normal;
    text-align: left;
    word-break: break-word;
}

.suggestions div:hover {
    background-color: #f0f0f0;
}

.suggestions div::before {
    content: attr(data-index);
    display: inline-block;
    width: 20px;
    text-align: center;
    margin-right: 10px;
    font-weight: bold;
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
}

.suggestions div[data-index="1"]::before { color: #ff4757; }
.suggestions div[data-index="2"]::before { color: #ff6b81; }
.suggestions div[data-index="3"]::before { color: #ff7f50; }
.suggestions div[data-index="4"]::before { color: #ffa502; }
.suggestions div[data-index="5"]::before { color: #ffb142; }
.suggestions div[data-index="6"]::before { color: #ffcc00; }
.suggestions div[data-index="7"]::before { color: #7bed9f; }
.suggestions div[data-index="8"]::before { color: #70a1ff; }
.suggestions div[data-index="9"]::before { color: #5352ed; }
.suggestions div[data-index="10"]::before { color: #1e90ff; }

.custom-sites {
    margin-top: 5px;
    width: 100%;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

#add-site-btn {
    margin-bottom: 10px;
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 8px;
background: linear-gradient(135deg, rgba(30, 144, 255, 0.4), rgba(0, 119, 204, 0.3));
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    height: 30px;
}

#add-site-btn:hover {
    color:#33CC44;
    background: linear-gradient(135deg, #0077cc, #1e90ff);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.custom-sites-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.custom-site {
    position: relative;
    display: flex;
    align-items: center;
    padding: 10px;
    background-color:none;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: calc(20% - 10px);
    box-sizing: border-box;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.custom-site:hover {
    border-color: #1e90ff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}



.custom-site a {
    flex: 1;
    text-decoration: none;
    color: #FFFFFF;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 7em;
    text-align: center;
}

.custom-site .edit-icon,
.custom-site .delete-icon {
    position: absolute;
    cursor: pointer;
    font-size: 12px;
    color: #999;
    transition: color 0.2s ease;
    opacity: 0; /* 默认隐藏 */
}

.custom-site .edit-icon {
    top: 5px;
    right: 5px;
}

.custom-site .delete-icon {
    bottom: 5px;
    right: 5px;
}

/* 鼠标悬停时显示编辑和删除按钮 */
.custom-site:hover .edit-icon,
.custom-site:hover .delete-icon {
    opacity: 1; /* 显示按钮 */
}

.custom-site .edit-icon:hover::after,
.custom-site .delete-icon:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    background-color: #333;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
}

.custom-site .edit-icon:hover,
.custom-site .delete-icon:hover {
    color: #1e90ff;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    width: 300px;
    position: relative;
    text-align: left;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.modal-content .close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    transition: color 0.2s ease;
}

.modal-content .close:hover {
    color: #1e90ff;
}

.modal-content h3 {
    margin-bottom: 5px;
    text-align: center;
    color: #333;
    margin-top: 0;
}

.modal-content .modal-tip {
    font-size: 12px;
    color: #666;
    text-align: left;
    margin-bottom: 10px;
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.modal-content label {
    display: flex;
    align-items: center;
    color: #333;
    margin-bottom: 2px;
}

.modal-content label .required {
    color: red;
    margin-left: 4px;
}

.modal-content input {
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 5px;
}

.modal-content input:focus {
    border-color: #1e90ff;
    box-shadow: 0 0 0 2px rgba(30, 144, 255, 0.2);
}

.modal-content button {
    padding: 8px;
    background: linear-gradient(135deg, #1e90ff, #0077cc);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.modal-content button:hover {
    background: linear-gradient(135deg, #0077cc, #1e90ff);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@media (min-width: 769px) {
    .engine-selector {
        overflow-x: hidden;
        padding-bottom: 0;
    }
}

@media (max-width: 768px) {
    .custom-site {
        width: calc(25% - 10px);
    }

    .engine-selector {
        gap: 6px;
        padding: 0 8px;
        padding-bottom: 6px;
    }

    .engine-option {
        padding: 8px 12px;
        font-size: 15px;
        margin-bottom: 2px;
    }

    .search-container {
        padding: 0;
    }

    .search-wrapper {
        margin-top: 2px;
    }
}