/* General Navbar Styles */
.navbar {
  font-family: "Poppins", sans-serif;
  background: linear-gradient(to right, #6a0572, #282f86);
  color: #fff !important;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition:
    background-color 0.3s ease,
    box-shadow 0.3s ease;
  height: 60px;
  z-index: 1001;
  padding-left: 15px;
  padding-right: 15px;
}

@media (min-width: 768px) {
  .navbar-nav {
    margin-left: 200px; /* Increase this value to move the links further right */
    gap: 50px; /* Space between links */
  }
}

/* Navbar Brand */
.navbar-brand {
  color: #fff !important;
  font-weight: bold;
  transition: color 0.3s ease;
  margin-left: 60px;
  text-align: center; /* Ensure centered text for portrait mode */
}

/* Navbar Links */
.navbar-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.navbar-nav .nav-link {
  color: #fff !important;
  font-size: 16px;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Dropdown Menu */
.navbar-nav .dropdown-menu {
  background-color: #282e85;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  border: none;
  text-align: left;
  margin-top: 10px;
}

.navbar-nav .dropdown-item {
  color: #fff !important;
  transition: background-color 0.3s ease;
}

.navbar-nav .dropdown-item:hover {
  background-color: #5a0460 !important;
}

/* Navbar Toggler and Sidebar Toggle */
.navbar-toggler,
#sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 40px;
  border: 2px solid rgba(128, 128, 128, 0.3);
  border-radius: 5px;
  padding: 7px;
  box-sizing: border-box;
  margin: 0;
  background: transparent;
  color: #fff;
}

.navbar-toggler i,
#sidebar-toggle i {
  font-size: 1.2rem;
  line-height: 1;
  display: inline-block;
  margin: 0;
  padding: 0;
}

.navbar-toggler:hover,
#sidebar-toggle:hover {
  background-color: #555;
  transform: translateY(-2px);
}

#sidebar-toggle {
  position: absolute;
  top: 10px;
  left: 20px;
}

/* Right-Side Auth Buttons */
.auth-buttons .btn-primary {
  background-color: #0ed53d !important;
  color: #fff !important;
  border: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.auth-buttons .btn-secondary {
  background-color: #007bff !important;
  color: #fff !important;
  border: none;
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
  .navbar-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    font-size: 1.5rem;
  }

  .navbar-toggler {
    position: absolute;
    right: 10px;
  }

  #sidebar-toggle {
    position: absolute;
    left: 10px;
  }

  .navbar-collapse {
    background: linear-gradient(to right, #6a0572, #282f86);
    padding: 0;
    margin: 0;
    width: 100vw !important;
    left: 0;
    position: absolute;
    top: 100%;
    z-index: 1050;
    max-height: 90vh;
    overflow-y: auto;
  }

  .navbar-nav {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 8px;
    padding-left: 10px;
    margin: 0;
  }

  .navbar-nav .nav-link {
    width: 100%;
    padding: 8px 15px;
    text-align: left;
    box-sizing: border-box;
  }

  .auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 10px;
    padding-left: 10px;
  }
}

@media (min-width: 768px) {
  .navbar-brand {
    margin-left: 60px;
  }

  .navbar-nav {
    margin-left: 120px;
    gap: 50px;
  }

  #sidebar-toggle {
    display: block !important;
  }
}

/* General Dropdown Fix for Landscape Mode */
@media (max-height: 500px) and (orientation: landscape) {
  .navbar-collapse {
    width: 100vw !important; /* Ensure full width in landscape */
    left: 0;
    position: absolute;
    top: 100%;
    z-index: 1050;
    background: linear-gradient(
      to right,
      #6a0572,
      #282f86
    ); /* Match the navbar */
    max-height: 90vh; /* Prevent overflow */
    overflow-y: auto; /* Add vertical scroll for long content */
    padding: 0;
    margin: 0;
  }

  .navbar-nav {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding-left: 8px;
    gap: 2px;
    margin: 0;
  }

  .navbar-nav .nav-link {
    width: 100%;
    padding: 8px 15px;
    text-align: left;
    box-sizing: border-box;
  }

  .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100vw; /* Full width for dropdown */
    background: #282e85;
    z-index: 1002;
    padding: 10px 0;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  }

  .dropdown-menu.show {
    display: block !important;
    visibility: visible !important;
  }
}

/* Portrait View Adjustment */
@media screen and (orientation: portrait) {
  .navbar .navbar-brand {
    margin: 0 auto !important;
    text-align: center;
  }
}

/* THEMES START HERE */

/* Dark Theme */
html.dark-theme .navbar,
html.dark-theme .navbar-collapse {
  background: #1e1e2e !important;
  color: #00cccc !important;
}

