/* 基础样式 */
body {
    font-family: 'Segoe UI', system-ui;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f0f2f5;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-image 0.5s ease;
}

hr{
    border: 1px solid #0000001b
}

#background-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    overflow: hidden;
}
.wallpaper-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: opacity 0.3s ease-in-out;
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-height: 100vh;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
    overflow-y: auto;
    position: relative;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
    z-index: 0;
}

.container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
    z-index: 0;
}

.header {
    flex: 0 0 auto;
    position: relative;
    z-index: 1;
}

.search-container {
    margin-top: auto;
    padding-bottom: 40px;
    width: 80%;
    min-width: 720px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 2;
    transition: transform 0.5s cubic-bezier(0.2, 0, 0, 1);
    will-change: transform;
}

.search-container.elevated {
    transform: translateY(-200px);
}

.quick-sites {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 240px;
    transform: translateY(240px);
    transition: transform 0.5s cubic-bezier(0.2, 0, 0, 1), background-color 0.5s ease;
    will-change: transform;
    z-index: 1;
    backdrop-filter: blur(50px);
}

.quick-sites.visible {
    transform: translateY(0);
    background:#0000001b;
}

.quick-sites-content {
    max-width: 1200px;
    min-width: 720px;
    margin: 0 auto;
    padding: 20px 5%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(7, minmax(125px, 1fr));  
    gap: 12px;
}

.site-category:nth-child(2) {
    grid-column: span 2;
}

.site-category:nth-child(2) .site-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(125px, 1fr));  
    gap: 6px;
}

.site-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.site-category h3 {
    color: #ffffff;
    font-size: 14px;
    font-weight: normal;
    margin-bottom: 12px;
    text-shadow: 0 1px 4px #444444;
    font-family: 'Noto Sans SC', sans-serif;
}

.site-item {
    display: flex;
    align-items: center;
    color: #ffffffcc;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 3px;
    backdrop-filter: blur(30px);
    transition: all 0.2s ease;
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 120px;  
    max-width: 140px;
    box-sizing: border-box;
}

.site-item:hover {
    background: #ffffff44;
    color: #ffffff;
}

.quick-sites-content {
    max-width: 1200px;
    margin: 0 auto;
    min-width: 720px;
    padding: 20px 5%;
}

.site-group h3 {
    color: #ffffff99;
    font-size: 14px;
    font-weight: normal;
    margin-bottom: 16px;
    font-family: 'Noto Sans SC', sans-serif;
}

.site-list {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.site-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 3px;
    backdrop-filter: blur(30px);
    transition: all 0.2s ease;
}

.site-item:hover {
    background: #ffffff44;
}

.site-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
}

.site-icon svg {
    width: 20px;
    height: 20px;
}

.site-name {
    font-size: 14px;
    font-family: 'Noto Sans SC', sans-serif;
    text-shadow: 0 1px 4px #444444;
}

.title {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 2rem;
    letter-spacing: -0.07em;
    color: #ffffff;
    text-shadow: 0 1px 3px #444444;
    margin: 1rem 3%;
    width: fit-content;
    user-select: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.title:hover {
    opacity: 0.6;
}

/* 搜索引擎选择器样式 */
.search-engine-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
    gap: 1rem;
    padding: 1rem;
    width: 80%;
    margin: 2rem auto;
}

@media only screen and (max-width: 768px) {
    .search-engine-selector {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media only screen and (max-width: 480px) {
    .search-engine-selector {
        grid-template-columns: repeat(3, 1fr);
    }
}

.engine-btn {
    border: none;
    background: white;
    padding: 2px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.15s ease;
}

.engine-btn.active {
    transform: scale(1.15);
}

.engine-btn img {
    width: 32px;
    height: 32px;
}

.engine-btn {
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: start;
    font-size: 13px;
    min-width: 100px;
}

.category-tag {
    color: white;
    padding: 2px 2px;
    border-radius: 4px;
    font-size: 11px;
}

.category-general .category-tag { background: #4a90e2; }
.category-material .category-tag { background: #50c15a; }
.category-works .category-tag { background: #b84dc3; }

.engine-name {
    color: #ffffffeb;
    font-weight: 500;
}

@media only screen and (max-width: 768px) {
    .engine-btn {
        min-width: auto;
        padding: 6px 8px;
    }
}

/* 搜索框样式 */
.search-box {
    position: relative;
    width: 100%;
    min-width: 720px;
    max-width: 1200px;
    margin: 0 auto;
    backdrop-filter: blur(50px);
    border-radius: 3px;
    transition: background 0.2s ease;
}

.search-box:focus-within {
    background: #ffffffeb;
}

#searchInput {
    width: 97.8%;
    height: 44px;
    padding-left: 2%;
    border: none;
    border-radius: 3px;
    box-shadow: 0 0 10px #0000007a;
    transition: box-shadow 0.2s ease;
    font-family: 'Noto Sans SC', sans-serif;
    font-weight: 400;
    font-size: 16px;
    background: #ffffff22;
    color: #ffffff;
    text-shadow: 0 1px 3px #444444;
}

#searchInput::placeholder {
    color: #ffffffc7;
    text-shadow: 0 1px 3px #444444;
    transition: all 0.2s ease;
}

#searchInput:focus {
    outline: none;
    background: #ffffff;
    color: #444444;
    text-shadow: none;
}

#searchInput:focus::placeholder {
    color: #444444;
    text-shadow: none;
}

#searchBtn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    margin-top: 2px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2;
}

