@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Outfit:wght@300;400;500;600;700&display=swap");

:root {
  --primary-dark: #0d0d1a;
  --secondary-dark: #151528;
  --accent-blue: #4d8df7;
  --accent-purple: #8b5cf6;
  --accent-pink: #ec4899;
  --accent-magenta: #d946ef;
  --text-light: #f8f6f1;
  --text-muted: #a0a8c8;
  --text-dark: #151528;
  --gradient-brand: linear-gradient(135deg, #4d8df7 0%, #8b5cf6 50%, #ec4899 100%);
  --gradient-brand-reverse: linear-gradient(135deg, #ec4899 0%, #8b5cf6 50%, #4d8df7 100%);
  --gradient-dark: linear-gradient(180deg, #0d0d1a 0%, #151528 100%);
  --gradient-glow: linear-gradient(135deg, rgba(77, 141, 247, 0.2) 0%, rgba(139, 92, 246, 0.2) 50%, rgba(236, 72, 153, 0.2) 100%);
  --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --shadow-soft: 0 4px 30px rgba(0, 0, 0, 0.2);
  --shadow-glow: 0 4px 30px rgba(139, 92, 246, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--primary-dark);
  color: var(--text-light);
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  font-weight: 500;
  line-height: 1.2;
}

.bold,
.black {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  color: var(--text-light);
}

.gradient-text,
.primary-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.upper {
  text-transform: uppercase;
}

/* Spacing Utilities */
.py-50 {
  padding-top: 50px;
  padding-bottom: 50px;
}

.py-100 {
  padding-top: 100px;
  padding-bottom: 100px;
}

.pt-50 {
  padding-top: 50px;
}

.pb-50 {
  padding-bottom: 50px;
}

.pt-100 {
  padding-top: 100px;
}

.pb-100 {
  padding-bottom: 100px;
}

.d-none {
  display: none !important;
}

/* List Groups */
.list-group-item {
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 0 !important;
  color: var(--text-light);
  transition: var(--transition-smooth);
}

.list-group-item:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.4);
}

/* Buttons */
.btn {
  transition: var(--transition-smooth);
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
  border: none;
}

.btn:focus {
  box-shadow: none !important;
}

.btn-custom {
  background: var(--gradient-brand);
  color: var(--text-light);
  border: none;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
}

.btn-custom:hover {
  color: var(--text-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-outline-custom {
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: var(--accent-purple);
  background: rgba(139, 92, 246, 0.05);
  font-size: 0.9em;
}

.btn-outline-custom:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--accent-purple);
  color: var(--accent-purple);
}

.btn-rounded {
  border-radius: 0;
}

.btn-outline-danger {
  color: var(--accent-pink) !important;
  border-color: rgba(236, 72, 153, 0.3) !important;
  background: rgba(236, 72, 153, 0.05);
}

.btn-outline-danger:hover {
  background: rgba(236, 72, 153, 0.15) !important;
  border-color: var(--accent-pink) !important;
}

/* Forms */
.form-group label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85em;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  position: relative;
  top: 0;
  left: 0;
}

.form-group .form-control {
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 0;
  color: var(--text-light);
  font-family: 'Outfit', sans-serif;
  font-size: 0.95em;
  padding: 0.875rem 1rem;
  transition: var(--transition-smooth);
}

.form-group .form-control:focus {
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1) !important;
  border: 1px solid var(--accent-purple);
  background: rgba(139, 92, 246, 0.1);
  color: var(--text-light);
}

.form-group .form-control::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

/* Cards */
.card {
  background: var(--secondary-dark);
  border: 1px solid rgba(139, 92, 246, 0.2) !important;
  border-radius: 0 !important;
  box-shadow: var(--shadow-soft) !important;
  transition: var(--transition-smooth);
}

.card:hover {
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: var(--shadow-glow) !important;
}

.card .card-header {
  background: rgba(139, 92, 246, 0.05) !important;
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
  color: var(--text-light);
}

.card .card-header h4 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  margin-bottom: 0 !important;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.card .card-body {
  color: var(--text-light);
}

/* Auth Page */
#auth {
  background: var(--primary-dark);
  background-image: var(--gradient-dark);
  height: 100vh;
  width: 100%;
  overflow-y: scroll;
  display: flex;
  align-items: center;
  justify-content: center;
}

#auth #cover {
  width: 100%;
  padding: 2rem;
}

#auth #cover .card {
  background: rgba(21, 21, 40, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

/* Top Bar */
#top_bar {
  height: 60px;
  background: var(--secondary-dark);
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
}

