* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #fff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 100%;
    /* max-width: 1200px; */
    margin: 0 auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    padding-bottom: 50px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 0;
    width: 100%;
}

.weather {
    display: none;
}

.menu-icon {
    width: 24px;
    height: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    position: relative;
    z-index: 1000;
    transition: transform 0.3s ease;
    margin-left: auto;
    margin-right: 20px;
}

.menu-line {
    width: 100%;
    height: 2px;
    background-color: #333;
    transition: all 0.3s ease;
}

/* 菜单图标变成箭头的动画 */
.menu-icon.active .menu-line:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
}

.menu-icon.active .menu-line:nth-child(2) {
    opacity: 0;
}

.menu-icon.active .menu-line:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}

/* 导航面板 */
.nav-panel {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100vh;
    background-color: #fff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
    overflow-y: auto;
    transition: right 0.3s ease;
    padding: 70px 20px 20px;
    display: flex;
    flex-direction: column; /* 使内容垂直排列 */
}

.nav-panel.active {
    right: 0;
}

.nav-section {
    margin-bottom: 20px;
}

.nav-section h3 {
    font-size: 14px;
    color: #999;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.nav-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.nav-item {
    text-decoration: none;
    color: #333;
    font-size: 14px;
    padding: 8px 0;
    text-align: center;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.nav-item:hover {
    background-color: #f5f5f5;
}

.search-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 80px;
    margin-bottom: 40px;
}

.logo {
    margin-bottom: 30px;
}

.logo-img {
    width: 220px;
    height: auto;
}

.search-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
    width: 100%;
    max-width: 600px;
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    color: #666;
    position: relative;
}

.tab.active {
    color: #333;
    font-weight: bold;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #333;
}

.search-box {
    display: flex;
    width: 100%;
    max-width: 600px;
    margin: 20px auto;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid #dfe1e5;
    box-shadow: none;
    height: 44px;
    background-color: #fff;
}

.search-box input {
    flex: 1;
    height: 44px;
    padding: 0 16px;
    font-size: 16px;
    border: none;
    outline: none;
    background-color: transparent;
}

.search-box button {
    width: 44px;
    height: 44px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 发送按钮样式 */
.send-btn svg {
    width: 24px;
    height: 24px;
    fill: #9aa0a6; /* 默认灰色 */
    transition: fill 0.3s ease;
}

/* 当输入框有内容时按钮变色 */
.send-btn.active svg {
    fill: #06f; /* 有文字时变为蓝色 */
}

.subtitle {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
    text-align: center;
}

/* AI 搜索结果样式 */
.ai-result {
    width: 100%;
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: none;
    display: none;
}

.ai-result.active {
    display: block;
}

.ai-content {
    line-height: 1.6;
    font-size: 15px;
    color: #202124;
}

.ai-content strong {
    color: #000;
    font-weight: 600;
}

.ai-content br {
    display: block;
    margin: 8px 0;
    content: "";
}

/* 列表样式 */
.list-item {
    margin-bottom: 8px;
    display: flex;
}

.list-number {
    font-weight: 600;
    margin-right: 5px;
    color: #1a73e8;
}

.ai-content h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

.ai-content p {
    margin-bottom: 10px;
    color: #555;
}

.loading {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 120px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-left-color: #333;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

footer {
    width: 100%;
    text-align: center;
    padding: 5px 0;
    color: #999;
    font-size: 12px;
    position: fixed;
    bottom: 0;
    left: 0;
    background-color: #fff;
    z-index: 10;
}

/* 遮罩层 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 600px) {
    header {
        padding: 15px;
    }
    
    .search-box {
        width: calc(100% - 40px);
        margin-left: 20px;
        margin-right: 20px;
    }
    
    .ai-result {
        width: calc(100% - 40px);
        margin-left: 20px;
        margin-right: 20px;
    }
    
    .search-container {
        padding-top: 60px;
    }
    
    .menu-icon {
        margin-right: 20px;
    }
    
    .search-tabs {
        flex-wrap: wrap;
    }
    
    .tab {
        padding: 8px 15px;
    }
    
    .logo-img {
        width: 180px;
    }
    
    .nav-panel {
        width: 280px;
        right: -280px;
    }
    
    .nav-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 添加暗色主题 */
.dark-theme {
    background-color: #202124;
    color: #e8eaed;
}

.dark-theme .nav-panel {
    background-color: #202124;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
}

.dark-theme .nav-section h3 {
    color: #bdc1c6;
    border-bottom-color: #3c4043;
}

.dark-theme .nav-item {
    color: #e8eaed;
}

.dark-theme .nav-item:hover {
    background-color: #3c4043;
}

.dark-theme .menu-line {
    background-color: #e8eaed;
}

.dark-theme .search-tabs {
    border-bottom-color: #3c4043;
}

.dark-theme .tab {
    color: #9aa0a6;
}

.dark-theme .tab.active {
    color: #e8eaed;
}

.dark-theme .tab.active::after {
    background-color: #8ab4f8;
}

.dark-theme #search-input {
    background-color: #303134;
    color: #e8eaed;
    border-color: #5f6368;
}

.dark-theme #search-btn {
    background-color: #8ab4f8;
    color: #202124;
}

.dark-theme .ai-result {
    background-color: #303134;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.dark-theme .ai-content h3 {
    color: #e8eaed;
}

.dark-theme .ai-content p {
    color: #bdc1c6;
}

.dark-theme .spinner {
    border-color: rgba(255, 255, 255, 0.1);
    border-left-color: #8ab4f8;
}

.dark-theme footer {
    background-color: #202124;
    color: #9aa0a6;
}

/* 添加加载消息样式 */
.loading-message {
    margin-top: 10px;
    color: #666;
    font-size: 14px;
    text-align: center;
}

/* 添加AI加载状态样式 */
.ai-loading {
    color: #202124;
    font-size: 15px;
    margin-bottom: 0;
    padding: 0;
    background-color: transparent;
    border-radius: 0;
    line-height: 1.6;
}

.error {
    color: #d32f2f;
    padding: 10px;
    background-color: #ffebee;
    border-radius: 4px;
    margin-bottom: 10px;
}

/* 添加闪动光标样式（仅用于加载状态） */
.ai-loading::after {
    content: '';
    display: inline-block;
    width: 2px; /* 竖线光标 */
    height: 16px;
    background-color: #202124;
    margin-left: 4px;
    animation: cursor-blink 1s infinite;
    vertical-align: middle;
}

/* 暗色主题的光标颜色 */
.dark-theme .ai-loading::after {
    background-color: #e8eaed;
}

/* 光标闪烁动画 */
@keyframes cursor-blink {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}

/* 导航面板底部版权信息 */
.nav-footer {
    margin-top: auto; /* 使其靠底部 */
    padding-top: 15px;
    border-top: 1px solid #eee;
    text-align: left; /* 靠左显示 */
}

.nav-footer p {
    font-size: 14px; /* 增大字号 */
    color: #000; /* 黑色文字 */
    margin-bottom: 5px;
}

/* 暗色主题适配 */
.dark-theme .nav-footer {
    border-top-color: #3c4043;
}

.dark-theme .nav-footer p {
    color: #9aa0a6;
} 