:root {
    --text-color: rgba(255, 255, 255, 0.95);
    --shadow: 0 8px 30px rgba(0,0,0,0.12);
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}

@font-face {
    font-family: 'Noto Sans';
    src: url('chrome-extension://dhoenijjpgpeimemopealfcbiecgceod/fonts/Noto-Sans-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}



* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
    font-weight: bold;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-color);
    background: #121212;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding-top: 15vh;
    font-family: var(--font-family);
    font-weight: bold;
    line-height: 1.6;
}

/* 添加关键元素的入场动画 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 时间显示动画 */
.time {
    font-family: var(--font-family);
    font-size: 5rem;
    font-weight: 600; /* 调整字体粗细为600 */
    margin-bottom: 0.3rem; /* 减少与日期的间距 */
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    opacity: 0; /* 初始状态不可见 */
    letter-spacing: 5px; /* 增加字母间距，使数字更加清晰 */
    line-height: 1.3; /* 略微增加行高 */
    transform: scaleY(1.2); /* 增加垂直拉伸 */
    animation: fadeInDown 0.8s cubic-bezier(0.19, 1, 0.22, 1) 0.2s forwards;
    user-select: none;
    -webkit-user-select: none;
}

.time:hover {
    opacity: 1;
    transform: translateY(-2px);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.5), 0 0 30px rgba(255, 255, 255, 0.3);
}

/* 日期显示动画 */
.date {
    font-family: 'Douyin Sans Bold', sans-serif;
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 0; /* 移除多余的上边距 */
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    letter-spacing: 1px;
    line-height: 1.2; /* 保持文本紧凑 */
    opacity: 0; /* 初始状态不可见 */
    animation: fadeInUp 0.7s cubic-bezier(0.19, 1, 0.22, 1) 0.6s forwards;
    user-select: none;
    -webkit-user-select: none;
}

.date:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.clock-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.3rem; /* 进一步减少与搜索框的间距 */
}

.quote-card {
    position: fixed;
    bottom: 2rem;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 90%;
    max-width: 800px;
    padding: 1.5rem;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.19, 1, 0.22, 1), 
                background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    z-index: 1;
    text-align: center;
    font-family: 'ABeeZee', 'Noto Sans', sans-serif;
    cursor: pointer;
}

.quote-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 添加鼠标悬浮效果 */
.quote-card:hover {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-5px) scale(1.02);
}

/* 鼠标按下效果 */
.quote-card:active {
    transform: translateY(-2px) scale(0.99);
    transition: transform 0.1s;
}

/* 为语录文本添加鼠标悬浮效果 */
.quote-card:hover .quote-text {
    color: rgba(255, 255, 255, 1);
}

/* 为来源添加鼠标悬浮效果 */
.quote-card:hover .quote-source {
    opacity: 1;
}

.quote-text {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.quote-source {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 气泡悬浮效果 */
.quote-card::before {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    top: -30px;
    right: 20%;
    animation: bubbleFloat 8s ease-in-out infinite;
}

/* 修改搜索框折叠态样式 */
.search-container {
    position: relative;
    z-index: 1;
    width: 220px;
    margin: 0 auto;
    margin-top: -0.5rem; /* 略微下移搜索框 */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(-20px) scale(0.9);
    /* 动画时长从0.7s缩短为0.3s，延迟从1s缩短为0.1s */
    animation: fadeInScale 0.3s cubic-bezier(0.19, 1, 0.22, 1) 0.1s forwards;
    font-family: var(--font-family);
    font-weight: bold;
}

.search-container.active {
    width: 600px; /* 展开态宽度 */
    transform: translateY(-8px); /* 向上移动 */
    z-index: 10;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.3)); /* 添加阴影效果 */
}

/* 搜索框样式 */
.search-box {
    position: relative;
    width: 100%;
    height: 100%;
    background: transparent; /* 设置为透明 */
    border-radius: 25px; /* 圆角 */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 搜索输入框样式 */
.search-input {
    position: absolute;
    width: 100%;
    height: 100%;
    padding: 0 50px 0 70px; /* 增加左侧内边距以避免与图标重叠 */
    font-size: 1.2rem;
    color: #000000;
    background: transparent; /* 设置为透明 */
    border: none; /* 去除边框 */
    border-radius: 25px; /* 圆角 */
    opacity: 0.8;
    transition: opacity 0.3s ease;
    font-family: var(--font-family);
    font-weight: bold;
}

/* 搜索按钮样式 */
.search-btn {
    position: absolute;
    right: 0;
    top: 0;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none; /* 去除边框 */
    box-shadow: none; /* 去除黑线 */
    font-family: var(--font-family);
    font-weight: bold;
}

/* 移除可能导致问题的白色背景圆圈 */
.search-btn::before {
    display: none; /* 暂时禁用 */
}

/* 搜索按钮图标优化 */
.search-btn svg {
    width: 20px; /* 调整图标大小 */
    height: 20px;
    opacity: 0.9;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.6));
    stroke: currentColor; /* 添加描边 */
    stroke-width: 1px; /* 增加图标粗细 */
}

.search-btn:hover svg {
    opacity: 1;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.8));
}

/* 修改搜索引擎选择器默认状态为隐藏 */
.search-engine-selector {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    z-index: 2;
    user-select: none;
    -webkit-user-select: none;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: none; /* 默认隐藏 */
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    font-family: var(--font-family);
    font-weight: bold;
}

