* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Microsoft YaHei', Arial, sans-serif;
}

.container {
  width: 100%;
  height: 100%;
  background: #000000;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#akCanvas {
  position: absolute;
  top: 0;
  left: 0;
  cursor: url('../images/mouse.png') 0 0, pointer;
  z-index: 2;
}

/* 背景粒子 Canvas */
#bgParticleCanvas {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  pointer-events: none;
}

/* 网格背景 */
.grid-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(0, 212, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.05) 1px, transparent 1px);
  background-size: 100px 100px;
  z-index: 0;
}

/* 左侧垂直菜单 */
.left-menu {
  position: fixed;
  left: 75px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 55px;
}

.menu-item {
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  width: 350px;
}

.menu-cn {
  display: block;
  color: #ffffff;
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 5px;
  letter-spacing: 2px;
  transition: all 0.3s ease;
}

.menu-en {
  display: block;
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
  font-weight: normal;
  letter-spacing: 3px;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.menu-item:hover .menu-cn {
  color: #00d4ff;
  transform: translateX(10px);
}

.menu-item:hover .menu-en {
  color: #00d4ff;
  transform: translateX(10px);
}

.menu-item:hover {
  border-bottom-color: #00d4ff;
}

/* 右上角标题图片 */
.page-indicator {
  position: fixed;
  top: 50px;
  right: 80px;
  z-index: 100;
}

.title-img {
  max-width: 300px;
  height: auto;
  filter: drop-shadow(0 0 15px rgba(0, 212, 255, 0.4));
}

/* 底部大标题 */
.bottom-title {
  position: fixed;
  bottom: 80px;
  left: 75px;
  font-size: 160px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.03);
  letter-spacing: 20px;
  z-index: 1;
  pointer-events: none;
}



/* 今日长度面板 */
.length-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-30%, -50%);
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  pointer-events: none;
  text-align: left;
}

.length-panel.active {
  opacity: 1;
  visibility: visible;
}

.length-label {
  color: rgba(255, 255, 255, 0.5);
  font-size: 22px;
  font-weight: normal;
  letter-spacing: 4px;
  margin-bottom: 20px;
  text-transform: full-width;
}

.length-value {
  color: #00d4ff;
  font-size: 96px;
  font-weight: 900;
  letter-spacing: 4px;
  line-height: 1;
  text-shadow: 0 0 40px rgba(0, 212, 255, 0.5), 0 0 80px rgba(0, 212, 255, 0.2);
  font-variant-numeric: tabular-nums;
}

.length-date {
  margin-top: 24px;
  color: rgba(0, 212, 255, 0.3);
  font-size: 12px;
  letter-spacing: 6px;
  font-family: 'Consolas', monospace;
  text-transform: uppercase;
}

/* 链接列表面板 */
.links-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-30%, -50%);
  z-index: 50;
  width: 800px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  pointer-events: none;
}

.links-panel.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.links-header {
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(0, 212, 255, 0.3);
  position: relative;
  flex-shrink: 0;
}

.links-title-cn {
  display: block;
  color: #ffffff;
  font-size: 32px;
  font-weight: bold;
  letter-spacing: 4px;
  margin-bottom: 6px;
}

.links-title-en {
  display: block;
  color: rgba(0, 212, 255, 0.5);
  font-size: 13px;
  letter-spacing: 6px;
  text-transform: uppercase;
}

.links-header-line {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 80px;
  height: 2px;
  background: #00d4ff;
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.6);
}

.links-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.links-list::-webkit-scrollbar {
  width: 4px;
}

.links-list::-webkit-scrollbar-track {
  background: transparent;
}

.links-list::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.3);
}

.link-item {
  display: flex;
  align-items: center;
  padding: 16px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  cursor: pointer;
}

.link-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, rgba(0, 212, 255, 0.08), transparent);
  transition: width 0.3s ease;
}

.link-item:hover::before {
  width: 100%;
}

.link-item:hover {
  border-bottom-color: rgba(0, 212, 255, 0.2);
}

.link-index {
  color: rgba(0, 212, 255, 0.4);
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 2px;
  width: 40px;
  flex-shrink: 0;
  font-family: 'Consolas', monospace;
  transition: color 0.3s ease;
}

.link-item:hover .link-index {
  color: #00d4ff;
}