html.dark-theme .navbar-brand,
html.dark-theme .nav-link {
  color: #00cccc !important;
}

/* Apply dark theme to togglers as well */
html.dark-theme .navbar-toggler,
html.dark-theme #sidebar-toggle {
  border-color: #00cccc !important;
  color: #00cccc !important;
}

/* Dark Theme Fixes */
html.dark-theme .navbar-nav .dropdown-menu {
  background: #1e1e2e !important;
  color: #00cccc !important;
  border: 1px solid #2d2d3a !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
}

html.dark-theme .navbar-nav .dropdown-item {
  color: #00cccc !important;
  transition: background-color 0.3s ease;
}

html.dark-theme .navbar-nav .dropdown-item:hover {
  background-color: #2d2d3a !important;
  color: #00cccc !important;
}

html.dark-theme .navbar-nav .nav-link:focus,
html.dark-theme .navbar-nav .nav-link:active {
  color: #00cccc !important;
}

/* Yellow Theme */
html.yellow-theme .navbar,
html.yellow-theme .navbar-collapse {
  background: #000000 !important;
  color: #f6e05e !important;
}

html.yellow-theme .navbar-brand,
html.yellow-theme .nav-link {
  color: #f6e05e !important;
}

/* Apply yellow theme to togglers as well */
html.yellow-theme .navbar-toggler,
html.yellow-theme #sidebar-toggle {
  border-color: #f6e05e !important;
  color: #f6e05e !important;
}

/* Yellow Theme Fixes */
html.yellow-theme .navbar-nav .dropdown-menu {
  background: #000000 !important;
  color: #f6e05e !important;
  border: 1px solid #444444 !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
}

html.yellow-theme .navbar-nav .dropdown-item {
  color: #f6e05e !important;
  transition: background-color 0.3s ease;
}

html.yellow-theme .navbar-nav .dropdown-item:hover {
  background-color: #333333 !important;
  color: #f6e05e !important;
}

html.yellow-theme .navbar-nav .nav-link:focus,
html.yellow-theme .navbar-nav .nav-link:active {
  color: #f6e05e !important;
}

/* Light Theme */
html.light-theme .navbar,
html.light-theme .navbar-collapse {
  background: #f0f0f0 !important;
  color: #000000 !important;
}

html.light-theme .navbar-brand,
html.light-theme .nav-link {
  color: #000000 !important;
}

/* Apply light theme to togglers as well */
html.light-theme .navbar-toggler,
html.light-theme #sidebar-toggle {
  border-color: #000000 !important;
  color: #000000 !important;
}

/* Light Theme Fixes */
html.light-theme .navbar-nav .dropdown-menu {
  background: #ffffff !important;
  color: #000000 !important;
  border: 1px solid #000000 !important;
}

html.light-theme .navbar-nav .dropdown-item {
  color: #000000 !important;
}

html.light-theme .navbar-nav .dropdown-item:hover {
  background-color: #f8f9fa !important;
  color: #000000 !important;
}

html.light-theme .navbar-nav .nav-link:focus,
html.light-theme .navbar-nav .nav-link:active {
  color: #000000 !important;
}

/*MODAL STARTS HERE*/

/* General Modal Styling */
.modal-content {
  background-color: #2c2c54 !important; /* Darker, vibrant background color */
  color: #f0f0f5; /* Light gray text for contrast */
  border-radius: 10px; /* More pronounced card-like edges */
  box-shadow: 0px 6px 20px rgba(209, 6, 199, 0.3) !important; /* Slightly stronger shadow */
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  backdrop-filter: blur(10px); /* Light frosted glass effect */
  -webkit-backdrop-filter: blur(10px); /* Safari support */
  animation: fadeIn 0.3s ease-in-out; /* Smooth fade-in animation */
  border: none; /* Remove default border */
}

/* Modal Header - Centered */
.modal-header {
  color: #ffffff; /* White text */
  padding: 15px; /* Consistent padding */
  font-size: 18px; /* Keep font size consistent */
  font-weight: bold;
  text-align: center;
  text-transform: uppercase;
  border-radius: 10px 10px 0 0; /* Rounded corners at the top */
  border: none; /* Remove bottom border */
}

/* THE CLOSE/CROSS BUTTON */
.modal-header .btn-close {
  position: absolute !important; /* Position the close button independently */
  right: 20px !important; /* Adjust this value to move it further to the right */
  top: 20px !important; /* Adjust this value to keep it aligned vertically */
  padding: 0.5rem !important; /* Adjust padding as needed */
  z-index: 1; /* Ensure it's on top */
  filter: invert(1); /* Make the 'X' white */
  background-color: transparent; /* Transparent background */
  border: none; /* No borders */
}

