/* Basic Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Microsoft JhengHei", "微軟正黑體", "Noto Sans TC", "Arial",
    sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f4f4f4;
}

.container {
  margin: 0 auto;
  overflow: hidden;
}

/* Header Styles */
.site-header {
  background: #333;
  color: #fff;
  padding: 1.5rem 0;
  text-align: center;
}

.site-header a {
  color: #fff;
  text-decoration: none;
}

/* Navigation Styles */
.main-nav {
  background: #444;
  padding: 0.5rem 0;
}

.main-nav ul {
  display: flex;
  list-style: none;
  justify-content: center;
}

.main-nav li {
  margin: 0 1rem;
}

.main-nav a {
  color: #fff;
  text-decoration: none;
  padding: 0.5rem;
  transition: color 0.3s;
}

.main-nav a:hover {
  color: #f8c300;
}

/* Content Styles */
.content {
  background: #fff;
  padding: 2rem;
  margin: 2rem 0;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.page {
  margin-bottom: 2rem;
}

.page h1 {
  color: #333;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eee;
}

.features {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-top: 2rem;
}

.feature {
  flex: 0 0 30%;
  background: #f9f9f9;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 5px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.05);
}

.feature h3 {
  color: #444;
  margin-bottom: 0.5rem;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.btn-submit {
  background: #333;
  color: #fff;
  border: none;
  padding: 0.8rem 1.5rem;
  cursor: pointer;
  border-radius: 4px;
  font-size: 1rem;
  transition: background 0.3s;
}

.btn-submit:hover {
  background: #555;
}

/* Line App Styles */
.app-container {
  display: flex;
  border: 1px solid #ddd;
  border-radius: 5px;
  overflow: hidden;
  height: 500px;
}

.app-sidebar {
  width: 30%;
  background: #f0f0f0;
  padding: 1rem;
  border-right: 1px solid #ddd;
}

.contact-list {
  list-style: none;
}

.contact-list li {
  padding: 0.8rem;
  border-bottom: 1px solid #ddd;
  cursor: pointer;
}

.contact-list li:hover {
  background: #e0e0e0;
}

.app-main {
  width: 70%;
  display: flex;
  flex-direction: column;
}

.chat-window {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.message-list {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
}

.message {
  margin-bottom: 1rem;
  padding: 0.8rem;
  border-radius: 10px;
  max-width: 70%;
}

.message p {
  margin: 0;
}

.message .time {
  display: block;
  font-size: 0.8rem;
  color: #999;
  margin-top: 0.3rem;
  text-align: right;
}

.received {
  background: #f1f0f0;
  align-self: flex-start;
}

.sent {
  background: #e3f2fd;
  align-self: flex-end;
  margin-left: auto;
}

.message-input {
  display: flex;
  padding: 1rem;
  border-top: 1px solid #ddd;
}

.message-input input {
  flex: 1;
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-right: 0.5rem;
}

.message-input button {
  background: #4caf50;
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
}

/* Footer Styles */
.site-footer {
  text-align: center;
  background: #333;
  color: #fff;
  padding: 1.5rem 0;
  margin-top: 2rem;
}

/* Error Page */
.error-page {
  text-align: center;
  padding: 3rem 0;
}

.btn-home {
  display: inline-block;
  background: #333;
  color: #fff;
  padding: 0.8rem 1.5rem;
  text-decoration: none;
  border-radius: 4px;
  margin-top: 1.5rem;
  transition: background 0.3s;
}

.btn-home:hover {
  background: #555;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .container {
    width: 100%;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: center;
  }

  .main-nav li {
    margin: 0.5rem 0;
  }

  .features,
  .app-container {
    flex-direction: column;
  }

  .feature {
    flex: 0 0 100%;
  }

  .app-sidebar,
  .app-main {
    width: 100%;
  }

  .app-container {
    height: auto;
  }

  .chat-window {
    height: 400px;
  }
}

/* OCA Test CSS */
/* OCA Test CSS */
.oca-test-page {
  background-color: #f8f9fa;
  min-height: 100vh;
}

/* Card styling */
.card {
  overflow: hidden;
  transition: all 0.3s ease;
}

.card-header {
  border-bottom: none;
}

/* Question styling */
.question-container {
  background-color: rgba(255, 255, 255, 0.9) !important;
  border-color: #dee2e6 !important;
  transition: all 0.3s ease;
}

#oca_question {
  line-height: 1.6;
  color: #212529;
}

#choice_button_set {
  gap: 10px;
}

/* Button styling */
.btn-group .choice_btn {
  position: relative;
  flex: 1;
  transition: all 0.2s ease;
  border-width: 2px;
  border: 2px solid #555;
  background: white;
  color: #555;
}

.btn-group .choice_btn:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 2;
}

.btn-group .choice_btn.active {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 3;
}

#positive_btn.active {
  background-color: #0d6efd;
  color: white;
}

#maybe_btn.active {
  background-color: #0d6efd;
  color: white;
}

#negative_btn.active {
  background-color: #0d6efd;
  color: white;
}

/* Progress bar styling */
.progress {
  background-color: #e9ecef;
  overflow: hidden;
  border-radius: 10px;
}

.progress-bar {
  background-image: linear-gradient(to right, #0d6efd, #20c997);
  transition: width 1s ease;
}

#progress-counter {
  font-size: 0.85rem;
}

/* Navigation buttons */
.nav_button {
  transition: all 0.2s ease;
}

.nav_button:hover {
  background-color: #e9ecef;
}

/* Completion screen */
#oca_finish {
  animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .btn-group {
    flex-direction: row;
  }

  .btn-group .choice_btn {
    border-radius: 0.25rem !important;
    margin-bottom: 0.5rem;
  }

  #oca_question {
    font-size: 1rem;
  }
}

/* Collapse instructions styling */
#instructionCollapse {
  font-size: 0.95rem;
  color: #495057;
}

#instructionCollapse ol {
  padding-left: 1.25rem;
}

#instructionCollapse li {
  margin-bottom: 0.5rem;
}

/* Animation for question change */
@keyframes fadeQuestion {
  0% {
    opacity: 0.5;
    transform: translateY(5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.question-container {
  animation: fadeQuestion 0.3s ease-out;
}
