/* 组件样式 */

/* 导航栏 */
.navbar {
  background-color: #2c3e50;
  color: white;
  padding: 15px 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
}

.navbar-menu {
  display: flex;
  list-style: none;
}

.navbar-menu li {
  margin-left: 20px;
}

.navbar-menu a {
  color: white;
  font-weight: 500;
  transition: color 0.3s;
}

.navbar-menu a:hover {
  color: #3498db;
  text-decoration: none;
}

/* 卡片 */
.card {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  overflow: hidden;
  margin-bottom: 20px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.card-header {
  padding: 15px 20px;
  background-color: #f8f9fa;
  border-bottom: 1px solid #eee;
}

.card-body {
  padding: 20px;
}

.card-footer {
  padding: 15px 20px;
  background-color: #f8f9fa;
  border-top: 1px solid #eee;
  text-align: right;
}

/* 按钮 */
.btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
}

.btn-primary {
  background-color: #3498db;
  color: white;
}

.btn-primary:hover {
  background-color: #2980b9;
  text-decoration: none;
}

.btn-secondary {
  background-color: #95a5a6;
  color: white;
}

.btn-secondary:hover {
  background-color: #7f8c8d;
  text-decoration: none;
}

/* 模态框 */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
}

.modal-content {
  background-color: white;
  margin: 10% auto;
  padding: 0;
  width: 70%;
  max-width: 800px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  position: relative;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  position: absolute;
  right: 20px;
  top: 10px;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.modal-header {
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
}

.modal-body {
  padding: 20px;
  max-height: 60vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 15px 20px;
  border-top: 1px solid #eee;
  text-align: right;
}

/* FAQ样式 */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  margin-bottom: 15px;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
}

.faq-question {
  padding: 15px 20px;
  background-color: #f8f9fa;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question h3 {
  margin: 0;
  font-size: 1.1rem;
}

.faq-toggle {
  color: #3498db;
}

.faq-answer {
  padding: 15px 20px;
  display: none;
  border-top: 1px solid #eee;
}

.faq-answer p, .faq-answer ul {
  margin-bottom: 10px;
}

/* 联系我们样式 */
.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 20px;
}

.contact-item {
  text-align: center;
  padding: 20px;
  border-radius: 8px;
  background-color: #f8f9fa;
}

.contact-item i {
  font-size: 2.5rem;
  color: #3498db;
  margin-bottom: 15px;
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
}

.mt-40 {
  margin-top: 40px;
}

/* 竞赛列表 */
.competition-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.competition-item {
  height: 100%;
}

.competition-item .card-body {
  display: flex;
  flex-direction: column;
}

.competition-item .card-body p {
  flex-grow: 1;
}

/* 标签 */
.tag {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  margin-right: 5px;
  margin-bottom: 5px;
}

.tag-primary {
  background-color: #3498db;
  color: white;
}

.tag-secondary {
  background-color: #95a5a6;
  color: white;
}

.tag-local {
  background-color: #f39c12; /* Orange color for local tag */
  color: white;
}

/* Add tag-warning style */
.tag-warning {
  background-color: #e67e22; /* Carrot color for warning */
  color: white;
}

/* Add tag-whitelist style */
.tag-whitelist {
  background-color: #2ecc71; /* Emerald color for whitelist */
  color: white;
}

/* 竞赛分类标签 */
.competition-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 8px 16px;
  margin: 0 5px 10px;
  border: none;
  background-color: #f1f1f1;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s;
}

.tab-btn.active {
  background-color: #3498db;
  color: white;
}

.tab-btn:hover {
  background-color: #e0e0e0;
}

.tab-btn.active:hover {
  background-color: #2980b9;
}