/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
}

/* Header & Navigation */
.header {
  background: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: bold;
  color: #333;
  text-decoration: none;
  font-size: 1.1rem;
}

.nav {
  display: flex;
  gap: 0.5rem;
}

.nav-link {
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: #666;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.nav-link:hover {
  background: #f0f0f0;
  color: #333;
}

.nav-link.active {
  background: #1e293b;
  color: white;
}

/* Hero Section */
.hero {
  height: 14rem;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
}

.hero-title {
  position: relative;
  z-index: 10;
  color: white;
  font-size: 3.5rem;
  font-weight: bold;
  letter-spacing: 0.1em;
}

/* Container */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

/* Content Box */
.content-box {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.content-box h2 {
  color: #1e3a5f;
  margin-bottom: 1rem;
}

.content-box h3 {
  color: #1e3a5f;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.content-box h4 {
  color: #333;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.content-box p {
  margin-bottom: 1rem;
}

.content-box ul, .content-box ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.content-box li {
  margin-bottom: 0.5rem;
}

/* Yellow Box */
.yellow-box {
  background: #fef9c3;
  border: 1px solid #fde047;
}

.yellow-box h3 {
  color: #854d0e;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 2rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: #2563eb;
  color: white;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-outline {
  background: white;
  color: #333;
  border: 2px solid #e5e7eb;
}

.btn-outline:hover {
  background: #f9fafb;
}

.btn-success {
  background: #22c55e;
  color: white;
}

.btn-success:hover {
  background: #16a34a;
}

.btn-danger {
  background: #ef4444;
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.btn-download {
  width: 100%;
  justify-content: center;
  margin-top: 1rem;
}

/* Image Grid */
.image-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.image-item img {
  width: 100%;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.image-caption {
  text-align: center;
  color: #666;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.image-single {
  margin: 1.5rem 0;
  text-align: center;
}

.image-single img {
  max-width: 100%;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Audio Player */
.audio-player {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.speaker-icon {
  width: 2rem;
  height: 2rem;
  color: #2563eb;
  flex-shrink: 0;
}

.audio-player audio {
  flex: 1;
  height: 2.5rem;
}

/* Download Box */
.download-box {
  text-align: center;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.download-icon {
  margin-bottom: 1rem;
}

.download-icon svg {
  width: 3rem;
  height: 3rem;
  color: #2563eb;
}

.download-content {
  margin-bottom: 1rem;
}

.download-file-icon {
  font-size: 1.5rem;
}

.download-content h4 {
  margin: 0.5rem 0;
  color: #1e3a5f;
}

.download-content p {
  color: #666;
  margin: 0;
}

/* Two Column Grid */
.two-column-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.two-column-grid .content-box {
  margin-bottom: 0;
}

/* Chatbot Box */
.chatbot-box {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.chatbot-qr-center {
  text-align: center;
  margin: 1rem 0;
}

.chatbot-qr-center img {
  width: 150px;
  height: 150px;
  border-radius: 0.5rem;
}

.chatbot-content {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.chatbot-text {
  flex: 1;
}

.chatbot-text h4 {
  margin: 0 0 0.5rem 0;
  color: #166534;
}

.chatbot-text p {
  margin: 0 0 1rem 0;
}

.chatbot-qr img {
  width: 120px;
  height: 120px;
  border-radius: 0.5rem;
}

/* Video Container */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 0.5rem;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Quiz */
.quiz-question {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f9fafb;
  border-radius: 0.5rem;
}

.quiz-question h4 {
  margin-bottom: 0.75rem;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  cursor: pointer;
}

.quiz-option input {
  cursor: pointer;
}

.quiz-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.quiz-question.correct {
  background: #dcfce7;
  border: 2px solid #22c55e;
}

.quiz-question.incorrect {
  background: #fee2e2;
  border: 2px solid #ef4444;
}

.solution-text {
  color: #22c55e;
  font-weight: bold;
  margin-top: 0.5rem;
}

/* Test */
.test-question {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f9fafb;
  border-radius: 0.5rem;
}

.test-question h4 {
  margin-bottom: 0.75rem;
}

.test-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 1rem;
}

.test-question.correct {
  background: #dcfce7;
  border: 2px solid #22c55e;
}

.test-question.incorrect {
  background: #fee2e2;
  border: 2px solid #ef4444;
}

/* Registration Form */
.registration-header {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.registration-bar {
  width: 4px;
  height: 4rem;
  background: #2563eb;
  border-radius: 2px;
}

.registration-header h2 {
  color: #2563eb;
  margin: 0;
}

.registration-text {
  text-align: center;
  color: #666;
  margin-bottom: 1.5rem;
}

.registration-form {
  max-width: 400px;
  margin: 0 auto;
}

.registration-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.registration-form input {
  width: 100%;
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.registration-form input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Puzzle */
.puzzle-instructions {
  background: #3b82f6;
  color: white;
}

.puzzle-instructions h3 {
  color: white;
}

.puzzle-instructions ul {
  margin-left: 1rem;
}

.puzzle-progress {
  display: flex;
  justify-content: space-between;
  color: #666;
  margin-bottom: 1rem;
}

.puzzle-container {
  position: relative;
  margin-bottom: 1.5rem;
}

.puzzle-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.puzzle-tile {
  aspect-ratio: 5/4;
  background: #3b82f6;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.puzzle-tile.revealed {
  background-size: 500% 400%;
}

.puzzle-tile svg {
  width: 1.5rem;
  height: 1.5rem;
  color: rgba(255,255,255,0.3);
}

.puzzle-badge {
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  background: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: bold;
  color: #2563eb;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  border: 2px solid #e0f2fe;
}

.puzzle-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Ship Description */
.ship-description {
  background: #f0fdf4;
  border: 2px solid #bbf7d0;
}

.ship-description h3 {
  color: #166534;
}

.ship-highlight {
  color: #166534;
  font-style: italic;
}

/* Certificate */
.certificate-box {
  background: white;
  border: 4px solid #1e3a5f;
  border-radius: 0.75rem;
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.certificate-inner {
  border: 2px solid #1e3a5f;
  border-radius: 0.5rem;
  padding: 2rem;
  position: relative;
  text-align: center;
}

.certificate-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  border: 4px solid #e5e7eb;
  border-radius: 50%;
  opacity: 0.3;
}

.certificate-title {
  font-family: Georgia, serif;
  font-size: 3rem;
  font-style: italic;
  font-weight: bold;
  color: #1e3a5f;
  margin-bottom: 0.5rem;
}

.certificate-subtitle {
  color: #2563eb;
  letter-spacing: 0.3em;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.certificate-line {
  border: none;
  border-top: 2px solid #1e3a5f;
  margin: 1rem 0 2rem;
}

.certificate-text {
  font-family: Georgia, serif;
  font-style: italic;
  color: #666;
  margin-bottom: 1rem;
}

.certificate-name {
  font-family: Georgia, serif;
  font-size: 2.5rem;
  font-weight: bold;
  color: #1e3a5f;
  margin: 0.5rem 0;
}

.certificate-name-line {
  border: none;
  border-top: 1px solid #1e3a5f;
  width: 60%;
  margin: 0 auto 1.5rem;
}

.certificate-footer {
  display: flex;
  justify-content: space-around;
  margin-top: 3rem;
}

.certificate-date p:first-child,
.certificate-org p:first-child {
  font-family: Georgia, serif;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.certificate-date p:first-child {
  color: #1e3a5f;
  text-decoration: underline;
}

.certificate-org p:first-child {
  color: #2563eb;
  font-style: italic;
}

.certificate-label {
  color: #666;
  font-size: 0.8rem;
}

.certificate-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Footer */
.footer {
  background: white;
  color: #333;
  text-align: center;
  padding: 1.5rem;
  margin-top: 2rem;
}

/* Utility Classes */
.hidden {
  display: none !important;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

/* Learning Goals */
.learning-goals {
  background: #e0f2fe;
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.learning-goals h3 {
  color: #2563eb;
  margin-top: 0;
  margin-bottom: 1rem;
}

.learning-goals ul {
  margin-left: 0;
  list-style: none;
}

.learning-goals li {
  margin-bottom: 0.5rem;
  color: #2563eb;
}

/* Quiz Hint */
.quiz-hint {
  color: #666;
  font-style: italic;
  margin-bottom: 1rem;
}

/* Puzzle Pieces */
.puzzle-piece {
  aspect-ratio: 5/4;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.puzzle-piece.covered {
  background: #3b82f6 !important;
  background-image: none !important;
}

.puzzle-piece.revealed {
  background-size: 500% 400%;
}

.puzzle-piece.revealed .anchor-icon {
  display: none;
}

.anchor-icon {
  font-size: 1.5rem;
  color: rgba(255,255,255,0.3);
}

/* True/False Buttons */
.tf-options {
  flex-direction: row;
  gap: 1rem;
}

.btn-tf {
  padding: 0.75rem 2rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-tf:hover {
  background: #f9fafb;
}

.btn-tf.selected {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

/* Info Table */
.info-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.info-table th,
.info-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.info-table th {
  background: #f9fafb;
  font-weight: 600;
  color: #1e3a5f;
}

.info-table tr:hover {
  background: #f9fafb;
}

/* Responsive */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 1rem;
  }
  
  .nav {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .image-grid {
    grid-template-columns: 1fr;
  }
  
  .two-column-grid {
    grid-template-columns: 1fr;
  }
  
  .chatbot-content {
    flex-direction: column;
    text-align: center;
  }
  
  .quiz-buttons {
    flex-direction: column;
  }
  
  .certificate-footer {
    flex-direction: column;
    gap: 1.5rem;
  }
}


/* Puzzle Feedback Bar */
.feedback-bar {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 1.5rem 3rem;
  border-radius: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  text-align: center;
  z-index: 9999;
  animation: feedbackPop 0.3s ease-out;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.feedback-bar.correct {
  background: #22c55e;
}

.feedback-bar.incorrect {
  background: #ef4444;
}

@keyframes feedbackPop {
  0% {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}
