/* Base Styles */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}

/* 游戏详情容器 */
.game-detail-container {
  padding: 20px;
  border-radius: 8px;
}

/* Card Styles */
.game-card {
  border-radius: 8px;
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.game-card .card-header {
  border-bottom: 1px solid;
  font-weight: 600;
  padding: 15px 20px;
  display: flex;
  align-items: center;
}

.game-card .card-header i {
  margin-right: 8px;
}

.game-card .card-body {
  padding: 20px;
}

/* Info Grid Layout */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.full-width-item {
    grid-column: 1 / -1;
    text-align: center;
}

/* URL Box */
.url-box {
  padding: 12px 15px;
  border-radius: 6px;
  font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  margin-bottom: 15px;
  word-break: break-all;
  border: 1px solid;
}

/* Table Styles */
.param-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.param-table th {
  font-weight: 600;
  padding: 12px 15px;
  border: 1px solid;
  text-align: left;
}

.param-table td {
  padding: 12px 15px;
  border: 1px solid;
  vertical-align: top;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 为游戏地址列添加特殊样式 */
.param-table td:last-child {
  max-width: 150px;
}

/* Response Area */
.response-area {
  height: 300px;
  padding: 15px;
  border-radius: 6px;
  overflow-y: auto;
  font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  border: 1px solid;
  background-color: var(--card-bg);
}

/* Code Tabs */
.code-tabs {
  display: flex;
  border-bottom: 1px solid;
  margin-bottom: 15px;
}

.tab-btn {
  padding: 10px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.3s ease;
}

.tab-btn.active {
  border-bottom-color: currentColor;
}

.code-panel {
  display: none;
}

.code-panel.active {
  display: block;
}

.code-panel pre {
  padding: 15px;
  border-radius: 0 6px 6px 6px;
  overflow-x: auto;
  margin: 0;
  border: 1px solid;
  font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  tab-size: 4;
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 6px;
}

.status-green {
  background-color: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.status-red {
  background-color: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.status-yellow {
  background-color: rgba(234, 179, 8, 0.15);
  color: var(--warning);
}

.status-gray {
  background-color: rgba(156, 163, 175, 0.15);
  color: var(--secondary);
}

/* Page Header */
.page-header {
  margin-bottom: 30px;
}

.page-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 10px;
}

.page-description {
  font-size: 16px;
  margin-bottom: 20px;
}

/* Test Button */
.btn-test {
  border-radius: 6px;
  padding: 10px 15px;
  font-weight: 600;
  transition: all 0.3s ease;
}

/* Test Row */
.test-row {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.test-row label {
  margin-bottom: 0;
  min-width: 100px;
  font-weight: 500;
}

.test-row .form-control {
  flex: 1;
}

/* 浮动游戏切换器 */
.floating-game-switcher {
  position: fixed;
  right: 30px;
  bottom: 30px;
  z-index: 999;
}

.floating-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: #2d3748;
  color: #e2e8f0;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.floating-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  background-color: #4a5568;
}

.floating-btn i {
  font-size: 24px;
}

.game-list-container {
  position: absolute;
  right: 0;
  bottom: 70px;
  width: 300px;
  max-height: 500px;
  background-color: #1a202c;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  display: none;
  border: 1px solid #2d3748;
}

.game-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #2d3748;
  background-color: #2d3748;
  color: #e2e8f0;
}

.game-list-header h5 {
  margin: 0;
  font-size: 16px;
}

.close-list-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #e2e8f0;
}

.close-list-btn:hover {
  color: #ffffff;
}

.game-list {
  padding: 8px 0;
  overflow-y: auto;
  max-height: 440px;
}

.game-item {
  padding: 10px 16px;
  cursor: pointer;
  transition: background-color 0.2s;
  color: #e2e8f0;
  border-bottom: 1px solid #2d3748;
}

.game-item:hover {
  background-color: #2d3748;
}

.game-item.active {
  background-color: #4a5568;
  color: white;
}

.game-item .game-name {
  font-weight: 500;
  margin-bottom: 2px;
}

.game-item .game-endpoint {
  font-size: 12px;
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #a0aec0;
}

/* Scrollbars */
.response-area::-webkit-scrollbar, .game-list::-webkit-scrollbar {
  width: 8px;
}

.response-area::-webkit-scrollbar-thumb, .game-list::-webkit-scrollbar-thumb {
  border-radius: 4px;
}

.response-area::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb);
}

.api-list::-webkit-scrollbar-thumb {
  background-color: #4a5568;
}

.response-area::-webkit-scrollbar-track {
  background: transparent;
}

.game-list::-webkit-scrollbar-track {
  background-color: #2d3748;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .page-title {
    font-size: 24px;
  }
  
  .info-grid {
    grid-template-columns: 1fr;
  }
  
  .info-item {
    padding: 8px 12px;
    font-size: 13px;
  }
  
  .game-card .card-body {
    padding: 15px;
  }
  
  .url-box, 
  .param-table th, 
  .param-table td {
    padding: 10px 12px;
  }
  
  .floating-game-switcher {
    right: 15px;
    bottom: 15px;
  }
  
  .game-list-container {
    width: 280px;
    max-height: 400px;
  }
}