/* =================================================================
   核心变量定义
   ================================================================= */
:root {
    --primary-bg: rgba(15, 23, 42, 0.6);
    --hover-bg: rgba(30, 41, 59, 0.8);
    --text-color: #e2e8f0;
    --accent-cyan: #06b6d4;
    --accent-pink: #f472b6;
    --glass-border: rgba(255, 255, 255, 0.1);
}

@font-face {
    font-family: 'DS-Digital';
    src: url('./DS-DIGI.TTF') format('truetype');
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'LXGW WenKai Screen', 'Segoe UI', sans-serif;
}

body {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    color: var(--text-color);
    background-color: #0f172a;
}

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -2;
    filter: brightness(0.6) blur(2px) contrast(1.1); 
    transition: background-image 0.5s ease-in-out;
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
}

/* =================================================================
   容器布局 (背景保持宽幅)
   ================================================================= */
.container {
    position: relative;
    width: 90%;
    /* 保持 1200px，确保毛玻璃背景足够大气 */
    max-width: 1200px;  
    background: rgba(10, 10, 20, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 30px 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    animation: fadeIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    max-height: 95vh;
    overflow-y: auto;
    scrollbar-width: none;
}
.container::-webkit-scrollbar { display: none; }

.avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.2);
    object-fit: cover;
    transition: all 0.5s ease;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
}
.avatar img:hover {
    transform: rotate(360deg) scale(1.05);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.6);
}

h1 {
    margin: 10px 0 5px;
    font-size: 2em;
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(to right, #fff, var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(6, 182, 212, 0.3);
}

.hitokoto {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 10px;
    font-family: 'JetBrains Mono', 'LXGW WenKai Screen', monospace;
    color: #94a3b8;
}

.status-line {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--accent-cyan);
    opacity: 0.8;
    margin-bottom: 25px;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 0 5px rgba(6, 182, 212, 0.4);
}

.search-box {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 100;
    width: 100%;
    max-width: 850px; 
    margin-left: auto;
    margin-right: auto;
}
.search-engine-selector { position: relative; height: 50px; }
.selected-engine {
    width: 55px; height: 100%; background: rgba(30, 41, 59, 0.9);
    border-radius: 8px 0 0 8px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--accent-cyan); border: 1px solid var(--glass-border); border-right: none; transition: all 0.3s;
}
.selected-engine:hover { background: rgba(51, 65, 85, 0.9); }
.engine-options {
    position: absolute; top: 60px; left: 0; background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--glass-border); backdrop-filter: blur(10px); border-radius: 8px;
    width: 160px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); overflow: hidden;
    opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all 0.2s ease; text-align: left;
}
.engine-options.show { opacity: 1; visibility: visible; transform: translateY(0); }
.option { padding: 12px 16px; display: flex; align-items: center; cursor: pointer; color: #cbd5e1; transition: all 0.2s; font-size: 0.9rem; }
.option i { width: 24px; text-align: center; margin-right: 8px; }
.option:hover { background: rgba(6, 182, 212, 0.2); color: var(--accent-cyan); }
.search-box input {
    height: 50px; padding: 0 20px; border-radius: 0; border: 1px solid var(--glass-border);
    border-left: none; border-right: none; outline: none; width: 55%; background: rgba(30, 41, 59, 0.9);
    font-size: 1rem; color: #fff; font-family: 'JetBrains Mono', monospace; transition: box-shadow 0.3s;
}
.search-box input:focus { box-shadow: inset 0 0 10px rgba(6, 182, 212, 0.2); }
.search-box button {
    height: 50px; width: 70px; border-radius: 0 8px 8px 0; border: 1px solid var(--glass-border);
    border-left: none; background: var(--accent-cyan); color: #0f172a; cursor: pointer; transition: all 0.3s; font-size: 1.2rem;
}
.search-box button:hover { background: #22d3ee; box-shadow: 0 0 15px rgba(6, 182, 212, 0.5); }

/* =================================================================
   卡片布局
   ================================================================= */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px; 
    width: 100%;
    max-width: 850px;  
    margin: 0 auto 30px auto; 
}

/* =================================================================
   流光跑马灯卡片
   ================================================================= */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 140px; 
    background: #07182E;
    border-radius: 16px;
    overflow: hidden; 
    text-decoration: none; 
    color: #e2e8f0;
    transition: transform 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(6, 182, 212, 0.15); }

