/* /////////////////////////// */
/* AceBeatle 版权所有，请勿删除 */
/* ////////////////////////// */

:root {
    --primary-color: #6e48aa;
    --secondary-color: #9d50bb;
    --dark-bg: #121212;
    --darker-bg: #0a0a0a;
    --text-color: #e0e0e0;
    --text-muted: #aaaaaa;
    --card-bg: #1e1e1e;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(110, 72, 170, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

.loading-text {
    color: var(--text-color);
    text-align: center;
    line-height: 1.5;
}

.loading-text-uniform {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.95rem; /* 设置统一的字体大小 */
    text-align: center;
}

.loading-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 5px;
    background: linear-gradient(45deg, 
        #6e48aa, #9d50bb, #4776E6, #8E54E9, #6e48aa);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradientFlow 8s ease infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none !important;
    cursor: url('data:image/svg+xml;utf8,\
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30">\
<defs>\
<filter id="s" x="-100%" y="-100%" width="300%" height="300%">\
<feDropShadow dx="0" dy="4" stdDeviation="3" flood-color="rgba(0,0,0,0.75)" />\
</filter>\
</defs>\
<circle cx="12" cy="12" r="6" fill="rgba(255,255,255,0.8)" stroke="rgba(0,0,0,0.6)" stroke-width="1.5" filter="url(%23s)"/>\
</svg>') 12 12, auto !important;
}

/* 诗词作者行样式 */
.poem-author {
    font-size: 0.9em; /* 稍微小一点的字号 */
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.4;
}

/* 加载文本样式 */
.loading-text-uniform {
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  font-size: 0.95rem;
  padding: 10px;
}

/* 专用加载容器 */
.loading-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px; /* 确保有足够高度 */
    width: 100%;
}

@keyframes errorPulse {
    0% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.02); }
    100% { opacity: 0.8; transform: scale(1); }
}

.error-message {
    text-align: center;
    padding: 20px;
    color: #ff6b6b;
    background-color: rgba(255, 107, 107, 0.1);
    border-radius: 8px;
    margin: 10px 0;
    font-size: 0.95rem;
    line-height: 1.6;
    font-style: normal;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    animation: errorPulse 2s ease-in-out infinite;
}

/* 错误内容包装 */
.error-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* 错误图标 */
.error-message .fa-exclamation-triangle {
    font-size: 1.5rem;
    color: #ff6b6b;
}

/* 错误文本 */
.error-message span {
    color: #ff6b6b;
    font-size: 0.95rem;
}

.error-message i {
    margin-right: 8px;
    font-size: 1.1rem;
}

body {
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
    user-select: none;
    -webkit-user-select: none;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at var(--x, 50%) var(--y, 50%), 
    rgba(110, 72, 170, 0.4) 0%,   /* 提高不透明度 */
    rgba(110, 72, 170, 0.1) 30%,  /* 加入中间过渡 */
    transparent 60%                /* 缩小渐变范围 */
  );
  pointer-events: none;
  z-index: -1;
}

html {
    scrollbar-width: auto; /* Firefox - 设置为auto或thin */
    scrollbar-color: var(--primary-color) var(--darker-bg);
}

::-webkit-scrollbar {
    width: 12px;  /* 加粗到12px */
    height: 12px; /* 横向滚动条高度 */
}

::-webkit-scrollbar-track {
    background: var(--darker-bg); /* 更深的轨道颜色 */
    border-left: 1px solid rgba(255,255,255,0.1); /* 左侧边框 */
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(
        135deg, 
        var(--primary-color), 
        var(--secondary-color)
    ); /* 渐变效果 */
    border-radius: 6px; /* 圆角 */
    border: 3px solid var(--darker-bg); /* 边框留白 */
    box-shadow: inset 0 0 5px rgba(0,0,0,0.3); /* 内阴影 */
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(
        135deg, 
        var(--secondary-color), 
        var(--primary-color)
    ); /* 悬停时反转渐变 */
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5); /* 更强的内阴影 */
}