/* 当搜索框激活时显示 */
.search-container.active .search-engine-selector {
    display: flex;
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 统一选择器悬停效果 */
.search-engine-selector:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.search-engine-icon {
    width: 20px;
    height: 20px;
    opacity: 1;
    filter: brightness(1) contrast(1.2);
    pointer-events: none;
}

/* 修改搜索引擎下拉菜单为白色样式 */
.search-engine-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: -5px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
    padding: 6px 0;
    display: none;
    min-width: 180px;
    margin-top: 4px;
    color: #000000;
    overflow: hidden;
    z-index: 10;
    transform: translateY(4px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-family);
    font-weight: bold;
}

.search-engine-option {
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #000000;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    border-radius: 6px;
    margin: 0 4px;
    font-family: var(--font-family);
    font-size: 0.9rem;
}

.search-engine-option:last-child {
    border-bottom: none;
}

.search-engine-option:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
    color: #333333;
}

/* 改善搜索引擎图标样式 */
.search-engine-option img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.03);
    padding: 3px;
}

/* 添加从左到右滑入动画 */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 添加下拉菜单动画和显示样式 */
@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
        backdrop-filter: blur(0);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        backdrop-filter: blur(12px);
    }
}

.search-engine-dropdown.show {
    display: block;
    animation: dropdownFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
}

/* 应用滑入动画到搜索引擎选项 */
.search-engine-option {
    opacity: 0;
    animation: slideInFromLeft 0.3s ease-out forwards;
}

/* 为不同选项添加延迟，使它们依次滑入 */
.search-engine-option:nth-child(1) { animation-delay: 0.1s; }
.search-engine-option:nth-child(2) { animation-delay: 0.2s; }
.search-engine-option:nth-child(3) { animation-delay: 0.3s; }
.search-engine-option:nth-child(4) { animation-delay: 0.4s; }
.search-engine-option:nth-child(5) { animation-delay: 0.5s; }

/* 动画 */
@keyframes slideUp {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes bubbleFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

/* 媒体查询优化移动设备 */
@media (max-width: 768px) {
    .time {
        font-size: 4rem;
    }
    
    .date {
        font-size: 1rem;
    }
    
    .search-container.active {
        width: 90%;
        max-width: 400px;
    }
    
    .quote-card {
        width: 90%;
        padding: 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .time {
        font-size: 3.5rem;
    }
    
    body {
        padding-top: 10vh;
    }
    
    .date {
        font-size: 1rem;
    }
}

/* 美化滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 添加选择器显示规则 */
.search-container.active .search-engine-selector {
    display: flex;
}

/* 确保虚化效果足够强烈且明显 */
body.search-active {
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    background-color: rgba(0, 0, 0, 0.05); /* 添加极轻微的背景色以增强虚化效果 */
}

/* 修改搜索按钮在激活状态下的颜色 */
.search-container.active .search-btn {
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.search-container.active .search-btn svg {
    color: #00b26b; /* 将图标颜色改为绿色 */
    opacity: 1;
}

/* 鼠标悬停效果也应该保持绿色 */
.search-container.active .search-btn:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.35);
}

/* 当页面加载完成时，添加脉冲效果引导用户注意 */
@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.search-container.loaded .search-btn {
    animation: pulse 1.5s cubic-bezier(0.19, 1, 0.22, 1) 2s;
}

/* 搜索联想容器 - 增强毛玻璃效果 */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
    padding: 5px;
    z-index: 100;
    max-width: 100%;
    display: none;
    animation: fadeInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.05);
}

/* 增强动画效果 */
@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(10px);
        filter: blur(8px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
        filter: blur(0);
    }
}

/* 搜索联想项 - 强化模糊效果 */
.search-suggestion-item {
    flex: 0 0 calc(33.33% - 10px);
    max-width: calc(33.33% - 10px);
    /* 增加背景不透明度 */
    background: rgba(255, 255, 255, 0.35);
    /* 极致模糊效果 */
    backdrop-filter: blur(100px);
    -webkit-backdrop-filter: blur(100px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    padding: 8px 12px;
    text-align: center;
    /* 将文字颜色改为黑色且加粗 */
    color: rgba(0, 0, 0, 0.9);
    font-size: 13px;
    font-weight: bold;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    font-family: var(--font-family);
    font-weight: bold;
}

/* 悬停效果优化 */
.search-suggestion-item:hover {
    background: rgba(255, 255, 255, 0.45);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
    color: rgba(0, 0, 0, 1);
}

.search-suggestion-item.selected {
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 1);
    color: rgba(0, 0, 0, 1);
}

.search-suggestion-item .suggestion-icon {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    color: rgba(0, 0, 0, 0.8);
    opacity: 0.9;
    filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.7));
}

.search-suggestion-item:hover .suggestion-icon {
    color: rgba(0, 0, 0, 1);
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.9));
}

/* 确保移动端适配良好 */
@media (max-width: 480px) {
    .search-suggestion-item {
        flex: 0 0 calc(50% - 8px);
        max-width: calc(50% - 8px);
        font-size: 12px;
        padding: 6px 10px;
    }
}

/* 优化折叠态文字显示 */
.search-input::placeholder {
    color: rgba(0, 0, 0, 0.5); /* 设置占位符颜色 */
    font-size: 1rem; /* 调整占位符字体大小 */
    opacity: 0.8; /* 设置占位符透明度 */
    font-family: var(--font-family);
    font-weight: bold;
}