.link-name {
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  letter-spacing: 1px;
  flex: 1;
  transition: all 0.3s ease;
}

.link-item:hover .link-name {
  color: #ffffff;
  transform: translateX(8px);
}

.link-arrow {
  color: rgba(0, 212, 255, 0);
  font-size: 16px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.link-item:hover .link-arrow {
  color: #00d4ff;
  transform: translateX(4px);
}

/* 管理按钮 */
.links-admin-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.3);
  width: 32px;
  height: 32px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.links-admin-btn:hover {
  border-color: #00d4ff;
  color: #00d4ff;
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.3);
}

/* 管理面板遮罩 */
.admin-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.admin-overlay.active {
  display: flex;
}

.admin-panel {
  width: 520px;
  max-height: 80vh;
  background: #0a0a0a;
  border: 1px solid rgba(0, 212, 255, 0.2);
  padding: 40px;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-panel::-webkit-scrollbar {
  width: 4px;
}

.admin-panel::-webkit-scrollbar-track {
  background: transparent;
}

.admin-panel::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.3);
}

.admin-title {
  color: #ffffff;
  font-size: 24px;
  font-weight: bold;
  letter-spacing: 3px;
  margin-bottom: 4px;
}

.admin-subtitle {
  color: rgba(0, 212, 255, 0.4);
  font-size: 11px;
  letter-spacing: 4px;
  margin-bottom: 30px;
}

.admin-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 12px 16px;
  font-size: 14px;
  font-family: 'Microsoft YaHei', Arial, sans-serif;
  margin-bottom: 12px;
  transition: border-color 0.3s ease;
  outline: none;
}

.admin-input:focus {
  border-color: #00d4ff;
}

.admin-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.admin-btn {
  padding: 10px 24px;
  font-size: 13px;
  font-family: 'Microsoft YaHei', Arial, sans-serif;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.admin-btn-primary {
  background: rgba(0, 212, 255, 0.15);
  color: #00d4ff;
  border: 1px solid rgba(0, 212, 255, 0.4);
}

.admin-btn-primary:hover {
  background: rgba(0, 212, 255, 0.3);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.3);
}

.admin-btn-cancel {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-btn-cancel:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

.admin-btn-danger {
  background: rgba(255, 60, 60, 0.1);
  color: rgba(255, 100, 100, 0.8);
  border: 1px solid rgba(255, 60, 60, 0.3);
  padding: 6px 12px;
  font-size: 12px;
}

.admin-btn-danger:hover {
  background: rgba(255, 60, 60, 0.25);
  color: #ff6464;
}

.admin-btn-move {
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 10px;
  font-size: 13px;
  line-height: 1;
}

.admin-btn-move:hover:not(:disabled) {
  color: #00d4ff;
  border-color: rgba(0, 212, 255, 0.4);
  background: rgba(0, 212, 255, 0.1);
}

.admin-btn-move:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

.admin-auth-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.admin-error {
  color: #ff6464;
  font-size: 13px;
  margin-top: 12px;
  min-height: 20px;
}

/* 管理列表 */
.admin-list {
  margin-bottom: 24px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  max-height: 45vh;
}

.admin-list::-webkit-scrollbar {
  width: 4px;
}

.admin-list::-webkit-scrollbar-track {
  background: transparent;
}

.admin-list::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.3);
}

.admin-link-row {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  gap: 12px;
}

.admin-link-index {
  color: rgba(0, 212, 255, 0.4);
  font-size: 11px;
  font-family: 'Consolas', monospace;
  width: 28px;
  flex-shrink: 0;
}

.admin-link-info {
  flex: 1;
  min-width: 0;
}

.admin-link-name {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-link-url {
  color: rgba(0, 212, 255, 0.35);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-link-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.admin-add-form {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.admin-add-form .admin-input {
  flex: 1;
  min-width: 120px;
  margin-bottom: 0;
}

.admin-add-form .admin-btn {
  flex-shrink: 0;
  align-self: stretch;
}

.admin-footer-actions {
  display: flex;
  justify-content: flex-end;
}

.scan-line {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #00d4ff, transparent);
  animation: scan 4s linear infinite;
  opacity: 0.2;
  z-index: 10;
}

@keyframes scan {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(100vh);
  }
}