* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #0a0a0a;
  color: #eee;
  overflow-x: hidden;
}

/* ===== 密码验证页 ===== */
.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
}

.auth-container {
  width: 100%;
  max-width: 380px;
  padding: 20px;
}

.auth-card {
  background: #1a1a2e;
  border-radius: 16px;
  padding: 40px 30px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  border: 1px solid #2a2a3e;
}

.auth-icon {
  margin-bottom: 12px;
}
.auth-icon img {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  object-fit: cover;
}

.auth-title {
  font-size: 24px;
  margin-bottom: 6px;
  font-weight: 700;
}

.auth-desc {
  font-size: 14px;
  color: #888;
  margin-bottom: 24px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #333;
  border-radius: 8px;
  background: #0f0f1a;
  color: #eee;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s;
}
.auth-input:focus {
  border-color: #e74c3c;
}

.auth-btn {
  width: 100%;
  padding: 12px;
  background: #e74c3c;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.auth-btn:hover {
  background: #c0392b;
}
.auth-btn:active {
  transform: scale(0.98);
}

.auth-error {
  margin-top: 12px;
  color: #e74c3c;
  font-size: 14px;
  min-height: 20px;
}

/* ===== 直播间页 ===== */
.room-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* 顶栏 */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #111;
  border-bottom: 1px solid #222;
  flex-shrink: 0;
}

.top-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-badge {
  background: #e74c3c;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.room-title {
  font-size: 16px;
  font-weight: 600;
}

.viewer-count {
  font-size: 14px;
  color: #999;
}

/* 主内容 */
.main-content {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* 视频区 */
.video-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #000;
  min-width: 0;
}

.video-wrapper {
  position: relative;
  flex: 1;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  max-height: 55vh;
  overflow: hidden;
}

.video-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.video-player:-webkit-full-screen {
  object-fit: contain;
  width: 100%;
  height: 100%;
}
.video-player:fullscreen {
  object-fit: contain;
  width: 100%;
  height: 100%;
}
.video-wrapper:-webkit-full-screen {
  width: 100%;
  height: 100%;
  background: #000;
}
.video-wrapper:-webkit-full-screen .video-player {
  width: 100%;
  height: 100%;
}
.video-wrapper:fullscreen {
  width: 100%;
  height: 100%;
  background: #000;
}
.video-wrapper:fullscreen .video-player {
  width: 100%;
  height: 100%;
}

.video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  pointer-events: none;
  transition: opacity 0.3s;
}

.overlay-status {
  font-size: 16px;
  color: #ccc;
  text-align: center;
  padding: 16px;
}

.big-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.6);
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 10;
}
.big-play-btn:hover {
  background: rgba(231,76,60,0.7);
  border-color: #e74c3c;
}
.big-play-btn.visible {
  display: flex;
}

/* 控制栏 */
.controls {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: #181818;
  gap: 10px;
  flex-shrink: 0;
}

.ctrl-btn {
  background: none;
  border: none;
  color: #ccc;
  font-size: 22px;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 6px;
  transition: all 0.15s;
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ctrl-btn:hover {
  color: #fff;
  background: #333;
}

.volume-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.volume-slider {
  width: 100px;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: #444;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}
.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e74c3c;
  cursor: pointer;
}
.volume-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e74c3c;
  border: none;
  cursor: pointer;
}

/* 侧边栏 */
.aside-section {
  width: 260px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: #111;
  border-left: 1px solid #222;
}

/* 点赞区 */
.like-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  border-bottom: 1px solid #222;
}

.like-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid #333;
  background: #1a1a2e;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.like-btn:hover {
  border-color: #e74c3c;
  transform: scale(1.05);
}
.like-btn:active {
  transform: scale(0.9);
}

.like-icon {
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.like-icon svg {
  width: 36px;
  height: 36px;
  display: block;
}
.like-btn.liked .like-icon {
  animation: like-anim 0.4s ease;
}

@keyframes like-anim {
  0% { transform: scale(1); }
  25% { transform: scale(1.3); }
  50% { transform: scale(0.95); }
  75% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.like-count {
  font-size: 28px;
  font-weight: 700;
  margin-top: 12px;
  color: #e74c3c;
}

.like-label {
  font-size: 13px;
  color: #888;
  margin-top: 4px;
}

/* 房间信息 */
.room-info {
  padding: 16px 20px;
  border-bottom: 1px solid #222;
}

.info-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
}

.info-label {
  color: #888;
}

.info-value {
  color: #ddd;
}

/* ===== 响应式 ===== */
@media (max-width: 767px) {
  .main-content {
    flex-direction: column;
  }

  .video-section {
    flex: none;
  }

  .video-wrapper {
    min-height: 200px;
    max-height: 40vh;
  }

  .aside-section {
    width: 100%;
    border-left: none;
    border-top: 1px solid #222;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .like-area {
    flex: 1;
    min-width: 120px;
    padding: 20px;
    border-bottom: none;
    border-right: 1px solid #222;
  }

  .like-btn {
    width: 60px;
    height: 60px;
  }

  .like-icon {
    font-size: 28px;
  }

  .like-count {
    font-size: 20px;
  }

  .room-info {
    flex: 1;
    min-width: 120px;
    border-bottom: none;
    padding: 16px;
  }

  .volume-slider {
    width: 60px;
  }
}

@media (max-width: 480px) {
  .video-wrapper {
    min-height: 200px;
  }

  .aside-section {
    flex-direction: column;
  }

  .like-area {
    border-right: none;
    border-bottom: 1px solid #222;
    flex-direction: row;
    gap: 16px;
    padding: 16px 20px;
  }

  .like-btn {
    width: 50px;
    height: 50px;
  }

  .like-icon {
    font-size: 24px;
  }

  .like-count {
    margin-top: 0;
    font-size: 18px;
  }

  .like-label {
    display: none;
  }

  .room-info {
    width: 100%;
  }

  .controls {
    padding: 10px 12px;
    gap: 8px;
  }

  .ctrl-btn {
    font-size: 20px;
    padding: 8px 10px;
    min-width: 40px;
    min-height: 40px;
  }

  .volume-slider {
    width: 70px;
  }

  .volume-slider::-webkit-slider-thumb {
    width: 18px;
    height: 18px;
  }
  .volume-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
  }
}