.card::before {
    content: '';
    position: absolute;
    width: 80px; 
    height: 160%; 
    background-image: linear-gradient(180deg, var(--accent-cyan), var(--accent-pink));
    top: 50%;
    left: 50%;
    animation: rotBGimg 3s linear infinite;
}

@keyframes rotBGimg {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to   { transform: translate(-50%, -50%) rotate(360deg); }
}

.card::after {
    content: '';
    position: absolute;
    background: #07182E; 
    inset: 3px; 
    border-radius: 14px; 
}

.card .icon, .card .info { position: relative; z-index: 5; }
.card .icon {
    font-size: 2em; 
    margin-bottom: 8px;
    color: var(--accent-cyan);
    filter: drop-shadow(0 0 5px rgba(6, 182, 212, 0.4));
    transition: color 0.3s;
}
.card h3 { font-size: 1em; font-weight: 700; margin-bottom: 2px; color: #fff; letter-spacing: 1px; }
.card p { font-size: 0.65em; font-family: 'JetBrains Mono', monospace; color: #94a3b8; text-transform: uppercase; letter-spacing: 1px; }
.card:hover .icon { color: var(--accent-pink); }

/* =================================================================
   GitHub 概览
   ================================================================= */
.github-section {
    background: rgba(15, 23, 42, 0.4);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid var(--glass-border);
    width: 100%;
    max-width: 850px;
    margin: 0 auto 30px auto; 
}
.section-title { font-size: 0.8rem; color: #94a3b8; margin-bottom: 10px; font-family: 'JetBrains Mono', monospace; letter-spacing: 1px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.github-graph-container { width: 100%; overflow: hidden; display: flex; justify-content: center; opacity: 1; }
.gh-chart { max-width: 100%; height: auto; filter: contrast(1.5) saturate(1.5) brightness(1.1); transition: filter 0.3s ease; }
.github-section:hover .gh-chart { filter: contrast(1.6) saturate(1.8) brightness(1.2); }

footer { border-top: 1px solid rgba(255, 255, 255, 0.05); padding-top: 25px; font-size: 0.8rem; color: #64748b; }

#clock {
    font-size: 3em; 
    font-family: 'DS-Digital', monospace, sans-serif; 
    color: var(--accent-cyan);
    text-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
    letter-spacing: 4px;
    margin-bottom: 5px;
}

@keyframes fadeIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

/* =================================================================
   APlayer 赛博朋克战术皮肤
   ================================================================= */
.aplayer {
    background: rgba(5, 8, 16, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    border: none !important;
    border-left: 3px solid var(--accent-cyan) !important;
    border-radius: 4px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), -2px 0 15px rgba(6, 182, 212, 0.2) !important;
    color: #e2e8f0 !important;
    font-family: 'JetBrains Mono', 'DS-Digital', monospace !important;
    margin: 0 !important;
    z-index: 9999;
    max-width: 400px;
}
.aplayer.aplayer-fixed .aplayer-body {
    background: rgba(5, 8, 16, 0.95) !important;
    border: 1px solid rgba(6, 182, 212, 0.3) !important;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.2) !important;
}
.aplayer .aplayer-list { border-color: rgba(255, 255, 255, 0.05) !important; }
.aplayer .aplayer-list ol li { border-top: 1px solid rgba(255,255,255,0.02) !important; transition: all 0.2s ease !important; position: relative; }
.aplayer .aplayer-list ol li:hover { background: linear-gradient(90deg, rgba(6, 182, 212, 0.15), transparent) !important; padding-left: 20px !important; }
.aplayer .aplayer-list ol li:hover::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent-cyan); box-shadow: 0 0 8px var(--accent-cyan); }
.aplayer .aplayer-list ol li.aplayer-list-light { background: rgba(6, 182, 212, 0.05) !important; }
.aplayer .aplayer-list ol li.aplayer-list-light .aplayer-list-title { color: var(--accent-cyan) !important; text-shadow: 0 0 5px rgba(6, 182, 212, 0.6); }
.aplayer .aplayer-list ol li.aplayer-list-light .aplayer-list-author { color: var(--accent-pink) !important; }
.aplayer .aplayer-info { border-bottom: 1px solid rgba(255,255,255,0.05) !important; padding: 15px 10px !important; }
.aplayer .aplayer-info .aplayer-music .aplayer-title { color: #fff !important; font-size: 15px !important; font-weight: bold; }
.aplayer .aplayer-info .aplayer-music .aplayer-author { color: #64748b !important; font-size: 12px !important; text-transform: uppercase; letter-spacing: 1px; }
.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar { height: 4px !important; background: rgba(255,255,255,0.1) !important; border-radius: 2px !important; }
.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-loaded { background: rgba(255,255,255,0.2) !important; height: 4px !important; }
.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played { background: linear-gradient(90deg, var(--accent-cyan), var(--accent-pink)) !important; height: 4px !important; box-shadow: 0 0 10px var(--accent-cyan) !important; border-radius: 2px !important; }
.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played .aplayer-thumb { background: #fff !important; border: none !important; width: 12px !important; height: 12px !important; box-shadow: 0 0 10px #fff, 0 0 20px var(--accent-pink) !important; margin-top: -4px !important; transform: scale(0.8) !important; }
.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played .aplayer-thumb:hover { transform: scale(1.2) !important; }
.aplayer .aplayer-lrc { text-shadow: 0 2px 5px rgba(0,0,0,0.5); margin: 4px 0 !important; }
.aplayer .aplayer-lrc:before, .aplayer .aplayer-lrc:after { background: none !important; }
.aplayer .aplayer-lrc p { color: rgba(255,255,255,0.4) !important; font-size: 12px !important; font-family: 'LXGW WenKai Screen', sans-serif !important; line-height: 16px !important; opacity: 0.6; }
.aplayer .aplayer-lrc p.aplayer-lrc-current { color: var(--accent-cyan) !important; font-size: 14px !important; font-weight: bold; opacity: 1; text-shadow: 0 0 10px rgba(6, 182, 212, 0.6) !important; transform: scale(1.05); transition: all 0.3s ease; }
.aplayer .aplayer-icon { color: rgba(255,255,255,0.6) !important; transition: all 0.3s !important; }
.aplayer .aplayer-icon:hover { color: var(--accent-cyan) !important; filter: drop-shadow(0 0 5px var(--accent-cyan)); }
.aplayer .aplayer-icon-menu { display: block !important; }
.aplayer .aplayer-pic { border: 2px solid rgba(255,255,255,0.1); transition: border-color 0.3s; }
.aplayer .aplayer-pic:hover { border-color: var(--accent-cyan); }

/* =================================================================
   GitHub Star 按钮 - 右上角悬浮
   ================================================================= */
.star-btn-container {
    position: absolute;
    top: 30px;
    right: 30px;
    z-index: 200;
    display: flex;
    justify-content: center;
}

.github-star-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #000;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 500;
    height: 32px;
    padding: 0 12px;
    border-radius: 6px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease-out;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    max-width: 200px;
}

.github-star-btn:hover {
    background-color: rgba(0, 0, 0, 0.9);
    box-shadow: 0 0 0 2px #000, 0 0 0 4px rgba(0, 0, 0, 0.2);
}

.btn-left { display: flex; align-items: center; }
.icon-github-logo { width: 14px; height: 14px; fill: currentColor; margin-right: 4px; }
.btn-right { display: flex; align-items: center; gap: 4px; margin-left: 8px; padding-left: 8px; border-left: 1px solid rgba(255,255,255,0.2); }
.icon-star-mini { width: 14px; height: 14px; color: #6b7280; transition: color 0.3s; }
.github-star-btn:hover .icon-star-mini { color: #fde047; }
.star-count { font-family: monospace; font-weight: bold; }

.shine-effect {
    position: absolute;
    right: 0;
    top: -48px;
    height: 128px;
    width: 32px;
    background-color: #fff;
    opacity: 0.1;
    transform: translateX(48px) rotate(12deg);
    transition: all 1s ease-out;
    pointer-events: none;
    z-index: 10;
}
.github-star-btn:hover .shine-effect { transform: translateX(-500px) rotate(12deg); }

/* =================================================================
   右下角固定图标 (严格引用 Uiverse 原始样式)
   ================================================================= */
.fixed-links {
    position: fixed;
    bottom: 20px;
    right: 25px;
    display: flex;
    gap: 15px; 
    z-index: 1000;
}

/* 按钮基础颜色，确保图标可见 */
.Btn i {
    color: #fff;
    font-size: 1.2rem;
}

/* From Uiverse.io by vinodjangid07 */ 
.Btn {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background-color: transparent;
  position: relative;
  /* overflow: hidden; */
  border-radius: 7px;
  cursor: pointer;
  transition: all .3s;
}

.svgContainer {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  backdrop-filter: blur(4px);
  letter-spacing: 0.8px;
  border-radius: 10px;
  transition: all .3s;
  border: 1px solid rgba(156, 156, 156, 0.466);
}

.BG {
  position: absolute;
  content: "";
  width: 100%;
  height: 100%;
  background: #f09433;
  background: -moz-linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  background: -webkit-linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
  background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f09433', endColorstr='#bc1888',GradientType=1 );
  z-index: -1;
  border-radius: 9px;
  pointer-events: none;
  transition: all .3s;
}

.Btn:hover .BG {
  transform: rotate(35deg);
  transform-origin: bottom;
}

.Btn:hover .svgContainer {
  background-color: rgba(156, 156, 156, 0.466);
}

/* =================================================================
   移动端适配
   ================================================================= */
@media (max-width: 600px) {
    .container { width: 95%; padding: 30px 20px; padding-top: 20px; }
    .cards-grid { grid-template-columns: repeat(2, 1fr); }
    .search-box input { width: 40%; }
    .star-btn-container { position: static; margin-bottom: 20px; width: 100%; }
    .github-star-btn { width: auto; margin: 0 auto; }
}

/* =================================================================
   Preloader (预加载动画)
   ================================================================= */

/* 全屏遮罩容器 */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0f172a; 
    z-index: 9999; 
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* From Uiverse.io by alexruix */ 
.loader {
  width: 80px;
  height: 50px;
  position: relative;
  /* ================= 修改点 ================= */
  transform: scale(2.5); /* 放大 2.5 倍，现在非常明显了 */
  /* ========================================== */
}

.loader-text {
  position: absolute;
  top: 0;
  padding: 0;
  margin: 0;
  color: #C8B6FF;
  animation: text_713 3.5s ease both infinite;
  font-size: .8rem;
  letter-spacing: 1px;
}

.load {
  background-color: #9A79FF;
  border-radius: 50px;
  display: block;
  height: 16px;
  width: 16px;
  bottom: 0;
  position: absolute;
  transform: translateX(64px);
  animation: loading_713 3.5s ease both infinite;
}

.load::before {
  position: absolute;
  content: "";
  width: 100%;
  height: 100%;
  background-color: #D1C2FF;
  border-radius: inherit;
  animation: loading2_713 3.5s ease both infinite;
}

@keyframes text_713 {
  0% { letter-spacing: 1px; transform: translateX(0px); }
  40% { letter-spacing: 2px; transform: translateX(26px); }
  80% { letter-spacing: 1px; transform: translateX(32px); }
  90% { letter-spacing: 2px; transform: translateX(0px); }
  100% { letter-spacing: 1px; transform: translateX(0px); }
}

@keyframes loading_713 {
  0% { width: 16px; transform: translateX(0px); }
  40% { width: 100%; transform: translateX(0px); }
  80% { width: 16px; transform: translateX(64px); }
  90% { width: 100%; transform: translateX(0px); }
  100% { width: 16px; transform: translateX(0px); }
}

@keyframes loading2_713 {
  0% { transform: translateX(0px); width: 16px; }
  40% { transform: translateX(0%); width: 80%; }
  80% { width: 100%; transform: translateX(0px); }
  90% { width: 80%; transform: translateX(15px); }
  100% { transform: translateX(0px); width: 16px; }
}