/* Loading 状态 */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  background: #fff;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e8e8e8;
  border-top-color: #0D75FB;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  font-size: 18px;
  font-weight: 500;
  color: #333;
  margin-top: 24px;
  margin-bottom: 8px;
}

.loading-subtext {
  font-size: 14px;
  color: #666;
  margin-bottom: 16px;
}

.loading-dots {
  display: flex;
  gap: 8px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #0D75FB;
  animation: pulse 1.5s ease-in-out infinite;
}

.dot.delay-1 {
  animation-delay: 0.2s;
}

.dot.delay-2 {
  animation-delay: 0.4s;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.4;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

/* 错误状态 */
.error-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  background: #fff;
}

.error-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #fee2e2;
  color: #ef4444;
  font-size: 24px;
  font-weight: bold;
}

.error-text {
  font-size: 16px;
  font-weight: 500;
  color: #666;
  margin-top: 16px;
  margin-bottom: 16px;
}

.retry-button {
  padding: 10px 24px;
  background-color: #0D75FB;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.retry-button:hover {
  background-color: #0a5fd9;
}

/* 分析视图 */
.analysis-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 20px;
  background: #fff;
}

.analysis-header {
  flex-shrink: 0;
  padding-bottom: 16px;
}

.analysis-title {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.analysis-desc {
  font-size: 14px;
  color: #666;
  margin-bottom: 16px;
}

/* Tab 样式 */
.tab-container {
  display: flex;
  gap: 8px;
  padding: 4px;
  background-color: #f5f5f5;
  border-radius: 8px;
}

.tab-button {
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-button:hover {
  color: #333;
}

.tab-button.active {
  background-color: #0D75FB;
  color: #fff;
}

/* iframe 容器 */
.iframe-container {
  flex: 1;
  width: 100%;
  min-height: 400px;
  height: 85vh;
  overflow: hidden;
  padding: 20px;
}

.iframe-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* 模态框样式 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.fullscreen-overlay {
  background: rgba(0, 0, 0, 0.8);
}

.modal-container {
  background: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 1200px;
  height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.fullscreen {
  width: 100%;
  height: 100%;
  max-width: 100%;
  border-radius: 0;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e8e8e8;
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.close-button {
  background: transparent;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.close-button:hover {
  color: #333;
}

/* 响应式 */
@media screen and (max-width: 768px) {
  .modal-container {
    width: 100%;
    height: 100%;
    max-width: 100%;
    border-radius: 0;
  }

  .analysis-title {
    font-size: 18px;
  }

  .tab-container {
    flex-wrap: wrap;
  }

  .tab-button {
    padding: 6px 12px;
    font-size: 12px;
  }
}