html,body{margin:0;padding:0;height:100%}
body{background-size:cover;background-position:center;position:relative;transition:background-image 1s ease-in-out}
.music-player{position:fixed;top:1.25rem;right:1.25rem;background:transparent;padding:0.3125rem 0.625rem;display:flex;align-items:center;gap:0.625rem;z-index:1000}
.play-btn{
    width: 1.5625rem;
    height: 1.5625rem;
    border: none;
    background: transparent;
    border-radius: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #fff;
    flex-shrink: 0;
    outline: none;
}
.song-title{color:#fff;white-space:nowrap;overflow:hidden;width:7.5rem;position:relative;font-family:"楷体",KaiTi,"Microsoft YaHei",sans-serif;padding:0.5rem 0}
.song-title span{display:inline-block;animation:scrollText 8s linear infinite;letter-spacing:0.5em}
.song-title.playing span{animation:scrollText 8s linear infinite}
.song-title.playing span i{display:inline-block;animation:bounce 1s infinite;margin:0 0.1875rem;transform-origin:center bottom}
@keyframes scrollText{0%{transform:translateX(8.75rem)}
100%{transform:translateX(-8.75rem)}
}@keyframes bounce{0%,100%{transform:translateY(0)}
50%{transform:translateY(-0.55rem)}
}

/* 天气信息模块样式 */
.weather-info {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    color: #fff;
    z-index: 1000;
    font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
    text-shadow: 0.0625rem 0.0625rem 0.125rem rgba(0, 0, 0, 0.25);
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(0.625rem);
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem;
    border-top: 0.0625rem solid rgba(255, 255, 255, 0.25);
    border-left: 0.0625rem solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 0.1875rem 0.5rem rgba(0, 0, 0, 0.15), 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    max-width: 9.375rem;
    transform-origin: top left;
}

.weather-info:hover {
    background-color: rgba(0, 0, 0, 0.25);
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.2), 0 0.125rem 0.25rem rgba(0, 0, 0, 0.1);
    transform: scale(1.02);
}

.location-info {
    display: flex;
    align-items: center;
    margin-bottom: 0.15rem;
    border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.15);
    padding-bottom: 0.15rem;
}

.city-name {
    font-size: 0.9rem;
    margin-right: 0.4rem;
    position: relative;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.city-name::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -0.2rem;
    transform: translateY(-50%);
    width: 0.0625rem;
    height: 60%;
    background-color: rgba(255, 255, 255, 0.4);
}

.temperature {
    font-size: 1.1rem;
    font-weight: bold;
    letter-spacing: -0.02em;
}

.weather-details {
    margin-bottom: 0.3rem;
    font-size: 0.75rem;
    opacity: 0.85;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.3rem;
}

/* 天气描述样式 */
.weather-desc {
    position: relative;
    display: inline-block;
    font-size: 0.75rem;
    opacity: 0.85;
    letter-spacing: 0.02em;
}

/* 数字时间显示 */
.digital-time {
    display: inline-block;
    margin-left: auto;
    font-size: 0.75rem;
    opacity: 0.85;
    letter-spacing: 0.02em;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.3rem;
    padding: 0.1rem 0.3rem;
}

