/* CSS Variables for Light/Dark Mode */
:root {
  --primary-bg: #ffffff;
  --dark-bg: #1a1a1a;
  --card-bg-light: #f8f9fa;
  --card-bg-dark: #2d2d2d;
  --text-light: #333333;
  --text-dark: #f8f9fa;
  --accent-color: #ff6a00;
  --accent-dark: #ff8c42;
  --border-light: #dee2e6;
  --border-dark: #444444;
  --current-shadow: rgba(0,0,0,0.1);
}

[data-bs-theme="light"] {
  --current-bg: var(--primary-bg);
  --current-card-bg: var(--card-bg-light);
  --current-text: var(--text-light);
  --current-accent: var(--accent-color);
  --current-border: var(--border-light);
  --current-shadow: rgba(0, 0, 0, 0.1);
}

[data-bs-theme="dark"] {
  --current-bg: var(--dark-bg);
  --current-card-bg: var(--card-bg-dark);
  --current-text: var(--text-dark);
  --current-accent: var(--accent-dark);
  --current-border: var(--border-dark);
  --current-shadow: rgba(0, 0, 0, 0.3);
}

/* Global Styles */
* {
  transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease;
}

body {
  background-color: var(--current-bg);
  min-height: 100vh;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  color: var(--current-text);
  transition: all 0.5s ease;
  padding-top: 70px;
}

/* Content Area Styles */
.content-area {
  margin-top: 80px;
  padding: 40px 20px;
  color: var(--current-text);
  text-align: center;
  min-height: calc(100vh - 200px);
}

.main-title {
  font-size: 3.5rem;
  font-weight: bold;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px var(--current-shadow);
  background: linear-gradient(45deg, var(--current-accent), #ff8c00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sub-title {
  font-size: 1.5rem;
  margin-bottom: 40px;
  opacity: 0.9;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.feature-card {
  background: var(--current-card-bg);
  border-radius: 15px;
  padding: 30px;
  border: 1px solid var(--current-border);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 5px 15px var(--current-shadow);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 106, 0, 0.1), transparent);
  transition: left 0.5s ease;
}

.feature-card:hover::before {
  left: 100%;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px var(--current-shadow);
  border-color: var(--current-accent);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  color: var(--current-accent);
  transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.2) rotate(5deg);
}

.feature-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--current-accent);
}

.feature-description {
  font-size: 1rem;
  line-height: 1.6;
  opacity: 0.9;
}

.welcome-message {
  background: var(--current-card-bg);
  border-radius: 20px;
  padding: 40px;
  margin: 40px auto;
  max-width: 800px;
  border: 1px solid var(--current-border);
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px var(--current-shadow);
}

.welcome-message:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 35px var(--current-shadow);
}

.action-buttons {
  margin-top: 40px;
}

.btn-custom {
  background: linear-gradient(135deg, var(--current-accent), #e55a00);
  border: none;
  color: white;
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: bold;
  margin: 0 10px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-custom::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s ease;
}

.btn-custom:hover::before {
  left: 100%;
}

.btn-custom:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px var(--current-shadow);
  color: white;
}

/* Theme Toggle Button */
.theme-toggle-top {
  position: fixed;
  top: 100px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--current-card-bg);
  border: 1px solid var(--current-border);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--current-accent);
  z-index: 999;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px var(--current-shadow);
}

.theme-toggle-top:hover {
  transform: scale(1.1) rotate(30deg);
  box-shadow: 0 6px 20px var(--current-shadow);
}

.theme-changing {
  transform: scale(1.2) rotate(180deg);
}

/* Top Menu Bar Styles - Enhanced Version */
.top-menu-bar {
  background: linear-gradient(135deg, #FF6A00, #FF6A00, #FF6A00, #FF6A00);
  padding: 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.top-menu-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.top-menu-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  min-height: 70px;
}

/* Logo Styles */
.top-menu-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: white;
  font-weight: bold;
  font-size: 1.4rem;
  padding: 10px 0;
  transition: all 0.3s ease;
}

.top-menu-logo:hover {
  transform: translateY(-2px);
  color: #ff9800;
}

.logo-icon-top {
  margin-right: 12px;
  font-size: 2rem;
  color: white;
  text-shadow: 0 2px 4px rgba(255, 152, 0, 0.3);
}

