:root {
  --primary-color: #1a73e8;
  --primary-hover: #1557b0;
  --accent-color: #d81b60;
  --bg-light: #f8f9fa;
  --text-dark: #202124;
  --text-light: #ffffff;
  --border-color: #dadce0;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --highlight-single: #6200ee;
  --highlight-multiple: #ff8a80;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.5;
  background-color: var(--bg-light);
  color: var(--text-dark);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.main-title {
  font-size: 2rem;
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-weight: 700;
}

.sub-title {
  font-size: 1.5rem;
  text-align: center;
  color: var(--accent-color);
  margin-bottom: 2rem;
}

.search-bar {
  display: flex;
  gap: 1rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

#keyword {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

#keyword:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.2);
}

#btnSearch {
  padding: 0.75rem 2rem;
  font-size: 1rem;
  color: var(--text-light);
  background-color: var(--primary-color);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.1s;
}

#btnSearch:hover {
  background-color: var(--primary-hover);
}

#btnSearch:active {
  transform: scale(0.98);
}

#location-info {
  text-align: center;
  min-height: 3rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  font-size: 1.1rem;
  color: var(--primary-color);
}

.presidium {
  text-align: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e7eb 100%);
  border-radius: 12px;
  margin-bottom: 2rem;
  font-weight: 600;
  color: var(--text-dark);
  box-shadow: 0 4px 6px var(--shadow-color);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.seat-layout {
  display: flex;
  justify-content: flex-start;  /* 改为左对齐 */
  gap: 1rem;
  overflow-x: auto;
  padding: 1rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px var(--shadow-color);
  width: 100%;  /* 确保容器占满宽度 */
}

#row-numbers {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.row-number {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  color: var(--text-dark);
  background-color: var(--bg-light);
  border-radius: 4px;
}

#seat-container {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 0.5rem;
}

.row {
  display: flex;
  gap: 2px;
}

.cell {
  min-width: 2.5rem;  /* 添加最小宽度 */
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  background-color: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  transition: all 0.3s ease;
  padding: 2px;  /* 添加内边距 */
  word-break: break-all;  /* 允许文字换行 */
  overflow: hidden;
}

.cell.highlight-single {
  background-color: var(--highlight-single);
  color: var(--text-light);
  transform: scale(1.05);
  box-shadow: 0 2px 4px var(--shadow-color);
}

.cell.highlight-multiple {
  background-color: var(--highlight-multiple);
  transform: scale(1.02);
}

/* 响应式布局 */
@media (max-width: 768px) {
  .cell {
    min-width: 2rem;  /* 修改最小宽度 */
    width: 2rem;
    height: 2rem;
    font-size: 0.7rem;
    padding: 1px;  /* 减小内边距 */
  }
  
  .seat-layout {
    padding: 0.5rem;  /* 减小容器内边距 */
  }
}

/* 添加列间距 */
.cell[data-c="4"], .cell[data-c="20"] {
  margin-right: 1rem;
}

.loading {
  text-align: center;
  padding: 2rem;
  color: var(--primary-color);
  font-size: 1.2rem;
}
