/* 页面布局样式 - 统一的页面和卡片样式 */

/* 页面容器样式 */
.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* 统一的卡片样式 */
.content-panel {
  background: rgb(var(--v-theme-surface));
  border: 1px solid rgba(var(--v-border-color), var(--v-border-opacity));
  border-radius: 16px !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* 页面头部样式 */
.page-header {
  padding: 0;
}

.page-header .header-content {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 1rem;
  padding: 1.5rem 2rem;
}

.page-header .header-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.page-header .header-info .v-icon {
  flex-shrink: 0;
}

.page-header .header-info h2 {
  font-size: 1.8rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--v-theme-on-surface) !important;
}

.page-header .header-info p {
  margin: 0;
  opacity: 0.9;
  color: var(--v-theme-on-surface) !important;
}

.page-header .header-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* 表单面板样式 */
.panel-content {
  padding: 1.5rem;
}

/* 辅助文本样式 */
.help-text {
  font-size: 0.875rem;
  color: rgba(var(--v-theme-on-surface), 0.6);
  margin-top: 0.25rem;
}

/* 按钮样式 */
.action-btn {
  text-transform: none;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.submit-btn {
  min-width: 200px;
  border-radius: 8px;
}

/* 服务面板特定样式 */
.service-panel {
  overflow: hidden;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background: rgba(var(--v-theme-surface-variant), 0.3);
  border-bottom: 1px solid rgba(var(--v-border-color), var(--v-border-opacity));
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.panel-title h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--v-theme-on-surface);
}

.panel-controls {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.service-status-content {
  padding: 2rem;
}

/* 状态信息样式 */
.status-details {
  margin-bottom: 0;
}

.status-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.info-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(var(--v-theme-on-surface), 0.7);
}

.info-value {
  font-size: 0.9rem;
  color: var(--v-theme-on-surface);
}

/* 结果卡片样式 */
.result-card {
  margin-top: 1.5rem;
}

.result-card .result-header {
  display: flex;
  align-items: center;
  font-size: 1.25rem;
  font-weight: 600;
}

.result-card .result-list {
  background: transparent;
}

.result-card .models-section {
  background: rgba(var(--v-theme-surface-variant), 0.3);
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
}

.result-card .models-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* 临时分组统计样式 */
.temp-group-stats {
  margin-bottom: 0;
}

.temp-group-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stats-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stats-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--v-theme-warning);
}

.stats-label {
  font-weight: 600;
  color: var(--v-theme-on-surface);
}

.instance-stats {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.temp-groups-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.temp-group-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: rgba(var(--v-theme-on-surface), 0.7);
}

.group-name {
  font-weight: 500;
  color: var(--v-theme-on-surface);
}

.group-id {
  color: rgba(var(--v-theme-on-surface), 0.5);
  font-size: 0.8rem;
}

/* 确保大屏幕上的水平布局 */
@media (min-width: 769px) {
  .page-header .header-content {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
  }
}

/* Vuetify 工具类补充 - 如果原生工具类不工作 */
.mb-1 { margin-bottom: 4px !important; }
.mb-2 { margin-bottom: 8px !important; }
.mb-3 { margin-bottom: 12px !important; }
.mb-4 { margin-bottom: 16px !important; }
.mb-5 { margin-bottom: 20px !important; }
.mb-6 { margin-bottom: 24px !important; }
.mb-7 { margin-bottom: 28px !important; }
.mb-8 { margin-bottom: 32px !important; }

.mt-1 { margin-top: 4px !important; }
.mt-2 { margin-top: 8px !important; }
.mt-3 { margin-top: 12px !important; }
.mt-4 { margin-top: 16px !important; }
.mt-5 { margin-top: 20px !important; }
.mt-6 { margin-top: 24px !important; }
.mt-7 { margin-top: 28px !important; }
.mt-8 { margin-top: 32px !important; }

.d-flex { display: flex !important; }
.justify-center { justify-content: center !important; }
.align-center { align-items: center !important; }

/* 响应式设计 */
@media (max-width: 768px) {
  .page-container {
    padding: 1rem;
  }

  .page-header {
    padding: 1.5rem;
  }

  .page-header .header-content {
    flex-direction: row;
    align-items: center;
  }

  .panel-content,
  .service-status-content {
    padding: 1.5rem;
  }

  .panel-header {
    padding: 1rem 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .status-info {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .page-header .header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .page-header .header-actions,
  .panel-controls {
    width: 100%;
    justify-content: center;
  }

  .info-item {
    text-align: center;
  }
}

/* 暗色主题专用样式 */
@media (prefers-color-scheme: dark) {
  /* 页面容器和内容区域 */
  .page-container {
    background: transparent;
  }

  .content-wrapper {
    background: transparent;
  }

  /* 卡片和面板样式 */
  .content-panel {
    background: rgba(30, 41, 59, 0.8) !important;
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
  }

  /* 页面头部样式 */
  .page-header {
    background: rgba(30, 41, 59, 0.8) !important;
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
  }

  .page-header .header-content {
    background: transparent;
  }

  .page-header .header-info h2 {
    color: #f1f5f9 !important;
  }

  .page-header .header-info p {
    color: rgba(241, 245, 249, 0.9) !important;
  }

  /* 面板头部样式 */
  .panel-header {
    background: rgba(51, 65, 85, 0.6) !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2) !important;
  }

  .panel-title h3 {
    color: #f1f5f9 !important;
  }

  /* 面板内容样式 */
  .panel-content,
  .service-status-content {
    background: transparent;
  }

  /* 信息文本样式 */
  .help-text {
    color: rgba(241, 245, 249, 0.6) !important;
  }

  /* 状态信息样式 */
  .info-label {
    color: rgba(241, 245, 249, 0.7) !important;
  }

  .info-value {
    color: #e2e8f0 !important;
  }

  /* 统计数字样式 */
  .stats-number {
    color: #fbbf24 !important;
  }

  .stats-label {
    color: #f1f5f9 !important;
  }

  /* 分组项目样式 */
  .temp-group-item {
    color: rgba(241, 245, 249, 0.7) !important;
  }

  .group-name {
    color: #f1f5f9 !important;
  }

  .group-id {
    color: rgba(241, 245, 249, 0.5) !important;
  }

  /* 结果卡片样式 */
  .result-card .models-section {
    background: rgba(51, 65, 85, 0.4) !important;
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
  }

  /* 按钮和交互元素 */
  .action-btn,
  .submit-btn {
    background: rgba(30, 41, 59, 0.8) !important;
    border-color: rgba(148, 163, 184, 0.3) !important;
    color: #f1f5f9 !important;
  }

  .action-btn:hover,
  .submit-btn:hover {
    background: rgba(51, 65, 85, 0.9) !important;
    border-color: rgba(139, 92, 246, 0.5) !important;
  }
}

/* Vuetify 暗色主题集成 */
.v-theme--dark {
  .content-panel {
    background: rgba(30, 41, 59, 0.8) !important;
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
  }

  .page-header {
    background: rgba(30, 41, 59, 0.8) !important;
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
  }

  .panel-header {
    background: rgba(51, 65, 85, 0.6) !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2) !important;
  }

  .page-header .header-info h2,
  .page-header .header-info p,
  .panel-title h3 {
    color: #f1f5f9 !important;
  }

  .info-label {
    color: rgba(241, 245, 249, 0.7) !important;
  }

  .info-value {
    color: #e2e8f0 !important;
  }

  .help-text {
    color: rgba(241, 245, 249, 0.6) !important;
  }

  .result-card .models-section {
    background: rgba(51, 65, 85, 0.4) !important;
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
  }
}