/* 资源页面 */
.resource {
  padding: 50px 0;
}

.resource h1 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: var(--mc-green);
}

.resource > .container > p {
  text-align: center;
  margin-bottom: 40px;
  font-size: 1.2rem;
}

.resource-table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--mc-dark);
  border: 2px solid var(--mc-dark-gray);
  border-radius: 8px;
  overflow: hidden;
}

.resource-table th,
.resource-table td {
  padding: 15px 20px;
  text-align: left;
  border-bottom: 1px solid var(--mc-dark-gray);
}

.resource-table th {
  background-color: #2A3A4A;
  color: var(--mc-light);
  font-weight: bold;
}

.resource-table tr:last-child td {
  border-bottom: none;
}

.resource-table tr:hover {
  background-color: rgba(61, 140, 64, 0.1);
}

.download-btn {
  display: inline-block;
  padding: 8px 16px;
  background-color: var(--mc-green);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.download-btn:hover {
  background-color: var(--mc-dark-green);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* 预览图片容器 */
.preview-container {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* 预览缩略图 */
.preview-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid var(--mc-dark-gray);
  transition: all 0.3s ease;
}

.preview-thumb:hover {
  border-color: var(--mc-green);
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* 模态框 */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  padding: 0;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
  text-align: center;
}

.modal-content {
  margin: auto;
  display: block;
  width: 90%;
  max-width: 90%;
  max-height: 85vh;
  object-fit: contain;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid var(--mc-dark-gray);
  border-radius: 8px;
  z-index: 1002; /* 确保内容在关闭按钮下方 */
}

.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1003; /* 确保关闭按钮在最上层 */
}

.close:hover {
  color: #bbb;
}

.caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;
  display: block;
  width: 100%;
  text-align: center;
  color: #ccc;
  padding: 15px 0;
  height: auto;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1001;
  box-sizing: border-box;
}

.caption a {
  color: var(--mc-green);
  text-decoration: none;
  font-weight: bold;
}

.caption a:hover {
  text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .resource {
    padding: 20px 0;
  }
  
  .resource h1 {
    font-size: 1.5rem;
    margin-bottom: 10px;
  }
  
  .resource > .container > p {
    margin-bottom: 20px;
    font-size: 0.9rem;
  }
  
  .resource-table {
    font-size: 0.7rem;
  }
  
  .resource-table th,
  .resource-table td {
    padding: 5px 8px;
  }
  
  .resource-table th {
    font-size: 0.75rem;
  }
  
  .download-btn {
    padding: 4px 8px;
    font-size: 0.7rem;
  }
  
  .preview-thumb {
    width: 35px;
    height: 35px;
  }
  
  .preview-container {
    gap: 5px;
  }
  
  .modal-content {
    width: 95%;
    max-width: 95%;
  }
  
  .close {
    font-size: 30px;
    top: 10px;
    right: 20px;
  }
  
  .caption {
    padding: 10px 0;
    font-size: 0.8rem;
  }
}