:root {
    --primary-yellow: #FFCC00;
    --background-color: #FFFFFF;
    --card-color: #FFFFFF;
    --text-color: #333333;
    --border-color: #EEEEEE;
    --shadow: 0 4px 8px rgba(0,0,0,0.08);
    --transition: all 0.25s ease;
}

* { margin:0; padding:0; box-sizing:border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body {
    background: transparent;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container { width:100%; max-width:100%; padding:0 40px; margin:0 auto; flex:1; }

/* 头部：诗句 */
header { text-align:center; margin-bottom:30px; }

.daily-text {
    font-size: 1.5rem;
    color: #333;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}

/* 搜索框 */
.search-container {
    position: relative;
    background: rgba(255,255,255,0.98);
    border-radius:50px;
    padding:10px 20px;
    box-shadow: var(--shadow);
    width:100%; max-width:900px;
    margin:0 auto 30px;
    display:flex;
    align-items:center;
    border:1px solid var(--border-color);
}
.search-engine-selector {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    z-index: 20;
}
.search-engine-selector img { width:22px; height:22px; border-radius:4px; }
.search-engine-menu {
    display:none; position:absolute; top:120%; left:0;
    background:#fff; border-radius:8px; box-shadow:0 8px 20px rgba(0,0,0,0.08);
    width:220px; padding:10px; margin-top:8px; z-index:100;
}
.search-engine-menu.active { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.search-engine-option { display:flex; flex-direction:column; align-items:center; padding:8px; border-radius:6px; cursor:pointer; transition:var(--transition); }
.search-engine-option:hover { background-color: #f9f9f9; }
.search-engine-option img { width:24px; height:24px; margin-bottom:6px; }
.search-engine-option span { font-size:12px; }

/* 输入框 */
.search-form { flex-grow:1; display:flex; align-items:center; gap:8px; }
.search-input {
    flex-grow:1;
    border:none;
    outline:none;
    padding:10px 40px 10px 50px;
    font-size:16px;
    background:transparent;
    color:var(--text-color);
}
.search-button {
    background:var(--primary-yellow);
    border:none;
    width:40px;
    height:40px;
    border-radius:50%;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    transition:var(--transition);
    color:#222;
}
.search-button:hover { transform:scale(1.03); }

/* 分类 */
.categories { display:flex; justify-content:center; flex-wrap:wrap; gap:10px; margin-bottom:30px; }
.category-btn { 
    padding:10px 20px; 
    background-color: rgba(255,255,255,0.3); /* 和网站卡片统一 */
    border:1px solid rgba(255,255,255,0.3); /* 可选，也统一 */
    border-radius:25px; 
    cursor:pointer; 
    box-shadow:var(--shadow); 
    transition:var(--transition); 
    font-weight:500; 
    display:flex; 
    align-items:center; 
    gap:8px; 
}
.category-btn:hover { background-color:#f5f5f5; color:#222; }
.category-btn.active { background-color:#ffcc00; color:#222; }

/* 网站卡片 */
.website-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}
.website-card { 
    background-color: rgba(255,255,255,0.3); 
    border: 1px solid rgba(255,255,255,0.3);
    border-radius:12px; 
    padding:10px; 
    text-align:center; 
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); 
    transition:var(--transition); 
    cursor:pointer; 
}
.website-card:hover { transform:translateY(-6px); box-shadow:0 16px 30px rgba(0,0,0,0.06); }
.website-card i, .website-card img { font-size:24px; margin-bottom:15px; width:40px; height:40px; line-height:40px; border-radius:50%; text-align:center; margin:0 auto 15px; }

/* 底部 */
.footer { text-align:center; padding:20px 0; color:#666; border-top:1px solid var(--border-color); margin-top:30px; }
#weiboHot {
    margin-top: 20px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}
#weiboHot li {
    background: rgba(255,255,255,0.3); /* 半透明背景 */
    border: 1px solid rgba(255,255,255,0.2); /* 边框半透明 */
    border-radius: 8px;
    padding: 12px 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}
#weiboHot .rank { font-size: 16px; font-weight: bold; min-width: 20px; text-align: center; }
#weiboHot li:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.1); }
#weiboHot a { flex-grow: 1; text-decoration: none; color: var(--text-color); font-weight: 500; }
#weiboHot a:hover { color: var(--primary-yellow); }
#weiboHot .hot-value { font-size: 13px; font-weight: bold; color: var(--primary-yellow); margin-left: 10px; }

/* 添加网站按钮 */
#addSiteBtn { position:fixed; bottom:30px; right:30px; background:var(--primary-yellow); color:#222; border:none; border-radius:50%; width:60px; height:60px; font-size:24px; cursor:pointer; box-shadow:var(--shadow); display:flex; justify-content:center; align-items:center; transition:var(--transition); }
#addSiteBtn:hover { transform:scale(1.1); }

/* 搜索历史 */
.search-history {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.98);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 900px;
    padding: 15px;
    border: 1px solid var(--border-color);
    display: none;
    z-index: 1000;
    margin-top: 10px;
    backdrop-filter: blur(10px);
}
.search-history.active { display: block; }
.history-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 14px; color: #666; padding-bottom: 8px; border-bottom: 1px solid #f0f0f0; }
.clear-history { background: none; border: none; color: var(--primary-yellow); cursor: pointer; font-size: 12px; padding: 4px 8px; border-radius: 4px; transition: var(--transition); }
.clear-history:hover { background-color: #f5f5f5; }
.history-items { display: flex; flex-wrap: wrap; gap: 8px; }
.history-item { background: #f9f9f9; border: 1px solid #eee; border-radius: 16px; padding: 6px 12px; font-size: 13px; cursor: pointer; transition: var(--transition); display: flex; align-items: center; gap: 5px; }
.history-item:hover { background: var(--primary-yellow); color: #222; transform: translateY(-2px); }
.history-item i { font-size: 10px; opacity: 0.7; }

.history-item-wrapper {
    position: relative;
    display: inline-block;
}

.history-item-delete {
    position: absolute;
    top: 0;
    right: 0;
    background: #FF6B6B;
    border: none;
    color: #fff;
    font-size: 12px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    cursor: pointer;
    line-height: 14px;
    padding: 0;
    display: none; /* 默认隐藏 */
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.history-item-wrapper:hover .history-item-delete {
    display: flex; /* 鼠标悬停显示 */
    opacity: 0.8;
}

.history-item-delete:hover {
    opacity: 1;
}

/* 响应式 */
@media (max-width:768px) {
    .website-grid { grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:15px; }
    h1 { font-size:2rem; }
    .search-container { flex-direction:column; padding:15px; border-radius:15px; }
    .search-engine-selector { left:15px; top:40px; transform:none; }
    .search-input { padding-left:45px; }
    #weiboHot { grid-template-columns: 1fr; }
}
@media (max-width:480px) {
    .website-grid { grid-template-columns:repeat(2,1fr); }
    .category-btn { padding:8px 15px; font-size:14px; }
}

#bgVideo {
    position: absolute;  /* 不固定屏幕，跟随内容 */
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100%;   /* 高度随页面内容扩展 */
    object-fit: cover;
    z-index: -1;
}

/* 热搜折叠按钮 */
.toggle-hot-btn {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
    margin-bottom: 10px;
    font-size: 14px;
    backdrop-filter: blur(6px);
    transition: all 0.3s ease;
}

.toggle-hot-btn:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* 热搜折叠动画 */
#weiboHot {
    transition: max-height 0.4s ease, opacity 0.4s ease;
    overflow: hidden;
    max-height: 500px; /* 展开时的最大高度 */
    opacity: 1;
}

#weiboHot.collapsed {
    max-height: 0;
    opacity: 0;
}


html {
  scrollbar-width: none; /* Firefox */
}
body {
  overflow-y: scroll;
  -ms-overflow-style: none; /* IE/Edge */
}
body::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}