#searchBtn svg {
    width: 18px;
    height: 18px;
    stroke: #ffffffd6;
    filter: drop-shadow(0 0 1px #000000a2);
    transition: all 0.2s ease;
}

#searchBtn:hover svg {
    stroke: #ffffff;
    transform: scale(1.1);
    filter: drop-shadow(0 1px 3px #000000);
}

/* 紧凑标签样式优化 */
.search-engine-tabs {
    position: relative;
    margin-bottom: 20px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto 4px;
}

.tab-group {
    position: relative;
    display: flex;
    min-width: 720px;
    max-width: 1200px;
    gap: 6px;
    padding: 8px 0;
}

.tab-group::after {
    content: '';
    position: absolute;
    height: 2px;
    background-color: #ffffff;
    box-shadow: 0 1px 1px #44444444;
    bottom: 5px;
    left: var(--indicator-left, 0);
    width: var(--indicator-width, 60px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-label {
    font-size: 12px;
    color: #666;
    margin-right: 8px;
}

.engine-tab {
    border: none;
    background: none;
    padding: 1px 4px 1px 2px;
    cursor: pointer;
    font-family: 'Noto Sans SC', sans-serif;
    font-weight: 100;
    color: #ffffff;
    text-shadow: 0 1px 5px #000000;
    position: relative;
    transition: all 0.3s ease;
}

.engine-tab:hover {
    opacity: 0.8;
}

.engine-tab.active::after {
    display: none;
}

.btn-content {
    display: flex;
    align-items: center;
    gap: 2px;
}

.engine-name {
    font-size: 0.8rem;
}

.category-tag {
    font-size: 0.7rem;
    opacity: 0.85;
}

.engine-tab.active .engine-name {
    color: #ffffff;
    filter: brightness(1.2);
}

.engine-tab.active .category-tag {
    color: rgba(255,255,255) !important;
}

.wallpaper-info {
    position: fixed;
    top: 44px;  
    right: 5%;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10;
}

.wallpaper-title {
    color: #ffffff;
    font-size: 14px;
    font-family: 'Noto Sans SC', sans-serif;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wallpaper-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.wallpaper-btn svg {
    width: 16px;
    height: 16px;
    opacity: 0.9;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;  
    top: 1.5px;  
    left: 0;  
}

.wallpaper-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.wallpaper-btn:active {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(1px);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.wallpaper-btn svg {
    width: 16px;
    height: 16px;
    opacity: 0.9;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wallpaper-btn:hover svg {
    opacity: 1;
    transform: scale(1.1);
}

#wallpaperBtn svg {
    width: 18px;
    height: 18px;
}

#wallpaperBtn:hover svg {
    transform: rotate(45deg);
}

#restoreBingBtn svg {
    width: 16px;
    height: 16px;
    top: 1.5px;
    left: 1.5px;
}


#background-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

#image-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: opacity 0.3s ease;
}

#video-background {
    position: absolute;
    z-index: 2;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 错误提示样式 */
.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 4px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 14px;
    z-index: 1000;
    transition: opacity 0.3s ease;
}

.toast.error {
    background-color: rgba(244, 67, 54, 0.9);
}

.toast.fade-out {
    opacity: 0;
}

/*弹窗*/
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: fadeIn 0.3s ease-in-out;
}

.modal.show {
    display: flex;
    opacity: 1;
    animation: fadeIn 0.3s ease-in-out;
}

.modal-content {
    position: relative;
    background: #ffffffad;
    backdrop-filter: blur(30px);
    margin: auto;
    padding: 30px;
    border-radius: 8px;
    width: 480px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    animation: slideIn 0.3s ease-in-out;
}

.modal.show .modal-content {
    transform: translateY(0);
    animation: slideIn 0.3s ease-in-out;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 28px;
    line-height: 28px;
    width: 28px;
    height: 28px;
    text-align: center;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    user-select: none;
    color: #444444;
}

.modal-close:hover {
    opacity: 1;
}

.feature-list {
    margin-top: 20px;
    padding: 0;
    list-style: none;
}
.update p3{
    font-family: 'Noto Sans SC', sans-serif;
    font-weight: 500;
    color: #444444;
    margin: 8px 0;
}

.feature-list li {
    font-family: 'Noto Sans SC', sans-serif;
    font-weight: 500;
    color: #444444;
    margin: 8px 0;
    padding-left: 24px;
    position: relative;
}

.feature-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #444444;
}

.slogan {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    letter-spacing: -0.05em;
    color: #444444;
    font-size: 0.8em;
    margin: 20px 0;
    text-align: left;
    opacity: 0.9;
}

.modal-title {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 2em;
    letter-spacing: -0.07em;
    color: #444444;
    margin: 0 0 -20px 0;
    text-align: left;
}

/* 拖拽提示 */
body.drag-over::after {
    content: "释放以更换背景\A支持JPG、PNG、GIF、WEBP; 文件尺寸小于3.75MB";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.13);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.27);
    backdrop-filter: blur(20px);
    padding: 30px 40px;
    border-radius: 12px;
    white-space: pre;
    text-align: center;
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #ffffff;
    text-shadow: 0 1px 3px #444444;
    pointer-events: none;
}
