/* Robot detail page styles */
body {
  background-color: #141a2c;
}

.robot-detail-container {
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 0 20px;
  color: #ccd6f6;
}

/* Main content layout - left and right columns */
.main-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 40px;
}

/* Season section styles */
.season-section {
  background-color: #1a1a1a;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  padding: 30px;
  overflow: hidden;
}

.season-content {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.season-description {
  line-height: 1.6;
  font-size: 1.1rem;
}

.game-animation {
  width: 100%;
}

.game-animation h2,
.game-manual h2 {
  margin-bottom: 20px;
  font-size: 1.8rem;
  color: #ccd6f6;
}

.game-manual h2 {
  margin-bottom: 10px;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  background-color: #121212;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Game Manual PDF viewer styles */
.game-manual {
  width: 100%;
  margin-top: 30px;
}

.pdf-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.pdf-preview-container {
  position: relative;
  padding-bottom: 120%; /* Taller aspect ratio for PDF */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  background-color: #121212;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.pdf-preview-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* 本地PDF预览样式 */
.pdf-local-viewer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  background-color: #f5f5f5;
  border-radius: 8px;
  overflow: hidden;
}

.pdf-local-viewer object,
.pdf-local-viewer embed {
  width: 100%;
  height: 100%;
  border: none;
}

.pdf-loading-notice {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 14px;
  z-index: 1;
  text-align: center;
}

.pdf-download {
  display: flex;
  justify-content: center;
}

.pdf-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #2a2a2a;
  color: #ccd6f6;
  border: none;
  padding: 12px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
}

.pdf-button:hover {
  background-color: #333;
  transform: translateY(-2px);
}

.pdf-button svg {
  width: 18px;
  height: 18px;
}

/* Robot section styles */
.robot-section {
  background-color: #1a1a1a;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  padding: 30px;
  display: flex;
  flex-direction: column;
}

.robot-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
}

.robot-year-badge {
  background: linear-gradient(90deg, #ff6b6b, #4ecdc4);
  color: #fff;
  font-weight: bold;
  padding: 8px 15px;
  border-radius: 20px;
  margin-left: 20px;
  font-size: 1rem;
}

/* Robot content with image on top and info below */
.robot-content {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.robot-images {
  width: 100%;
}

.main-image {
  width: 100%;
  height: 350px;
  border-radius: 8px;
  overflow: hidden;
}

.main-image img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Changed from cover to contain to show the full robot */
  transition: transform 0.3s ease;
}

/* Hide gallery section */
.image-gallery {
  display: none;
}

.robot-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.robot-specs h2,
.robot-competitions h2 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: #ccd6f6;
  border-bottom: 1px solid #333;
  padding-bottom: 10px;
}

.spec-item {
  margin-bottom: 15px;
}

.spec-title {
  font-weight: bold;
  color: #c90101;
  margin-bottom: 5px;
}

.competition-item {
  margin-bottom: 25px;
}

.competition-name {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 10px;
  color: #ccd6f6;
}

.competition-date {
  font-size: 0.9rem;
  color: #999;
  margin-bottom: 10px;
}

.competition-location {
  font-size: 0.9rem;
  color: #85a2b6;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.competition-location::before {
  content: "📍";
  margin-right: 5px;
}

.award-item {
  background-color: #222;
  border-left: 3px solid #c90101;
  padding: 10px 15px;
  margin-bottom: 10px;
  border-radius: 0 4px 4px 0;
}

/* Navigation buttons */
.robot-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
}

.nav-button {
  background-color: #2a2a2a;
  color: #ccd6f6;
  border: none;
  padding: 12px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
}

.nav-button:hover {
  background-color: #333;
  transform: translateY(-2px);
}

.nav-button:active {
  transform: translateY(0);
}

.nav-button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Error message styles */
.error-message {
  text-align: center;
  padding: 40px;
  background-color: #1a1a1a;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.error-message h2 {
  color: #ff6b6b;
  margin-bottom: 15px;
}

.error-message p {
  margin-bottom: 20px;
}

/* Media queries */
@media (max-width: 900px) {
  #game-manual {
    display: none !important;
  }

  .game-manual {
    margin-top: 0;
  }

  .game-manual h2 {
    display: none;
  }
  .main-content-grid {
    grid-template-columns: 1fr;
  }

  .main-image {
    height: 300px;
  }

  .pdf-preview-container {
    padding-bottom: 100%;
  }
}

@media (max-width: 600px) {
  .season-content {
    flex-direction: column;
  }
  .robot-navigation {
    flex-direction: column;
    gap: 15px;
    align-items: center;
  }

  .nav-button {
    width: 100%;
    text-align: center;
  }
}