::-webkit-scrollbar-corner {
    background: var(--dark-bg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 20px;
    flex: 1;
}

header {
    text-align: center;
    margin: 40px 0 60px;
    padding: 30px 0;
    border-radius: 15px;
}

.header-content {
    position: relative;
    display: inline-block;
    padding: 0 30px;
    z-index: 2;
}

.title-wrapper {
    position: relative;
    display: inline-block;
    padding: 10px 20px;
    border-radius: 10px;
    overflow: hidden;
}

.title-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    pointer-events: none;
}

h1 {
    font-size: 6rem;
    margin-bottom: 15px;
    background: linear-gradient(45deg, 
        #6e48aa, #9d50bb, #4776E6, #8E54E9, #6e48aa);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
    letter-spacing: 3px;
    position: relative;
    animation: gradientFlow 8s ease infinite;
    text-shadow: 0 0 20px rgba(110, 72, 170, 0.7);
}

.title-shadow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(
        ellipse at center,
        rgba(110, 72, 170, 0.6) 0%,
        transparent 70%
    );
    filter: blur(15px);
    z-index: -1;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.title-decoration {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.decoration-line {
    height: 2px;
    width: 60px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--primary-color), 
        var(--secondary-color), 
        transparent);
    opacity: 0.7;
    transition: all 0.5s ease;
}

.decoration-dot {
    width: 10px;
    height: 10px;
    background-color: var(--primary-color);
    border-radius: 50%;
    margin: 0 15px;
    box-shadow: 0 0 15px var(--primary-color);
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin: 5px 0;
    font-style: italic;
    letter-spacing: 1px;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    min-height: 1.5em;
    line-height: 1.5;
    opacity: 0; /* 初始完全透明 */
    transform: translateY(10px); /* 初始向下偏移10px */
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.subtitle.visible {
    opacity: 1; /* 完全显示 */
    transform: translateY(0); /* 回到原位 */
}

.subtitle.loading {
    color: #c0c0c0; /* 比默认的#aaaaaa更亮 */
    font-style: italic;
    font-size: 0.95rem;
    text-align: center;
    animation: pulse-opacity 1.5s ease-in-out infinite;
}

@keyframes pulse-opacity {
    0% { opacity: 0.6; }
    50% { opacity: 0.8; }
    100% { opacity: 0.6; }
}

.main-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.card {
    background: var(--card-bg) !important;
    position: relative; /* 建立新的层叠上下文 */
    border-radius: 10px;
    padding: 25px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    max-height: 300px; /* 限定卡片的最大高度 */
    overflow-y: auto; /* 当内容超过高度时显示垂直滚动条 */
}

.card-content {
    max-height: 200px; /* 限定内容区域的最大高度 */
    overflow-y: auto; /* 当内容超过高度时显示垂直滚动条 */
    padding-right: 10px; /* 为滚动条留出空间 */
    margin-right: -10px; /* 抵消右侧内边距 */
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.card-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.card-title i {
    margin-right: 10px;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.link-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 15px 12px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-color);
}

.link-item i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
  font-size: 1.1rem;
  color: var(--primary-color);
  transition: color 0.3s ease;
}

.link-item:hover {
    background: rgba(110, 72, 170, 0.2);
    transform: translateX(5px);
}

.link-text {
    font-weight: 500;
}

.weather-container {
  padding: 10px;
  font-size: 0.95rem;
  line-height: 1.8;
}

.weather-line {
  padding: 3px 0;
}

.weather-loading, 
.weather-error {
  text-align: center;
  padding: 20px 0;
  color: var(--text-muted);
  font-style: italic;
}

.weather-error {
  color: #ff6b6b;
}

footer {
    text-align: center;
    padding: 20px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.footer-link:hover {
    color: var(--primary-color);
    text-shadow: 0 0 8px rgba(110, 72, 170, 0.5);
}

.time-container {
    text-align: center;
    padding: 15px 0;
}

.current-date {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-muted);
}