/* Modal Title */
.modal-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: #ffffff; /* Bright white text for clarity */
  text-align: center;
  width: 100%;
}

/* Form Styling */
.modal-body {
  background-color: #2c2c54 !important; /* Darker modal body background */
  color: #ffffff; /* White text for contrast */
  padding: 20px;
  font-size: 16px;
  border: none;
  display: flex;
  flex-direction: column;
  gap: 10px; /* Adds spacing between paragraphs */
}

.modal-body .form-label {
  font-weight: 400;
  font-size: 1rem;
  color: #ffffff; /* White text for contrast */
}

.modal-body .form-control {
  background-color: rgba(
    255,
    255,
    255,
    0.1
  ); /* Light translucent input background */
  color: #ffffff; /* White text for inputs */
  border: 1px solid rgba(255, 255, 255, 0.3); /* Light border */
  border-radius: 6px;
  padding: 10px;
  font-size: 1rem;
  backdrop-filter: blur(5px); /* Slight blur effect for input fields */
}

.modal-body .form-control:focus {
  background-color: rgba(
    255,
    255,
    255,
    0.2
  ); /* Slightly lighter background on focus */
  border-color: #ffda79; /* Golden-yellow border on focus */
}

/* Modal Footer Styling */
.modal-footer {
  padding: 10px;
  display: flex;
  justify-content: flex-end;
  border-radius: 0 0 10px 10px;
  border: none;
}

/* Modal Button Styling - Apply btn-custom styling */
.modal-footer .btn {
  background: rgba(
    255,
    255,
    255,
    0.1
  ) !important; /* Lighten the background for better visibility */
  color: #ffffff !important; /* White text color */
  border-radius: 0.25rem !important; /* Adjusted border-radius */
  padding: 8px 15px !important; /* Adjusted padding for better sizing */
  cursor: pointer !important; /* Pointer cursor */
  transition:
    background-color 0.3s ease,
    color 0.3s ease !important; /* Smooth transition effects */
}

/* Hover effect for modal button */
.modal-footer .btn:hover {
  color: #ffda79 !important; /* Golden text on hover for contrast */
}

/* Success and Error Messages */
.alert {
  font-size: 0.85rem;
  padding: 8px;
  margin-top: 8px;
  border-radius: 5px;
  color: #ffffff;
  background-color: #2c2c3e; /* Solid background for alerts */
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.alert-success {
  background-color: #28a745; /* Solid green for success */
  color: #ffffff;
}

.alert-danger {
  background-color: #dc3545; /* Solid red for errors */
  color: #ffffff;
}

/* Consistent styles for both navbar and modal buttons */

/* Login Button - Primary (Green) */
.btn-primary {
  background-color: #0ed53d !important; /* Vibrant green */
  color: #fff !important; /* White text */
  border: none !important; /* Remove any border */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); /* Soft shadow */
}

.btn-primary:hover {
  background-color: #218838 !important; /* Slightly darker green on hover */
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3); /* Deeper shadow on hover */
  transform: translateY(-1px); /* Subtle hover lift */
}

/* Register button styles (Secondary) */
/* Register Button - Secondary (Blue) */
.btn-secondary {
  background-color: #007bff !important; /* Vibrant blue */
  color: #fff !important; /* White text */
  border: none !important; /* Remove any border */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); /* Soft shadow */
}

.btn-secondary:hover {
  background-color: #0056b3 !important; /* Slightly darker blue on hover */
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3); /* Deeper shadow on hover */
  transform: translateY(-1px); /* Subtle hover lift */
}

/* Mobile view styling (below 768px) FOR LOGIN/REGISTER BUTTONS */

/* THESE WILL ALSO AFFECT THE INFO AND EDIT BET MODAL BUTTONS!!! */
@media (max-width: 768px) {
  /* Auth buttons inside the navbar toggler */
  .auth-buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px; /* Add consistent spacing between the buttons */
    width: 100%; /* Full width */
    padding: 0 10px; /* Add padding on both sides for equal spacing */
  }

  /* Login button styling */
  .btn-primary {
    padding: 1.5px; /* Slimmer button */
    width: 100%; /* Full width */
    text-align: center;
    flex-grow: 1; /* Ensure it stretches to take more space */
  }

  /* Register button styling */
  .btn-secondary {
    padding: 1.5px; /* Slimmer button */
    width: 100%; /* Full width */
    text-align: center;
    flex-grow: 1; /* Ensure it stretches to take more space */
    margin-bottom: 15px; /* Add extra space below the Sign Up button */
  }
}
