:root {
  --primary-color: #6e48aa;
  --secondary-color: #9d50bb;
  --accent-color: #4776e6;
  --text-color: #333;
  --bg-color: #f8f9fa;
  --card-bg: #fff;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --border-radius: 12px;
}

/* 基础重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  min-height: 100vh;
}

/* 响应式布局 */
.wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  position: relative;
}

.login_panel {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.login_panel .button {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.login_panel .button:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 2px 8px rgba(110, 72, 170, 0.3);
}

@media (max-width: 768px) {
  .login_panel {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
  }
  
  .login_panel .button {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
}

.logo p {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

/* 视频网格布局 */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.video-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.video-card:hover {
  transform: translateY(-5px);
}

.video-thumbnail {
  position: relative;
  padding-top: 56.25%; /* 16:9 宽高比 */
  overflow: hidden;
}

.video-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.video-thumbnail:hover img {
  transform: scale(1.05);
}

.video-hover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-card:hover .video-hover {
  opacity: 1;
}

.video-hover i {
  font-size: 3rem;
  color: rgba(255,255,255,0.9);
  text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.video-quality {
  background: var(--accent-color);
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  margin-left: 0.5rem;
}

.video-meta i {
  margin-right: 0.3rem;
  color: var(--primary-color);
}

.glow-button {
  position: relative;
  overflow: hidden;
}

.glow-button:hover {
  box-shadow: 0 0 15px var(--primary-color);
}

.tech-badge {
  background: linear-gradient(to right, #4776e6, #8e54e9);
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  margin-left: 0.5rem;
}

.video-time {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

.video-info {
  padding: 1rem;
}

.video-title {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-meta {
  font-size: 0.85rem;
  color: #666;
}

/* 登录模态框 */
.modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.modal-content {
  position: relative;
  background-color: var(--card-bg);
  margin: 10% auto;
  padding: 2rem;
  width: 90%;
  max-width: 400px;
  border-radius: var(--border-radius);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
}

#login_box {
  text-align: center;
}

#login_box img {
  width: 80px;
  margin-bottom: 1rem;
}

#login_box h2 {
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.input-group {
  margin-bottom: 1rem;
  text-align: left;
}

.input-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.input-group input {
  width: 100%;
  height: 40px;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.code-wrapper {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.code-wrapper input {
  flex: 1;
  min-width: 0;
}

.code-wrapper button {
  flex-shrink: 0;
  width: 120px;
}

@media (max-width: 480px) {
  .code-wrapper {
    flex-direction: row;
    gap: 8px;
  }
  .code-wrapper input {
    width: 60%;
  }
  .code-wrapper button {
    width: 40%;
    padding: 0.5rem;
    font-size: 0.9rem;
  }
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.button {
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  color: white;
  border: none;
  /*padding: 0.75rem 1.5rem;*/
  width: 120px;
  height: 40px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#gg {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: #666;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
  }

  .modal-content {
    margin: 20% auto;
    width: 95%;
  }

  .header {
    padding: 0.5rem 0;
  }

  .logo p {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  :root {
    --border-radius: 8px;
  }

  .wrapper {
    padding: 0.5rem;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    padding: 1.5rem;
  }
}

/* 科技感标题样式 */
.tech-header {
  text-align: center;
  margin: 2rem 0;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  position: relative;
  overflow: hidden;
}

.tech-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: var(--border-radius);
  padding: 2px;
  background: linear-gradient(
    45deg,
    #6e48aa,
    #9d50bb,
    #4776e6,
    #6e48aa
  );
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: border-run 3s linear infinite;
  background-size: 200% 200%;
}

@keyframes border-run {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.tech-title {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.tech-word {
  font-weight: 700;
  background: linear-gradient(90deg, #6e48aa, #9d50bb);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 10px rgba(110, 72, 170, 0.3);
  animation: glow 2s ease-in-out infinite alternate;
}

.tech-badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: linear-gradient(135deg, #6e48aa, #4776b6);
  color: white;
  border-radius: 20px;
  font-size: 1.2rem;
  font-weight: bold;
  box-shadow: 0 0 15px rgba(110, 72, 170, 0.5);
  transform: translateY(-5px);
}

.tech-slogan {
  font-size: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.tech-highlight {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(110, 72, 170, 0.3);
  transition: all 0.3s ease;
}

.tech-highlight:hover {
  background: rgba(110, 72, 170, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(110, 72, 170, 0.2);
}

.tech-arrow {
  color: #9d50bb;
  font-weight: bold;
  animation: bounce 2s infinite;
}

@keyframes glow {
  from {
    text-shadow: 0 0 10px rgba(110, 72, 170, 0.3);
  }
  to {
    text-shadow: 0 0 20px rgba(157, 80, 187, 0.6);
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(5px);
  }
}

/* 响应式调整 */
@media (max-width: 768px) {
  .tech-title {
    font-size: 2rem;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .tech-slogan {
    font-size: 1.2rem;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .tech-badge {
    font-size: 1rem;
    transform: none;
  }
}

@media (max-width: 480px) {
  .tech-header {
    padding: 1rem;
    margin: 1rem 0;
  }
  
  .tech-title {
    font-size: 1.8rem;
  }
  
  .tech-slogan {
    font-size: 1rem;
  }
  
  .tech-highlight {
    padding: 0.3rem 0.6rem;
  }
}