/* ========== GLOBAL STYLES ========== */
:root {
  --primary-color: #0d0775;
  --secondary-color: #3a00e0;
  --light-bg: #f8f9fa;
  --white: #ffffff;
}

/* ========== HEADER STYLES ========== */
.header {
  background: linear-gradient(145deg, var(--primary-color), var(--secondary-color));
  box-shadow: 0 2px 15px rgba(0,0,0,0.1);
  height: 60px;
  transition: all 0.3s ease;
}

.logo:hover img {
  transform: rotateY(10deg);
  transition: transform 0.3s ease;
}

.nav-link {
  position: relative;
  transition: all 0.2s ease;
}

.nav-link:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

/* ========== DROPDOWN STYLES ========== */
.dropdown-menu {
  border-radius: 8px;
  margin-top: 5px;
}

.dropdown-item {
  border-radius: 6px;
  margin: 2px 5px;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--white) !important;
  transform: translateX(5px);
}

/* ========== CARD STYLES ========== */
.card-3d, .stat-card-3d {
  border: none;
  border-radius: 12px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  background: var(--white);
  overflow: hidden;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.card-3d:hover, .stat-card-3d:hover {
  transform: translateY(-5px) rotateX(3deg);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.card-3d::before, .stat-card-3d::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.card-image-wrapper {
  padding: 20px;
  text-align: center;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.card-img-top {
  max-height: 100px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.card-3d:hover .card-img-top {
  transform: scale(1.1);
}

.card-body {
  padding: 20px;
  background: var(--white);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--primary-color);
}

/* ========== BUTTON STYLES ========== */
.btn-primary {
  background-color: var(--primary-color);
  border: none;
  border-radius: 50px;
  padding: 8px 15px;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
}

/* ========== SPECIAL EFFECTS ========== */
.highlight-border {
  position: relative;
}

.highlight-border::after {
  content: '';
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  border: 3px solid #ffcc00;
  border-radius: 18px;
  animation: pulse 1.5s infinite;
  pointer-events: none;
}

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

/* ========== FORM ELEMENTS ========== */
#searchInput {
  border-radius: 50px;
  border: 2px solid var(--primary-color);
  padding: 10px 20px;
  width: 300px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* ========== CONTENT VIEWER ========== */
.content-viewer-3d {
  perspective: 1000px;
  min-height: 100vh;
  background: linear-gradient(145deg, var(--light-bg), var(--white));
}

.content-3d-body {
  transform-style: preserve-3d;
  padding: 2rem;
  background: var(--white);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  min-height: 70vh;
  transition: transform 0.5s ease;
}

/* .content-viewer-3d:hover .content-3d-body {
  transform: rotateY(2deg) rotateX(1deg);
} */

.content-title-3d {
  color: #2c3e50;
  font-weight: 600;
  position: relative;
  padding-bottom: 10px;
}

.content-title-3d:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 30%;
  width: 40%;
  height: 3px;
  background: linear-gradient(90deg, #0d6efd, #6c757d);
  border-radius: 3px;
}

/* ========== UTILITY CLASSES ========== */
.welcome-card {
  background: linear-gradient(135deg, var(--light-bg), var(--white));
  border-radius: 12px;
}

.topic-item {
  border-radius: 8px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.topic-item:hover {
  background-color: var(--light-bg);
  border-left: 3px solid #0d6efd;
  transform: translateX(5px);
}

.empty-state {
  background-color: var(--light-bg);
  border-radius: 12px;
}

.avatar-placeholder {
  font-weight: bold;
  color: var(--primary-color);
}

/* ========== RESPONSIVE STYLES ========== */
@media (max-width: 991.98px) {
  .header-nav {
    display: none;
  }

  .navbar-toggler {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .card-3d {
    margin-bottom: 20px;
  }

  .content-title-3d {
    font-size: 1.5rem;
  }

  .content-3d-body {
    padding: 1rem;
  }
}

@media (min-width: 992px) {
  .navbar-toggler,
  #mobileMenu {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .d-flex.justify-content-between,
  .btn-group {
    flex-direction: column;
    gap: 1rem;
  }

  .btn {
    width: 100%;
  }

  #searchInput {
    width: 100%;
  }
}