/* Custom Styles for Testing Platform */

body {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
}

.container-fluid {
  min-height: 100vh;
}

.sidebar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  margin: 20px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

.main-content {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  margin: 20px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.service-item {
  border-radius: 10px;
  margin-bottom: 10px;
  transition: all 0.3s ease;
  border: none;
  background: #f8f9fa;
  cursor: pointer;
}

.service-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  background: #e9ecef;
}

.service-item.active {
  background: linear-gradient(45deg, #007bff, #0056b3);
  color: white;
}

.btn-custom {
  border-radius: 25px;
  padding: 10px 20px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.table {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.table thead th {
  background: linear-gradient(45deg, #007bff, #0056b3);
  color: white;
  border: none;
  font-weight: 600;
}

.table tbody tr {
  transition: all 0.2s ease;
}

.table tbody tr:hover {
  background: #f8f9fa;
  transform: scale(1.01);
}

.modal-content {
  border-radius: 15px;
  border: none;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
  background: linear-gradient(45deg, #007bff, #0056b3);
  color: white;
  border-radius: 15px 15px 0 0;
  border-bottom: none;
}

.modal-body {
  padding: 30px;
}

.form-control {
  border-radius: 10px;
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.btn-primary {
  background: linear-gradient(45deg, #007bff, #0056b3);
  border: none;
  border-radius: 25px;
  padding: 12px 30px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: linear-gradient(45deg, #0056b3, #004085);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
}

.btn-secondary {
  background: linear-gradient(45deg, #6c757d, #495057);
  border: none;
  border-radius: 25px;
  padding: 12px 30px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: linear-gradient(45deg, #495057, #343a40);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 117, 125, 0.3);
}

.btn-sm {
  border-radius: 20px;
  padding: 5px 15px;
}

.image-link {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.image-link:hover {
  color: #0056b3;
  text-decoration: underline;
}

.image-link.solved-image {
  color: #28a745;
  font-weight: 600;
}

.image-link.solved-image:hover {
  color: #218838;
  text-decoration: underline;
}

.upload-area {
  border: 2px dashed #007bff;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  background: #f8f9fa;
}

.upload-area:hover {
  border-color: #0056b3;
  background: #e9ecef;
}

.upload-area.dragover {
  border-color: #28a745;
  background: #d4edda;
}

.checkbox-custom {
  transform: scale(1.2);
  accent-color: #007bff;
}

/* Custom Checkbox Styling */
.checkbox-container {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.checkbox-container input {
  opacity: 0;
  width: 0;
  height: 0;
}

.checkmark {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 24px;
}

.checkmark:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

.checkbox-container input:checked + .checkmark {
  background-color: #007bff;
}

.checkbox-container input.has-error:checked + .checkmark {
  background-color: #dc3545;
}

.checkbox-container input:checked + .checkmark:before {
  transform: translateX(26px);
}

/* Upload Area Styling */
.upload-area {
  border: 2px dashed #007bff;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  background: #f8f9fa;
}

.upload-area:hover {
  border-color: #0056b3;
  background: #e9ecef;
}

.upload-area i {
  font-size: 2rem;
  color: #007bff;
  margin-bottom: 10px;
}

.upload-area p {
  margin: 0;
  color: #6c757d;
  font-weight: 500;
}

.upload-area:focus {
  outline: none;
  border-color: #0056b3;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
.alert {
  border-radius: 10px;
  border: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(0, 123, 255, 0.5);
  border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 123, 255, 0.7);
}

.btn-xs {
  padding: 0.2rem 0.4rem;
  font-size: 0.75rem;
  border-radius: 0.2rem;
}

@media (max-width: 768px) {
  .sidebar {
    margin: 10px;
    padding: 15px;
    max-height: 40vh; /* Limit height on mobile to show both sections */
    overflow-y: auto;
  }

  .main-content {
    margin: 10px;
    padding: 15px;
  }

  .service-item {
    flex-direction: column;
    align-items: flex-start !important;
  }

  .service-item div {
    margin-top: 5px;
  }

  .btn-custom {
    width: 100%;
    margin-bottom: 10px;
  }

  .d-flex.justify-content-between {
    flex-direction: column;
    align-items: stretch !important;
  }

  .table-responsive {
    border-radius: 10px;
    overflow-x: auto;
  }

  .modal-dialog {
    margin: 10px;
  }

  .modal-body {
    padding: 20px;
  }

  .btn {
    font-size: 14px;
    padding: 8px 16px;
  }

  h2 {
    font-size: 1.5rem;
  }

  h4 {
    font-size: 1.25rem;
  }
}

@media (max-width: 576px) {
  .container-fluid {
    padding: 0;
  }

  .sidebar,
  .main-content {
    margin: 5px;
    padding: 10px;
  }

  .service-item span {
    font-size: 14px;
  }

  .table th,
  .table td {
    padding: 0.5rem;
    font-size: 12px;
  }

  .btn-sm {
    padding: 4px 8px;
    font-size: 12px;
  }

  .modal-content {
    border-radius: 10px;
  }

  .form-control {
    font-size: 14px;
  }
}

/* Comments Section Styling */
#comments-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 123, 255, 0.5) rgba(255, 255, 255, 0.1);
}

#comments-list::-webkit-scrollbar {
  width: 6px;
}

#comments-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

#comments-list::-webkit-scrollbar-thumb {
  background: rgba(0, 123, 255, 0.5);
  border-radius: 10px;
}

#comments-list::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 123, 255, 0.7);
}

.comment {
  transition: all 0.2s ease;
  animation: fadeInComment 0.3s ease-in-out;
}

.comment:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

@keyframes fadeInComment {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.spinner-border {
  width: 2rem;
  height: 2rem;
  border-width: 0.25em;
}

.delete-comment:hover,
.edit-comment:hover {
  transform: scale(1.1);
  transition: transform 0.2s ease;
}

.comment-text {
  word-wrap: break-word;
  word-break: break-word;
}

/* Notification Styles */
.notification-dropdown {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

.notification-item {
  border-bottom: 1px solid #e9ecef;
  transition: all 0.2s ease;
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-item:hover {
  background-color: #f8f9fa;
  transform: translateX(2px);
}

.unread-notification {
  background-color: #e7f3ff;
  font-weight: 500;
}

.unread-notification:hover {
  background-color: #d0e9ff;
}

#notification-badge {
  font-size: 0.65rem;
  padding: 0.2em 0.4em;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.highlighted-test {
  background-color: #fff3cd !important;
  animation: highlightFade 3s ease-in-out;
}

@keyframes highlightFade {
  0% {
    background-color: #ffc107;
  }
  100% {
    background-color: transparent;
  }
}