#top_bar .left_text {
  width: 300px;
  height: 100%;
  display: flex;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  color: var(--text-light);
  font-weight: 600 !important;
  font-family: 'Playfair Display', serif;
}

#top_bar img {
  cursor: pointer;
  transition: var(--transition-smooth);
}

#top_bar img:hover {
  transform: scale(1.1);
}

/* Sidebar */
#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  height: 100%;
  background: var(--secondary-dark);
  border-right: 1px solid rgba(139, 92, 246, 0.2);
  z-index: 9;
  padding-top: 80px;
  overflow-y: scroll;
  transition: var(--transition-smooth);
}

#sidebar::-webkit-scrollbar {
  width: 6px;
}

#sidebar::-webkit-scrollbar-track {
  background: rgba(139, 92, 246, 0.05);
}

#sidebar::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.3);
  border-radius: 3px;
}

#sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--accent-purple);
}

#sidebar #profile {
  text-align: center;
  padding: 2rem 1rem;
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

#sidebar #profile img {
  margin: 0 auto;
  width: 80px;
  height: 80px;
  border-radius: 0;
  border: 2px solid var(--accent-purple);
  margin-bottom: 1rem;
  object-fit: cover;
}

#sidebar #profile h5 {
  color: var(--text-light);
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

#sidebar #profile p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

#sidebar ul {
  list-style: none;
  padding: 1rem 0;
}

#sidebar ul li {
  display: flex;
  align-items: center;
  transition: var(--transition-smooth);
  cursor: pointer;
  height: 50px;
  padding: 0 1.5rem;
  margin: 0.25rem 0;
  color: var(--text-muted);
}

#sidebar ul li:hover {
  background: rgba(139, 92, 246, 0.1);
  color: var(--text-light) !important;
  border-left: 3px solid var(--accent-purple);
}

#sidebar ul li i {
  font-size: 1.25rem;
  width: 24px;
}

#sidebar ul li a {
  color: inherit;
  margin-left: 1rem;
  display: inline-block;
  width: 100%;
  text-decoration: none;
  font-weight: 500;
}

#sidebar ul li a:hover {
  text-decoration: none;
  color: var(--text-light) !important;
}

#sidebar ul li.active {
  background: rgba(139, 92, 246, 0.15);
  border-left: 3px solid var(--accent-purple);
  color: var(--text-light);
}

#sidebar ul li.active a {
  font-weight: 600;
  color: var(--text-light);
}

#sidebar ul li.active i {
  color: var(--accent-purple);
}

/* Content Area */
#content {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  padding-left: 320px;
  padding-top: 80px;
  overflow-y: scroll;
  background: var(--primary-dark);
}

#content::-webkit-scrollbar {
  width: 8px;
}

#content::-webkit-scrollbar-track {
  background: rgba(139, 92, 246, 0.05);
}

#content::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.3);
  border-radius: 4px;
}

#content::-webkit-scrollbar-thumb:hover {
  background: var(--accent-purple);
}

#content .container-fluid {
  position: relative;
  padding: 2rem;
}

#content.dash_content .card {
  margin-bottom: 1.5rem;
}

#content.dash_content .card th {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  color: var(--text-light);
}

/* Video Container */
#videos_container .video_holder {
  border: 2px solid rgba(139, 92, 246, 0.3);
  position: relative;
  margin-bottom: 1.5rem;
  border-radius: 0;
  overflow: hidden;
  transition: var(--transition-smooth);
}

#videos_container .video_holder:hover {
  border-color: var(--accent-purple);
  box-shadow: var(--shadow-glow);
}

#videos_container .video_holder .absolute {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  width: 85px;
  height: 85px;
}

#videos_container #videos_div .list-group-item {
  display: flex;
  align-items: center;
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 0;
  padding: 1rem;
  margin-bottom: 0.5rem;
  position: relative;
  cursor: pointer;
}

#videos_container #videos_div .list-group-item.active {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--accent-purple);
  color: var(--text-light);
}

#videos_container #videos_div .list-group-item:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--accent-purple);
}

#videos_container #videos_div .list-group-item img {
  width: 28px;
  height: 28px;
}

#videos_container #videos_div .list-group-item h5,
#videos_container #videos_div .list-group-item h6 {
  margin-bottom: 0;
  margin-left: 1rem;
  color: var(--text-light);
}

#videos_container #video_div video {
  max-width: 100%;
  border-radius: 0;
}

