/* 通话界面主容器 */
.call-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background-color: #1a1a1a;
  color: white;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* 通话状态显示 */
.call-status {
  padding: 20px;
  text-align: center;
  background-color: #2a2a2a;
  border-bottom: 1px solid #3a3a3a;
}

.call-status h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
}

#callDuration {
  margin: 10px 0 0;
  font-size: 16px;
  opacity: 0.7;
}

/* 视频容器 */
.video-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #000;
  position: relative;
  min-height: 300px;
  width: 100%;
  overflow: hidden;
}

/* 远程视频 */
.remote-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

/* 本地视频（小窗口） */
.local-video {
  position: absolute;
  bottom: 80px;
  right: 20px;
  width: 120px;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  z-index: 10;
  background-color: #333;
}

/* 语音通话容器 */
.audio-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #2a2a2a;
  position: relative;
  display: none;
}

/* 音频通话头像 */
.audio-avatar {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background-color: #3a3a3a;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  overflow: hidden;
  border: 4px solid #4a4a4a;
}

.audio-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.audio-container h3 {
  font-size: 24px;
  margin: 10px 0;
}

/* 通话请求界面 */
.call-request {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: rgba(42, 42, 42, 0.95);
  display: none;
}

.call-request h2 {
  font-size: 28px;
  margin-bottom: 40px;
}

.call-request-controls {
  display: flex;
  gap: 40px;
}

.accept-button, .reject-button {
  padding: 20px 40px;
  border: none;
  border-radius: 50px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.accept-button:hover, .reject-button:hover {
  transform: scale(1.05);
}

.accept-button {
  background-color: #4CAF50;
  color: white;
}

.reject-button {
  background-color: #f44336;
  color: white;
}

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

/* 通话中界面 */
.call-in-progress {
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  text-align: center;
  display: none;
}

.call-in-progress h2 {
  font-size: 18px;
  opacity: 0.8;
  margin: 0;
}

.call-in-progress h3 {
  font-size: 24px;
  margin: 5px 0 0;
}

/* 通话控制界面 */
.call-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background-color: #2a2a2a;
  gap: 20px;
  border-top: 1px solid #3a3a3a;
}

.control-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border: none;
  border-radius: 50%;
  background-color: #3a3a3a;
  color: white;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
  padding: 10px;
}

.control-button:hover {
  background-color: #4a4a4a;
  transform: scale(1.05);
}

.control-button.active {
  background-color: #5a5a5a;
}

.control-button.end-button {
  background-color: #f44336;
}

.control-button.end-button:hover {
  background-color: #d32f2f;
}

.button-icon {
  font-size: 24px;
  margin-bottom: 5px;
}

.button-text {
  font-size: 12px;
}

/* 错误提示 */
.error-message {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #f44336;
  color: white;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 16px;
  z-index: 100;
  display: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .call-status h2 {
    font-size: 20px;
  }
  
  .local-video {
    width: 80px;
    height: 110px;
    bottom: 70px;
    right: 15px;
  }
  
  .audio-avatar {
    width: 150px;
    height: 150px;
  }
  
  .call-controls {
    padding: 15px;
    gap: 15px;
  }
  
  .control-button {
    width: 50px;
    height: 50px;
  }
  
  .button-icon {
    font-size: 20px;
  }
  
  .button-text {
    font-size: 10px;
  }
}