.ip-info {
    font-size: 0.65rem;
    opacity: 0.7;
    border-top: 0.0625rem solid rgba(255, 255, 255, 0.1);
    padding-top: 0.15rem;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* AI Search Widget Styles */
.ai-search-container {
    position: fixed;
    top: 25vh;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    max-width: 37.5rem;
    display: flex;
    background: rgba(255, 245, 247, 0.95);
    backdrop-filter: blur(0.625rem);
    border-radius: 1.875rem;
    box-shadow: 0 0.1875rem 0.9375rem rgba(255, 183, 197, 0.15);
    z-index: 1000;
    overflow: hidden;
    border: 0.0625rem solid rgba(255, 183, 197, 0.3);
    height: 3.125rem;
    align-items: center;
    padding: 0 0.3125rem;
}

/* 搜索输入区域 */
.ai-search-input {
    flex-grow: 1;
    border: none;
    padding: 0 0.9375rem;
    font-size: 1rem;
    background: transparent;
    color: #ff6b89;
    height: 100%;
}

.ai-search-input:focus {
    outline: none;
}

.ai-search-input::placeholder {
    color: #ffb7c5;
    opacity: 0.7;
}

/* 发送按钮 */
.ai-search-button {
    background: none;
    color: #ff6b89;
    padding: 0;
    min-width: 3.125rem;
    height: 100%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.ai-search-button:hover {
    background: rgba(255, 183, 197, 0.2);
}

/* AI结果区域 */
.ai-results-container {
    position: fixed;
    top: calc(25vh + 3.75rem);
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    max-width: 37.5rem;
    background: rgba(255, 245, 247, 0.95);
    backdrop-filter: blur(0.625rem);
    border-radius: 0.9375rem;
    box-shadow: 0 0.3125rem 1.25rem rgba(255, 183, 197, 0.15);
    display: none;
    flex-direction: column;
    z-index: 999;
    max-height: 50vh;
    overflow: hidden;
    border: 0.0625rem solid rgba(255, 183, 197, 0.3);
}

.ai-results-container.visible {
    display: flex;
}

.ai-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0.9375rem;
    border-bottom: 0.0625rem solid rgba(255, 183, 197, 0.2);
    background-color: rgba(255, 228, 234, 0.8);
    color: #ff6b89;
    font-weight: 500;
}

.ai-results-content {
    padding: 1.25rem;
    overflow-y: auto;
    max-height: calc(50vh - 6.875rem);
    line-height: 1.5;
    color: #ff6b89;
    background: none;
}

/* 结果框底部和关闭按钮 */
.ai-results-footer {
    padding: 0.625rem 0.9375rem;
    display: flex;
    justify-content: flex-end;
    border-top: 0.0625rem solid rgba(255, 183, 197, 0.2);
    background-color: rgba(255, 228, 234, 0.6);
}

.ai-close-result-button {
    padding: 0.3125rem 0.9375rem;
    background-color: #ffb7c5;
    border: 0.0625rem solid rgba(255, 183, 197, 0.5);
    border-radius: 3.125rem;
    cursor: pointer;
    font-size: 0.8125rem;
    color: #ffffff;
    transition: all 0.2s;
    box-shadow: 0 0.125rem 0.5rem rgba(255, 183, 197, 0.3);
    min-width: 3.75rem;
    text-align: center;
}

.ai-close-result-button:hover {
    background-color: #ff9db1;
    box-shadow: 0 0.1875rem 0.625rem rgba(255, 183, 197, 0.5);
}

/* 模型选择器 */
.ai-model-wrapper {
    position: fixed;
    top: 25vh;
    right: calc(50% + 19.0625rem);
    z-index: 1001;
    display: flex;
    align-items: center;
}

.ai-model-btn {
    padding: 0 0.9375rem;
    background-color: #ffb7c5;
    border: 0.0625rem solid rgba(255, 183, 197, 0.5);
    border-radius: 3.125rem;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #ffffff;
    text-shadow: 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
    box-shadow: 0 0.125rem 0.5rem rgba(255, 183, 197, 0.3);
    min-width: 4.375rem;
    text-align: center;
    height: 3.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
}

.ai-model-btn:hover {
    background-color: #ff9db1;
    box-shadow: 0 0.1875rem 0.625rem rgba(255, 183, 197, 0.5);
}

.ai-model-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(255, 228, 234, 0.95);
    border-radius: 0.5rem;
    box-shadow: 0 0.3125rem 0.9375rem rgba(255, 183, 197, 0.2);
    margin-top: 0.3125rem;
    display: none;
    z-index: 1002;
    overflow: hidden;
    border: 0.0625rem solid rgba(255, 183, 197, 0.3);
}