/* Video Player Modal */
#player {
  position: fixed;
  top: 0;
  left: 0;
  background: rgba(13, 13, 26, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 20;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
  transform: translateY(60px);
  opacity: 0;
  visibility: hidden;
}

#player.active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

#player #video_closer {
  width: 40px;
  height: 40px;
  margin-bottom: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
  transition: var(--transition-smooth);
}

#player #video_closer:hover {
  color: var(--accent-purple);
  transform: scale(1.1);
}

#player iframe {
  border: 2px solid var(--accent-purple);
  border-radius: 0;
  width: 1280px;
  max-width: 90%;
  height: 720px;
  max-height: 80vh;
}

/* Modules Content */
.modules_content .list-group-item {
  border: none;
  background: rgba(139, 92, 246, 0.05);
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 0 !important;
  cursor: pointer;
  padding: 1rem;
  color: var(--text-light);
  transition: var(--transition-smooth);
}

.modules_content .list-group-item:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: var(--accent-purple);
}

/* Question Card */
.question_card .question {
  display: flex;
  margin-bottom: 1rem;
  padding: 1rem;
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 0;
}

.question_card .question h5 {
  margin-bottom: 0;
  margin-right: 1.5rem;
  color: var(--text-light);
  font-family: 'Playfair Display', serif;
}

.question_card .question .number {
  min-width: 75px;
  font-weight: 600;
  color: var(--accent-purple);
}

.question_card .question .options {
  display: flex;
  gap: 0.5rem;
}

.question_card .question .option {
  border: 1px solid rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.05);
  width: 32px;
  height: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 0;
  cursor: pointer;
  transition: var(--transition-smooth);
  color: var(--text-light);
  font-weight: 500;
}

.question_card .question .option:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--accent-purple);
}

.question_card .question .option.correct {
  background: var(--gradient-brand);
  border-color: var(--accent-purple);
  color: var(--text-light);
}

/* Loader */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  background: var(--primary-dark);
  width: 100%;
  height: 100vh;
  z-index: 11;
  display: flex;
  justify-content: center;
  align-items: center;
}

.loader img {
  max-width: 350px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

/* Tables */
table tr,
table td {
  border: hidden !important;
  padding: 0.75rem;
  color: var(--text-light);
}

table th {
  color: var(--accent-purple);
  font-weight: 600;
  border-bottom: 2px solid rgba(139, 92, 246, 0.3) !important;
}

table td {
  font-family: 'Outfit', sans-serif;
  font-size: 0.9em;
}

table tbody tr {
  border-bottom: 1px solid rgba(139, 92, 246, 0.1) !important;
  transition: var(--transition-smooth);
}

table tbody tr:hover {
  background: rgba(139, 92, 246, 0.05);
}

table td.d-flex .btn {
  font-size: 0.85em;
  padding: 0.5rem 1rem;
  margin-right: 0.5rem;
}

/* Modal */
.modal-title {
  font-family: 'Playfair Display', serif;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
}

.modal-content {
  background: var(--secondary-dark);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 0;
}

.modal-header {
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

.modal-footer {
  border-top: 1px solid rgba(139, 92, 246, 0.2);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(139, 92, 246, 0.05);
}

::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-purple);
}

/* Borders */
.left_border {
  border: none;
  border-left: 2px solid var(--accent-purple);
}

/* Background Cover */
.cover {
  background-color: var(--primary-dark) !important;
}

/* Responsive */
@media only screen and (max-width: 768px) {
  #top_bar {
    display: flex;
  }

  #top_bar img {
    width: 30px;
    height: 30px;
    margin-left: 1rem;
  }

  #top_bar h3 {
    margin-bottom: 0;
    font-size: 1rem;
  }

  #sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow-soft);
  }

  #sidebar.active {
    transform: translate(0);
  }

  #content {
    padding-left: 0;
    padding-top: 80px;
  }

  #content .container-fluid {
    padding: 1rem;
  }

  #player iframe {
    width: 95%;
    height: auto;
    aspect-ratio: 16/9;
  }
}

@media only screen and (min-width: 768px) {
  #content,
  #sidebar {
    padding-top: 20px;
  }

  #menu_btn {
    display: none;
  }

  #top_bar {
    display: none;
  }
}

/* Utilities */
.shadow {
  box-shadow: var(--shadow-soft) !important;
}

.text-center {
  text-align: center;
}

.mt-4 {
  margin-top: 1.5rem;
}

.mb-4 {
  margin-bottom: 1.5rem;
}