.logo-text-top {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-main-top {
  font-size: 1.6rem;
  font-weight: 700;
  background: linear-gradient(45deg, #00FF00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-sub-top {
  font-size: 0.85rem;
  opacity: 0.9;
  font-weight: 600;
  color: #e3f2fd;
}

/* Main Menu Items */
.top-menu-items {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.top-menu-item {
  position: relative;
  margin: 0 5px;
}

.top-menu-link {
  display: flex;
  align-items: center;
  padding: 18px 20px;
  color: #e3f2fd;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border-radius: 8px;
  margin: 0 2px;
  position: relative;
  overflow: hidden;
}

.top-menu-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: linear-gradient(45deg, #ff9800, #ffc107);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.top-menu-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transform: translateY(-2px);
}

.top-menu-link:hover::before {
  width: 80%;
}

.top-menu-link.active {
  background: rgba(255, 152, 0, 0.2);
  color: #ffc107;
}

.top-menu-link.active::before {
  width: 80%;
}

.top-menu-link i {
  margin-right: 10px;
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.top-menu-link:hover i {
  transform: scale(1.1);
}

/* Submenu Styles */
.top-submenu {
  position: absolute;
  top: 100%;
  left: 0;
  background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
  min-width: 250px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  border-radius: 0 0 12px 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.4s ease;
  z-index: 1001;
  border-top: 3px solid #ff9800;
  overflow: hidden;
}

.top-menu-item:hover .top-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.top-submenu-link {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: #333;
  text-decoration: none;
  border-bottom: 1px solid #e0e0e0;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.top-submenu-link::before {
  content: '';
  position: absolute;
  left: -100%;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 152, 0, 0.1), transparent);
  transition: left 0.5s ease;
}

.top-submenu-link:hover::before {
  left: 100%;
}

.top-submenu-link:hover {
  background-color: #fff8e1;
  color: #e65100;
  padding-left: 25px;
  transform: translateX(5px);
}

.top-submenu-link i {
  margin-right: 12px;
  color: #ff9800;
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.top-submenu-link:hover i {
  color: #e65100;
  transform: scale(1.1);
}

/* Mobile Menu Toggle */
.top-menu-toggle {
  display: none;
  background: linear-gradient(135deg, #ff9800, #f57c00);
  border: none;
  color: white;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 12px 15px;
  border-radius: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

.top-menu-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
  background: linear-gradient(135deg, #f57c00, #ef6c00);
}

.top-menu-toggle.active {
  background: linear-gradient(135deg, #f57c00, #ef6c00);
  transform: rotate(90deg);
}

/* Scroll to Top Button */
.scroll-to-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #ff9800, #f57c00);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
  transition: all 0.3s ease;
  z-index: 9999;
}

.scroll-to-top-btn:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 8px 25px rgba(255, 152, 0, 0.6);
  background: linear-gradient(135deg, #f57c00, #e65100);
}

.scroll-to-top-btn.show {
  display: flex;
  animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
  background: transparent;
  border: 2px solid rgba(255,255,255,0.3);
  color: white;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-left: 15px;
}

.dark-mode-toggle:hover {
  background: rgba(255,255,255,0.1);
  transform: scale(1.1);
}

/* Mobile Responsive Styles */
@media (max-width: 992px) {
  .top-menu-container {
    padding: 0 15px;
  }
  
  .top-menu-link {
    padding: 15px 18px;
    font-size: 0.95rem;
  }
  
  .top-menu-link i {
    font-size: 1.1rem;
    margin-right: 8px;
  }
}

@media (max-width: 768px) {
  .top-menu-bar {
    position: fixed;
    width: 100%;
  }
  
  .top-menu-nav {
    min-height: 60px;
  }
  
  .top-menu-toggle {
    display: block;
  }

  .top-menu-items {
    position: fixed;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    flex-direction: column;
    display: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border-top: 3px solid #ff9800;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    padding: 10px 0;
  }

  .top-menu-items.active {
    display: flex;
    animation: slideDown 0.4s ease forwards;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .top-menu-item {
    width: 100%;
    margin: 0;
  }

  .top-menu-link {
    padding: 18px 25px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    border-radius: 0;
    margin: 0;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
  }

  .top-menu-link::before {
    display: none;
  }

  .top-menu-link:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: none;
    padding-left: 30px;
    color: #ffc107;
  }

  .top-submenu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: linear-gradient(135deg, rgba(26, 35, 126, 0.9), rgba(40, 53, 147, 0.9));
    border-radius: 0;
    border-top: none;
    display: none;
    width: 100%;
    min-width: auto;
  }

  .top-menu-item.active .top-submenu {
    display: block;
    animation: fadeIn 0.3s ease;
  }

  @keyframes fadeIn {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 500px; }
  }

  .top-submenu-link {
    color: rgba(255,255,255,0.9);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-left: 50px;
    background: transparent;
    transition: all 0.3s ease;
  }

  .top-submenu-link:hover {
    background-color: rgba(255,255,255,0.1);
    color: #ffc107;
    padding-left: 55px;
    background: rgba(255, 152, 0, 0.2);
  }

  .top-submenu-link i {
    color: #ffc107;
  }

  .scroll-to-top-btn {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
  
  .logo-main-top {
    font-size: 1.4rem;
  }
  
  .logo-icon-top {
    font-size: 1.6rem;
  }

  .dark-mode-toggle {
    width: 40px;
    height: 40px;
    margin-left: 10px;
  }

  /* Content responsive adjustments */
  .content-area {
    margin-top: 70px;
    padding: 20px 15px;
  }
  
  .main-title {
    font-size: 2.5rem;
  }
  
  .sub-title {
    font-size: 1.2rem;
  }
  
  .action-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
  }
  
  .btn-custom {
    margin: 5px 0;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .welcome-message {
    padding: 25px;
    margin: 20px auto;
  }

  .theme-toggle-top {
    top: 90px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
}

@media (max-width: 480px) {
  .top-menu-container {
    padding: 0 10px;
  }
  
  .logo-text-top {
    display: none;
  }
  
  .logo-icon-top {
    margin-right: 0;
    font-size: 1.8rem;
  }
  
  .top-menu-link {
    padding: 16px 20px;
    font-size: 0.9rem;
  }
  
  .top-submenu-link {
    padding-left: 40px;
    font-size: 0.9rem;
  }

  .main-title {
    font-size: 2rem;
  }

  .feature-card {
    padding: 20px;
  }

  .theme-toggle-top {
    top: 80px;
    right: 15px;
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  body {
    padding-top: 60px;
  }
}

/* Animation for menu items */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.top-menu-items.active .top-menu-item {
  animation: fadeInDown 0.4s ease forwards;
}

.top-menu-items.active .top-menu-item:nth-child(1) { animation-delay: 0.1s; }
.top-menu-items.active .top-menu-item:nth-child(2) { animation-delay: 0.15s; }
.top-menu-items.active .top-menu-item:nth-child(3) { animation-delay: 0.2s; }
.top-menu-items.active .top-menu-item:nth-child(4) { animation-delay: 0.25s; }
.top-menu-items.active .top-menu-item:nth-child(5) { animation-delay: 0.3s; }
.top-menu-items.active .top-menu-item:nth-child(6) { animation-delay: 0.35s; }

/* Footer Styles */
/* Common Footer Styles with Background */
.common-footer {
    background: var(--current-card-bg);
    border-top: 1px solid var(--current-border);
    padding: 25px 0 15px;
    margin-top: 50px;
    color: var(--current-text);
    box-shadow: 0 -5px 15px var(--current-shadow);
    position: relative;
    z-index: 100;
}

.common-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--current-accent), #ff8c00);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-copyright {
    opacity: 0.8;
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.6;
}

.footer-copyright p {
    margin-bottom: 8px;
}

.footer-tagline {
    color: var(--current-accent);
    font-weight: bold;
    font-size: 1rem;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--current-border);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--current-text);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid var(--current-border);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-link:hover {
    background: var(--current-accent);
    color: white;
    border-color: var(--current-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px var(--current-shadow);
}

/* Responsive Footer */
@media (max-width: 768px) {
    .common-footer {
        padding: 20px 0 10px;
        margin-top: 30px;
    }
    
    .footer-links {
        gap: 10px;
    }
    
    .footer-link {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .footer-copyright {
        font-size: 0.85rem;
    }
}