.current-time {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 15px;
    background: linear-gradient(45deg, 
        var(--primary-color), 
        var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.greeting {
    font-size: 1.3rem;
    font-style: italic;
    color: var(--primary-color);
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.progress-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

.progress-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.progress-bar {
    height: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, 
        var(--primary-color), 
        var(--secondary-color));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.baidu-hotlist {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hot-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.hot-item:hover {
    background: rgba(110, 72, 170, 0.2);
    transform: translateX(3px);
}

.hot-rank {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-right: 10px;
    flex-shrink: 0;
}

.hot-rank.top3 {
    background: linear-gradient(135deg, #ff4e4e, #f96464);
}

.hot-title {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-color);
}

.hot-link {
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    width: 100%;
}

.hot-link:hover {
    color: var(--text-color);
}

.hot-rank.rank1 {
    background: linear-gradient(135deg, #ff4e4e, #f96464);
}

.hot-rank.rank2 {
    background: linear-gradient(135deg, #ff8c4e, #f98a64);
}

.hot-rank.rank3 {
    background: linear-gradient(135deg, #ffc04e, #f9b564);
}

.hot-rank:not(.rank1):not(.rank2):not(.rank3) {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.scrollable-inner {
    padding: 5px 0;
    color: var(--text-color);
}

.scrollable-content::-webkit-scrollbar {
    width: 6px;
}

.scrollable-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.scrollable-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.scrollable-content::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

.log-entry {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.log-entry:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.log-entry h3 {
    color: var(--primary-color);
    font-size: 1rem;
    margin-bottom: 8px;
}

.log-entry ul {
    padding-left: 20px;
    color: var(--text-color);
    font-size: 0.9rem;
}

.log-entry li {
    margin-bottom: 5px;
}

#back-to-top {
    /* 原有基础样式保持不变 */
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    border: none;
    outline: none;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    cursor: pointer;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: all 0.2s ease-out;
    -webkit-tap-highlight-color: transparent;
    opacity: 0;
    transform: translateY(20px);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

#back-to-top:active, 
#back-to-top.touch-active {
    transform: translateY(1px) scale(0.96);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

#back-to-top.show {
    opacity: 1;
    transform: translateY(0);
}

#back-to-top:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    transform: translateY(-3px);
}

#back-to-top:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

#back-to-top::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.1) 50%,
        rgba(255,255,255,0) 100%
    );
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

#back-to-top:hover::before {
    transform: translateX(100%);
}

/* 在文件末尾添加 */
.highlight {
  color: var(--primary-color);
  font-weight: bold;
}

.trail {
    position: fixed;
    pointer-events: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    z-index: 9999;
    animation: fadeOut 0.5s ease-out forwards;
}

@keyframes fadeOut {
    0%   { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.2); }
}

.click-emoji {
    position: fixed;
    pointer-events: none;
    font-size: 28px;
    color: #ffffff;
    animation: emojiPop 0.6s ease-out forwards;
    z-index: 9999;
    font-weight: bold;
    text-shadow: 0 0 3px #000, 0 0 6px #000;
}

@keyframes emojiPop {
    0%   { transform: scale(0.3) translateY(0); opacity: 1; }
    100% { transform: scale(1.2) translateY(-40px); opacity: 0;}
}

.terminal-window {
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  background: #0d0d0d;
  color: #00ffaa;
  padding: 12px;
  border-radius: 8px;
  height: 160px;
  overflow-y: auto;
  border: 1px solid #333;
  box-shadow: inset 0 0 10px rgba(0, 255, 170, 0.1);
}

.terminal-line {
  margin-bottom: 4px;
  white-space: pre-wrap;
}

.terminal-input-line {
  display: flex;
  align-items: center;
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 0.9rem;
  color: #00ffaa;
  margin-top: 6px;
}

.prompt {
  margin-right: 4px;
  user-select: none;
}

.terminal-input {
  flex: 1;
  background: transparent;
  color: inherit;
  border: none;
  border-bottom: 1px solid #00ffaa66;
  outline: none;
  caret-color: #00ffaa;
  font-family: inherit;
  font-size: inherit;
  padding-bottom: 2px;
}