/* 全局样式重置和基础设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #F5F8FD;
    color: #333333;
    line-height: 1.6;
    min-height: 100vh;
}

/* 容器样式 */
.container {
    max-width: 1000px;
    width: 92%;
    margin: 0 auto;
    padding: 0;
}

/* 头部样式 */
header {
    padding: 2rem 1rem;
    text-align: center;
    background: linear-gradient(135deg, #1252CC 0%, #1769F5 100%);
    color: white;
    border-radius: 0 0 2rem 2rem;
    box-shadow: 0 4px 15px #1769f561;
    margin-bottom: 2rem;
}

header a {
    text-decoration: none;
    color: #fff;
}

.app-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.app-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 400;
}

/* 搜索模块样式 */
.search-section {
    margin-bottom: 2rem;
    position: relative;
}

.search-container {
    position: relative;
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    z-index: 10;
    height: 50px; /* 设置固定高度 */
}

.search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    border: none;
    border-radius: 100px 0 0 100px;
    box-shadow: 0 4px 15px #1769f561;
    outline: none;
    transition: all 0.3s ease;
    height: 100%; /* 继承父容器高度 */
}

.search-input:focus {
    box-shadow: 0 4px 15px #1769f561;
    transform: translateY(-2px);
}

.search-button {
    background-color: #1769F5;
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 0 100px 100px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    height: 100%;
}

.search-button svg {
    margin-right: 0.5rem;
}

.search-button:hover {
    background-color: #1769F5;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px #1769f561;
}

.search-button:active {
    transform: translateY(0);
}

/* 响应式设计 - 通用部分 */
@media (max-width: 768px) {
    .app-title {
        font-size: 2rem;
    }

    .app-subtitle {
        font-size: 1rem;
    }

    .search-input, .search-button {
        font-size: 1rem;
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 360px) {
    /* 超窄屏幕的特殊处理 */
    .search-button span {
        display: none; /* 在超窄屏幕上隐藏文字 */
    }
    
    .search-button svg {
        margin-right: 0; /* 隐藏文字后移除图标右侧间距 */
    }
    
    .search-button {
        min-width: 50px; /* 进一步减小最小宽度 */
        padding: 0.75rem; /* 调整内边距 */
    }
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #666666;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #FFB347;
}

.empty-state-text {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.empty-state-subtext {
    font-size: 0.95rem;
    opacity: 0.8;
}

/* 加载状态样式 */
.loading-state {
    text-align: center;
    padding: 4rem 1rem;
    color: #666666;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #FF8C42;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer样式 */
.footer {
    background-color: #f8f9fa;
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
    border-top: 1px solid #e9ecef;
}

.footer p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.6;
}

.footer p:first-child {
    font-weight: 600;
    color: #495057;
    font-size: 1rem;
}

.footer p:last-child {
    color: #FF8C42;
    font-weight: 500;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .footer {
        padding: 1.5rem 0;
    }
    
    .footer p {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 1rem 1rem;
    }
    
    .footer p {
        font-size: 0.8rem;
    }
}

/* 下拉菜单美化，原有代码不动 */
.dropdown {
  position: relative;
  display: inline-block;
  margin-left: 26px;
  z-index: 999; /* 提升父容器层级，这一行关键 */
}
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  min-width: 110px;
  display: none;
  flex-direction: column;
  border-radius: 8px;
  overflow: hidden;
  z-index: 9999; /* 菜单拉到最高层级，盖住搜索框 */
}
.dropdown-menu a {
  padding: 10px 14px;
  text-decoration: none;
  color: #333;
  transition: background-color 0.2s;
}
.dropdown-menu a:hover {
  background-color: #f5f7fa;
  color: #2266cc;
}
.dropdown:hover .dropdown-menu {
  display: flex;
}
      /* 新增飙升榜排名样式 */
        .rank-badge {
            display: inline-block;
            width: 24px;
            height: 24px;
            line-height: 24px;
            text-align: center;
            background-color: #ff4757;
            color: white;
            border-radius: 50%;
            font-size: 12px;
            font-weight: bold;
            margin-right: 10px;
            flex-shrink: 0;
        }
        .rank-badge.top1 { background-color: #ffd700; color: #333; }
        .rank-badge.top2 { background-color: #c0c0c0; color: #333; }
        .rank-badge.top3 { background-color: #cd7f32; color: #333; }
        .result-item {
            display: flex;
            align-items: center;
            padding: 12px 10px;
            border-bottom: 1px solid #eee;
            transition: background-color 0.2s;
        }
        .result-item:hover {
            background-color: #f8f9fa;
        }
        
        header {
    position: relative;
    z-index: 100;
}
.search-container {
    z-index: 1;
}