* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: #f5f7fa;
  color: #1d1d1f;
  padding: 20px;
  min-height: 100vh;
  position: relative;
  padding-bottom: 60px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

header {
  padding: 24px 20px;
  border-bottom: 1px solid #f0f0f0;
  text-align: center;
}

h1 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #1d1d1f;
}

.update-time {
  font-size: 13px;
  color: #6e6e73;
}

.search-container {
  display: flex;
  gap: 12px;
  padding: 15px 20px;
  border-bottom: 1px solid #f0f0f0;
}

#usernameInput {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #d2d2d7;
  border-radius: 12px;
  font-size: 16px;
  transition: all 0.2s;
  background-color: #f5f5f7;
}

#usernameInput:focus {
  outline: none;
  border-color: #0071e3;
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

button {
  padding: 12px 20px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

#searchBtn {
  background-color: #0071e3;
  color: white;
}

#searchBtn:hover {
  background-color: #0066cc;
}

#clearBtn {
  background-color: #f5f5f7;
  color: #1d1d1f;
}

#clearBtn:hover {
  background-color: #eaeaea;
}

.stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 12px 20px;
  font-size: 14px;
  color: #6e6e73;
  background-color: #f9f9f9;
  border-bottom: 1px solid #f0f0f0;
}

.result-wrapper {
  padding: 20px;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  color: #6e6e73;
  font-size: 15px;
  margin-bottom: 10px;
  padding: 5px 0;
  border-bottom: 1px solid #f0f0f0;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 5px;
}

.comment-item {
  padding: 14px;
  border-radius: 14px;
  background-color: #f9f9f9;
  transition: transform 0.2s;
}

.comment-item:hover {
  transform: translateY(-2px);
}

.comment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.username {
  font-weight: 600;
  color: #1d1d1f;
}

.time {
  font-size: 13px;
  color: #6e6e73;
}

.comment-content {
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 12px;
  color: #1d1d1f;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 8px;
}

.comment-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: #6e6e73;
  align-items: center;
}

.video-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  flex-wrap: wrap;
}

.video-label {
  color: #1d1d1f;
  font-weight: 500;
}

.video-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
}

.bv-link {
  color: #0071e3;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.bv-link:hover {
  color: #0066cc;
  text-decoration: underline;
}

.like {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 底部固定版权 */
.copyright {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 20px;
  background-color: #ffffff;
  border-top: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #6e6e73;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.03);
  z-index: 999;
}

/* 链接容器 - 确保两个链接紧挨着 */
.footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-link {
  color: #0071e3;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-link:hover {
  color: #0066cc;
  text-decoration: underline;
}

/* 链接分隔符 */
.link-divider {
  color: #d2d2d7;
  font-size: 14px;
}

/* 频率限制气泡提示 */
.limit-toast {
  position: fixed;
  bottom: 60px;
  right: -300px;
  background-color: #1d1d1f;
  color: white;
  padding: 12px 20px;
  border-radius: 18px;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 0;
}

.limit-toast.show {
  right: 20px;
  bottom: 70px;
  opacity: 1;
}

/* 移动端适配 */
@media (max-width: 600px) {
  .container {
    border-radius: 16px;
  }
  
  .search-container {
    gap: 10px;
    padding: 12px 15px;
  }
  
  button {
    padding: 12px 16px;
    font-size: 15px;
  }
  
  .comment-header {
    flex-direction: column;
    gap: 4px;
  }
  
  .comment-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  
  .video-name {
    max-width: 180px;
  }
  
  .copyright {
    flex-direction: column;
    gap: 8px;
    padding: 10px 15px;
    font-size: 12px;
  }
  
  .footer-links {
    gap: 6px;
  }
  
  .limit-toast {
    max-width: 80%;
    padding: 10px 16px;
    font-size: 13px;
    bottom: 50px;
  }
  
  .limit-toast.show {
    right: 15px;
    bottom: 60px;
  }
}