* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow-x: hidden;
}

/* 动态渐变背景 */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 25%, #0ea5e9 50%, #06b6d4 75%, #00f2fe 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  z-index: -2;
}

/* 光晕效果 */
body::after {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
  z-index: -1;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.container {
  width: 100%;
  max-width: 900px;
  text-align: center;
}

/* 专注模式 - 搜索框居中显示 */
body.focus-mode .container {
  transform: translateY(-8vh);
}

/* 玻璃态时间显示 */
.time {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #ffffff;
  text-shadow: 0 4px 20px rgba(0,0,0,0.3);
  letter-spacing: 0.05em;
  animation: float 3s ease-in-out infinite;
}

.date {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 32px;
  font-weight: 500;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* 玻璃态搜索框 */
.search {
  margin-bottom: 48px;
}

.search-wrapper {
  position: relative;
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  padding: 4px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.search-wrapper:hover {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.search-wrapper:focus-within {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

.search input {
  width: 100%;
  padding: 16px 24px;
  font-size: 1.1rem;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: #ffffff;
  outline: none;
  font-weight: 500;
}

.search input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

/* 分类标签 */
.categories {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
  opacity: 1;
  max-height: 500px;
  overflow: hidden;
  transition: opacity 0.4s ease, max-height 0.6s ease, margin 0.6s ease;
}

/* 专注模式 - 隐藏分类标签 */
body.focus-mode .categories {
  opacity: 0;
  max-height: 0;
  margin-bottom: 0;
  pointer-events: none;
}

.category-tag {
  padding: 8px 20px;
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 24px;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.category-tag:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.category-tag.active {
  background: rgba(255, 255, 255, 0.35);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

/* 链接分组 */
.links-section {
  margin-bottom: 32px;
  opacity: 1;
  max-height: 2000px;
  overflow: hidden;
  transition: opacity 0.5s ease 0.1s, max-height 0.6s ease, margin 0.6s ease;
}

/* 专注模式 - 隐藏快捷方式 */
body.focus-mode .links-section {
  opacity: 0;
  max-height: 0;
  margin-bottom: 0;
  pointer-events: none;
}

.section-title {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: left;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 24px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 2px;
}

/* 链接网格 */
.links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 20px;
  max-width: 100%;
}

/* 玻璃态卡片 */
.link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  text-decoration: none;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.link:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 16px 48px rgba(0,0,0,0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

.link:hover::before {
  opacity: 1;
}

.link-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.link-text {
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* 隐藏类 */
.hidden {
  display: none;
}



/* 响应式设计 */
@media (max-width: 768px) {
  .time {
    font-size: 3rem;
  }
  
  .links {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
  }
  
  .link {
    padding: 20px 12px;
  }
  
  .link-icon {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  .time {
    font-size: 2.5rem;
  }
  
  .date {
    font-size: 1rem;
  }
  
  .links {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .categories {
    gap: 8px;
  }
  
  .category-tag {
    padding: 6px 16px;
    font-size: 0.85rem;
  }
}

/* 减少动画（可访问性） */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