.ai-model-option {
    padding: 0.625rem 0.9375rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: #ff6b89;
    transition: background 0.2s, color 0.2s;
    text-align: center;
}

.ai-model-option:not(:last-child) {
    border-bottom: 0.0625rem solid rgba(255, 183, 197, 0.2);
}

.ai-model-option:hover {
    background-color: #ffb7c5;
    color: #ffffff;
}

/* 隐藏不再使用的元素 */
#chat-toggle-button, 
#chat-widget-container,
.ai-model-native-select,
.ai-close-button,
.ai-model-select,
.ai-model-select-btn {
    display: none;
}

/* 媒体查询-小屏幕适配 */
@media (max-width: 768px) {
    .ai-search-container {
        width: 85%;
        top: 20vh;
    }
    
    .ai-results-container {
        width: 85%;
        top: calc(20vh + 3.75rem);
    }
    
    .ai-model-wrapper {
        top: calc(20vh - 3.5rem);
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .ai-model-btn {
        min-width: 6.25rem;
        font-size: 0.875rem;
    }
    
    .song-title {
        width: 5.5rem;
    }
}

/* 媒体查询-极小屏幕适配 */
@media (max-width: 480px) {
    .ai-search-container {
        width: 90%;
        top: 15vh;
        height: 2.75rem;
    }
    
    .ai-results-container {
        width: 90%;
        top: calc(15vh + 3.25rem);
    }
    
    .ai-model-wrapper {
        top: calc(15vh - 3.5rem);
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .ai-model-btn {
        min-width: 6.25rem;
    }
    
    .ai-results-content {
        padding: 0.9375rem;
    }
    
    .weather-info {
        max-width: 6.25rem;
        padding: 0.3125rem 0.5rem;
        border-radius: 0.5rem;
        transform: scale(0.9);
        transform-origin: top left;
    }
    
    .city-name {
        font-size: 0.75rem;
    }
    
    .temperature {
        font-size: 0.9rem;
    }
    
    .weather-details {
        font-size: 0.65rem;
        margin-bottom: 0.15rem;
    }
    
    .digital-time {
        font-size: 0.65rem;
        padding: 0.05rem 0.25rem;
    }
    
    .ip-info {
        font-size: 0.55rem;
    }
    
    .song-title {
        width: 4.5rem;
    }
    
    .music-player {
        padding: 0.25rem 0.5rem;
    }
}

/* 磁贴区域样式 */
.tiles-container {
    position: fixed;
    top: 40vh;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    max-width: 37.5rem;
    max-height: 45vh;
    z-index: 999;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    min-height: 0;
    display: block !important;
    background: transparent;
    backdrop-filter: none;
    border-radius: 1.25rem;
    padding: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.tiles-container::-webkit-scrollbar {
    width: 6px;
}

.tiles-container::-webkit-scrollbar-track {
    background: transparent;
}

.tiles-container::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.tiles-container.hidden {
    opacity: 0;
    visibility: hidden;
}

.tile-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 3rem;
    padding: 0;
    background: transparent;
    border-radius: 1.25rem;
    min-height: 0;
}

.tile {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 0.9375rem;
    overflow: hidden;
    border: none;
    perspective: 1000px;
    position: relative;
    transform-style: preserve-3d;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    color: inherit;
}

.tile-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.tile img {
    width: 80%;
    height: 80%;
    object-fit: contain;
    border: none;
    animation: flipIn 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 1;
    will-change: transform;
    backface-visibility: visible;
    transform-origin: center center;
    z-index: 2;
    /* filter: brightness(0) invert(1); */
    transition: opacity 0.3s ease;
}

.tile:hover {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
}

@keyframes flipIn {
    0% {
        transform: rotateY(90deg) scale(0.8);
        opacity: 0;
    }
    100% {
        transform: rotateY(0deg) scale(1);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .tiles-container {
        width: 85%;
        top: 40vh;
    }

    .tile-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .tiles-container {
        width: 90%;
        top: 30vh;
    }
    
    .tile-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
}