/* 浏览器窗口容器 */
.browser-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80vw;
  height: 70vh;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  display: none;
  transition: all 0.3s ease;
  /* 浏览器兼容性适配 */
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* 浏览器内核适配 */
.safari .browser-container {
  background: rgba(255, 255, 255, 0.98);
}

.ie .browser-container {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* 控制栏样式 */
.browser-controls {
  display: flex;
  justify-content: flex-end;
  padding: 12px;
  background: #f5f5f5;
  border-radius: 12px 12px 0 0;
}

/* 控制按钮通用样式 */
.control-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin-left: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.control-btn:hover {
  transform: scale(1.1);
}

/* 具体按钮颜色 */
.minimize-btn { background: #ffc107; }
.maximize-btn { background: #28a745; }
.close-btn { background: #dc3545; }

/* iframe容器 */
.browser-frame {
  width: 100%;
  height: calc(100% - 56px);
  border: none;
  background: white;
  /* 滚动条样式适配 */
  scrollbar-width: thin;
  scrollbar-color: #888 transparent;
}

/* 滚动条样式 - Chrome/Safari */
.browser-frame::-webkit-scrollbar {
  width: 8px;
}

.browser-frame::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

/* 错误回退样式 */
.browser-fallback {
  padding: 20px;
  text-align: center;
}

.proxy-retry {
  padding: 8px 16px;
  background: #2196F3;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin: 10px;
}

.external-open {
  color: #2196F3;
  text-decoration: underline;
}
  height: calc(100% - 56px);
  border: none;
  border-radius: 0 0 12px 12px;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .browser-container {
    width: 95vw;
    height: 80vh;
  }
  
  .control-btn {
    width: 28px;
    height: 28px;
  }
}

/* 窗口状态 */
.minimized {
  transform: translate(-50%, calc(100vh - 80px));
  height: 40px !important;
}

.maximized {
  width: 95vw !important;
  height: 95vh !important;
}