/* General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, html {
  height: 100%;
  font-family: 'Arial', sans-serif;
  color: #fff;
}

/* Background Video */
.background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#bg-video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  z-index: -2;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* Add a dark overlay for contrast */
  z-index: -1;
}

/* Login Form Container */
.login-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.15); /* Transparent form */
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px); /* Frosted glass effect */
  width: 90%;
  max-width: 400px;
  text-align: center;
}

/* Mobile optimizations for login container */
@media (max-width: 480px) {
  .login-container {
    padding: 1.5rem;
    width: 95%;
  }
}

.logo img {
  width: 250px;
  margin-bottom: 1rem;
  max-width: 80%; /* Ensures responsiveness */
}

.input-group {
  margin-bottom: 1rem;
}

input {
  width: 100%;
  padding: 0.75rem;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.8);
  color: #333;
  text-align: center;
}

input:focus {
  outline: none;
  border: 1px solid #fff;
  box-shadow: 0 0 10px rgba(78, 84, 200, 0.5); /* Glowing effect */
  transition: 0.3s;
}

.btn-primary {
  width: 100%;
  padding: 0.75rem;
  background: #4e54c8;
  color: white;
  border: none;
  border-radius: 25px; /* Rounded button */
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
}

.btn-primary:hover {
  background: #3b43a1;
  transform: scale(1.05); /* Slight scaling on hover */
}

/* Additional calendar mobile fixes */
@media (max-width: 767px) {
  /* Ensure no horizontal overflow on mobile */
  body {
    overflow-x: hidden !important;
  }
  
  /* Container adjustments for mobile */
  .container {
    padding: 10px !important;
    width: 100% !important;
    overflow-x: hidden;
  }
  
  /* Calendar wrapper fixes */
  .glass-card {
    padding: 10px !important;
    margin: 0 !important;
    overflow: hidden !important;
  }
  
  /* Calendar specific mobile optimizations */
  #calendar {
    width: 100% !important;
    max-width: 100% !important;
    padding: 3px !important;
    overflow: hidden !important;
    font-size: 10px !important;
  }
  
  /* FullCalendar mobile fixes */
  .fc {
    max-width: 100% !important;
    width: 100% !important;
    overflow: hidden !important;
  }
  
  .fc .fc-view-harness {
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
  
  .fc .fc-scrollgrid {
    width: 100% !important;
    min-width: 100% !important;
  }
  
  .fc-scrollgrid-sync-table {
    width: 100% !important;
  }
  
  /* Force calendar columns to fit screen width */
  .fc .fc-col-header-cell,
  .fc .fc-daygrid-day {
    min-width: 0 !important;
    width: 14.28% !important;
    padding: 2px 1px !important;
  }
  
  .fc .fc-daygrid-day-frame {
    padding: 1px !important;
    min-height: 50px !important;
  }
  
  /* Compact toolbar for mobile */
  .fc .fc-toolbar {
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 5px !important;
  }
  
  .fc .fc-toolbar-title {
    font-size: 12px !important;
    width: 100%;
    text-align: center;
  }
  
  .fc .fc-button {
    padding: 4px 6px !important;
    font-size: 10px !important;
  }
  
  /* Compact day numbers and events */
  .fc .fc-daygrid-day-number {
    font-size: 9px !important;
    padding: 1px !important;
  }
  
  .fc .fc-event {
    font-size: 7px !important;
    padding: 0px 2px !important;
    margin: 0.5px 0 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .fc .fc-col-header-cell {
    font-size: 8px !important;
    padding: 3px 1px !important;
  }
  
  /* Remove any potential margins that cause overflow */
  .fc-theme-standard td,
  .fc-theme-standard th {
    border-left-width: 0 !important;
    border-right-width: 0 !important;
  }
  
  .fc-theme-standard td:first-child,
  .fc-theme-standard th:first-child {
    border-left-width: 1px !important;
  }
  
  .fc-theme-standard td:last-child,
  .fc-theme-standard th:last-child {
    border-right-width: 1px !important;
  }
}

/* Tablet optimizations */
@media (min-width: 768px) and (max-width: 1023px) {
  #calendar {
    padding: 8px;
    font-size: 12px;
  }
  
  .fc .fc-toolbar-title {
    font-size: 1.3em;
  }
  
  .fc .fc-button {
    padding: 5px 8px;
    font-size: 0.9em;
  }
}
