/* Results Section */

code {
  font-size: 0.9em;
  color: var(--white);
  word-wrap: break-word;
  border-radius: 5px;
  font-family: "Courier New", Courier, monospace;
  background: var(--gray);
  display: block;
  padding: 1em;
}

.results-section {
  padding: 3rem 0;
  background: var(--bg-color);
}

.solution-container {
  background: var(--white);
  border-radius: 1em;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--light-gray);
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 2rem 3rem 1rem;
  background: transparent;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.back-button i {
  font-size: 1rem;
}

.back-button:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-light);
}

/* Question Header */
.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 3rem;
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-light) 100%
  );
  color: white;
  flex-wrap: wrap;
  gap: 1rem;
}

.question-title-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.question-title {
  font-size: 1.8rem;
  font-weight: 700;
}

.question-id {
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 500;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.question-time {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0.9;
}

/* Question Content */
.question-content {
  padding: 2.5rem 3rem;
  border-bottom: 1px solid var(--light-gray);
}

.question-text-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}

.question-text {
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.5;
  flex: 1;
}

.share-button {
  background: linear-gradient(135deg, var(--success) 0%, var(--success2) 100%);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  white-space: nowrap;
}

.share-button:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-light);
}

/* Video Section */
.video-wrapper {
  margin: 2rem 0;
  padding: 0 3rem;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.video-wrapper video {
  width: 100%;
  border-radius: 2em;
  display: block;
}

/* Answers Section */
.answers-section {
  padding: 2rem 3rem;
}

.answer-steps {
  list-style: none;
  counter-reset: step-counter;
}

.answer-steps li {
  counter-increment: step-counter;
  background: var(--light);
  border-radius: var(--border-radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--light-gray);
  position: relative;
  transition: var(--transition);
}

.answer-steps li:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-light);
}

.answer-steps li::before {
  content: counter(step-counter);
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: var(--shadow);
}

.answer-block {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.answer-block span {
  font-size: 1.1rem;
  line-height: 1.6;
}

.answer-image {
  display: flex;
  justify-content: center;
}

.answer-image img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-light);
}

.answer-image img:hover {
  transform: scale(1.02);
  box-shadow: --0 10px 40px rgba(0, 0, 0, 0.1);
}
/* Notes Section */
.notes-section {
  padding: 2rem 3rem;
  background: var(--light);
  border-top: 1px solid var(--light-gray);
}

.notes-content {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  background: rgba(122, 21, 21, 0.05);
  border-radius: 12px;
  border-left: 4px solid var(--primary);
}

.notes-content i {
  font-style: normal;
}

.notes-content i::before {
  content: "💡";
  font-size: 1.3rem;
}

/* Feedback Section */
.feedback-section {
  padding: 3rem;
  text-align: center;
  border-top: 1px solid var(--light-gray);
}

.feedback-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--dark);
}

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

.feedback-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  color: var(--dark);
  background: transparent;
  border: 2px solid var(--light-gray);
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.feedback-btn:hover {
  border-color: var(--primary);
  background: rgba(122, 21, 21, 0.05);
}

.feedback-btn.active {
  border-color: var(--primary);
  background: rgba(122, 21, 21, 0.1);
  color: var(--primary);
}

.feedback-btn.like.active {
  border-color: #059669;
  background: rgba(5, 150, 105, 0.1);
  color: #059669;
}

.feedback-btn.dislike.active {
  border-color: #dc2626;
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

/* Add to your existing CSS */
.feedback-btn.voted {
    background-color: #4CAF50;
    color: white;
}

.feedback-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.feedback-btn:disabled.voted {
    opacity: 1;
}

.notification {
    font-family: inherit;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.helpful-count {
  font-size: 1rem;
  color: var(--gray);
}

/* Related Articles */
.related-section {
  padding: 3rem 0;
}

.related-articles {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 3rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--light-gray);
}

.related-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.related-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--dark);
}

.related-header i {
  font-size: 1.5rem;
  color: var(--primary);
}

.related-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1rem;
}

.related-item {
  border: 1px solid var(--light-gray);
  border-radius: 12px;
  transition: var(--transition);
  overflow: hidden;
}

.related-item:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-light);
}

.related-link {
  display: block;
  padding: 1.5rem;
  color: var(--dark);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.related-link:hover {
  color: var(--primary);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  animation: fadeIn 0.3s;
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-caption {
  margin: 15px auto;
  text-align: center;
  color: #fff;
  font-size: 1.1rem;
  max-width: 80%;
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
  z-index: 1001;
}

.close-modal:hover {
  color: #ccc;
  transform: scale(1.1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .question-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
  }

  .back-button {
    margin: 1rem;
    padding: 8px 16px;
    font-size: 0.9rem;
  }

  .question-content {
    padding: 1.5rem;
  }

  .question-text-section {
    flex-direction: column;
    align-items: flex-start;
  }

  .share-button {
    align-self: flex-end;
  }

  .answers-section,
  .notes-section,
  .feedback-section {
    padding: 1.5rem;
  }

  .answer-steps li::before {
    left: 50%;
    top: -20px;
    transform: translateX(-50%);
  }

  .related-articles {
    padding: 1.5rem;
  }

  .related-list {
    grid-template-columns: 1fr;
  }

  .feedback-buttons {
    align-items: center;
  }
}
