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

body {
  background-color: #000000;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding: 0;
}

.container {
  width: 100%;
  height: 100vh;
    display: flex;
    align-items: center;
  justify-content: center;
  padding: 20px;
}

.logo {
  max-width: 100%;
  max-height: 100vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.main-nav {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
}

.main-nav {
  margin-left: 16px;
  background-color: #00d4ff;
  color: #000;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
}

.nav-link:hover {
  background-color: #00a8cc;
  transform: scale(1.05);
}

/* Root CSS variables for theming */
:root {
  --primary-color: #00FFFF;
  --accent-color: #F700FF;
  --error-color: #FF1493;
  --dark-bg: #0A0A0A;
  --darker-bg: #000000;
  --header-bg: #0D3D4D;
}

/* Calendar Styles */
.calendar-container {
  width: 100%;
  min-height: 100vh;
  padding: 15px 20px;
  background: linear-gradient(135deg, var(--dark-bg) 0%, var(--darker-bg) 100%);
  position: relative;
  transition: background 0.3s ease;
  display: flex;
  flex-direction: column;
}

.logo-top-left {
  position: absolute;
  top: 30px;
  left: 30px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.calendar-logo {
  height: 60px;
  width: auto;

/* Center breadcrumb under the large icon on calendar page */
.logo-top-left {
  text-align: center;
}
/* Removed visible Home link; tooltip on logo handles labeling */
  cursor: pointer;
  transition: transform 0.3s ease;
}

.calendar-logo:hover {
  transform: scale(1.1);
}

.calendar-banner {
  width: 100%;
  margin-bottom: 20px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 255, 255, 0.2);
}

.banner-image {
  width: 100%;
  height: auto;
  max-height: 100px;
  object-fit: cover;
  object-position: bottom;
  display: block;
}

.calendar-header-right {
  position: absolute;
  top: 30px;
  right: 30px;
  z-index: 10;
  text-align: right;
}

.calendar-header-right h1 {
  color: var(--primary-color);
  font-size: 2rem;
  margin: 0;
  text-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
  transition: color 0.3s ease;
}

.calendar-header {
  text-align: center;
  margin-bottom: 15px;
}

.calendar-header h1 {
  color: var(--primary-color);
  font-size: 2rem;
  margin-bottom: 5px;
  text-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
  transition: color 0.3s ease;
}

.breadcrumb {
  color: #888;
  font-size: 0.95rem;
}

.breadcrumb a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.calendar-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.nav-btn {
  background-color: var(--primary-color);
  color: #000;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}

.nav-btn:hover {
  background-color: var(--accent-color);
  transform: scale(1.05);
}

.week-range {
  color: var(--primary-color);
  font-size: 1.5rem;
  min-width: 200px;
  text-align: center;
  transition: color 0.3s ease;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
  margin-bottom: 15px;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  flex: 1;
  min-height: 0;
}

.day-column {
  background-color: var(--dark-bg);
  border: 2px solid var(--primary-color);
  border-radius: 10px;
  overflow: hidden;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s ease;
}

.day-header {
  background-color: var(--header-bg);
  padding: 12px 10px;
  text-align: center;
  border-bottom: 2px solid var(--primary-color);
  transition: background-color 0.3s ease, border-color 0.3s ease;
  flex-shrink: 0;
}

.day-name {
  color: var(--primary-color);
  font-weight: bold;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.day-number {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: bold;
  margin: 3px 0;
}

.day-month {
  color: #888;
  font-size: 0.75rem;
}

.day-events {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.event-item {
  background: linear-gradient(135deg, #1a1a1a 0%, #1f1f1f 100%);
  border-left: 4px solid var(--primary-color);
  padding: 10px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.event-item:hover {
  background: linear-gradient(135deg, #3a3a3a 0%, #2f2f2f 100%);
  border-left-color: var(--accent-color);
  transform: translateX(5px);
}

.event-item.all-day {
  border-left-color: var(--error-color);
  background: linear-gradient(135deg, #3a1a1a 0%, #2a0a0a 100%);
}

.event-time {
  color: #888;
  font-size: 0.75rem;
  margin-bottom: 3px;
  line-height: 1.2;
}

.event-title {
  color: #ffffff;
  font-weight: bold;
  margin-bottom: 3px;
  word-wrap: break-word;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.event-location {
  color: var(--primary-color);
  font-size: 0.7rem;
  margin-bottom: 2px;
  transition: color 0.3s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-attendees {
  color: var(--accent-color);
  font-size: 0.7rem;
  transition: color 0.3s ease;
}

.no-events {
  color: #666;
  text-align: center;
  padding: 20px 10px;
  font-style: italic;
}

.spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
  color: var(--primary-color);
  font-size: 1.2rem;
}

.spinner p {
  animation: pulse 1.5s infinite;
}

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

.error-message {
  background-color: #3a1a1a;
  border: 2px solid var(--error-color);
  color: #ff9999;
  padding: 20px;
  border-radius: 5px;
  margin-bottom: 20px;
  text-align: center;
  transition: border-color 0.3s ease;
}

.calendar-footer {
  text-align: center;
  color: #666;
  font-size: 0.9rem;
  margin-top: 10px;
  flex-shrink: 0;
}

/* Fullscreen Mode (F11) */
:fullscreen .logo-top-left,
:fullscreen .calendar-banner,
:fullscreen .calendar-header-right,
:fullscreen .breadcrumb,
:fullscreen .calendar-footer {
  display: none;
}

:fullscreen .calendar-container {
  padding: 6px 2px;
  margin: 0;
  height: 100vh;
  overflow: hidden;
}

:fullscreen .calendar-header {
  margin-bottom: 4px;
  flex-shrink: 0;
}

:fullscreen .calendar-header h1 {
  font-size: 1.2rem;
  margin-bottom: 1px;
  line-height: 1;
}


:fullscreen .calendar-controls {
  margin-bottom: 6px;
  gap: 12px;
  flex-shrink: 0;
  min-height: fit-content;
}

:fullscreen .week-range {
  font-size: 1rem;
  min-width: auto;
}

:fullscreen .nav-btn {
  padding: 6px 12px;
  font-size: 0.85rem;
}

:fullscreen .calendar-grid {
  margin-bottom: 0;
  gap: 3px;
  flex: 1;
  min-height: 0;
  margin-left: 0;
  margin-right: 0;
  max-width: 1600px;
}

:fullscreen .day-column {
  min-height: 0;
  max-height: none;
}

:fullscreen .day-header {
  padding: 8px 6px;
  flex-shrink: 0;
}

:fullscreen .day-name {
  font-size: 0.8rem;
  line-height: 1;
}

:fullscreen .day-number {
  font-size: 1.2rem;
  margin: 2px 0;
  line-height: 1;
}

:fullscreen .day-month {
  font-size: 0.65rem;
  line-height: 1;
}

:fullscreen .day-events {
  padding: 8px;
  gap: 5px;
  min-height: 0;
}

:fullscreen .event-item {
  padding: 6px;
  font-size: 0.7rem;
}
:-webkit-full-screen .event-item {
  padding: 6px;
  font-size: 0.7rem;
}
:-moz-full-screen .event-item {
  padding: 6px;
  font-size: 0.7rem;
}

:fullscreen .event-time {
  font-size: 0.65rem;
  margin-bottom: 1px;
  line-height: 1.1;
}
:-webkit-full-screen .event-time {
  font-size: 0.65rem;
  margin-bottom: 1px;
  line-height: 1.1;
}
:-moz-full-screen .event-time {
  font-size: 0.65rem;
  margin-bottom: 1px;
  line-height: 1.1;
}

:fullscreen .event-title {
  margin-bottom: 1px;
  -webkit-line-clamp: 2;
  line-height: 1.1;
}
:-webkit-full-screen .event-title {
  margin-bottom: 1px;
  -webkit-line-clamp: 2;
  line-height: 1.1;
}
:-moz-full-screen .event-title {
  margin-bottom: 1px;
  -webkit-line-clamp: 2;
  line-height: 1.1;
}

:fullscreen .event-location {
  font-size: 0.6rem;
  margin-bottom: 1px;
  line-height: 1;
}
:-webkit-full-screen .event-item {
  padding: 6px;
  font-size: 0.7rem;
}
:-moz-full-screen .event-item {
  padding: 6px;
  font-size: 0.7rem;
}

:fullscreen .event-time {
  font-size: 0.65rem;
  margin-bottom: 1px;
  line-height: 1.1;
}
:-webkit-full-screen .event-time {
  font-size: 0.65rem;
  margin-bottom: 1px;
  line-height: 1.1;
}
:-moz-full-screen .event-time {
  font-size: 0.65rem;
  margin-bottom: 1px;
  line-height: 1.1;
}

:fullscreen .event-title {
  margin-bottom: 1px;
  -webkit-line-clamp: 2;
  line-height: 1.1;
}
:-webkit-full-screen .event-title {
  margin-bottom: 1px;
  -webkit-line-clamp: 2;
  line-height: 1.1;
}
:-moz-full-screen .event-title {
  margin-bottom: 1px;
  -webkit-line-clamp: 2;
  line-height: 1.1;
}

:fullscreen .event-location {
  font-size: 0.6rem;
  margin-bottom: 1px;
  line-height: 1;
}
:-webkit-full-screen .event-location {
  font-size: 0.6rem;
  margin-bottom: 1px;
  line-height: 1;
}
:-moz-full-screen .event-location {
  font-size: 0.6rem;
  margin-bottom: 1px;
  line-height: 1;
}

:fullscreen .event-attendees {
  font-size: 0.6rem;
  line-height: 1;
}
:-webkit-full-screen .event-attendees {
  font-size: 0.6rem;
  line-height: 1;
}
:-moz-full-screen .event-attendees {
  font-size: 0.6rem;
  line-height: 1;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .calendar-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 992px) {
  .calendar-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .calendar-header h1 {
    font-size: 1.5rem;
  }

  /* Adjust header positioning for tablets */
  .calendar-header-right {
    top: 20px;
    right: 20px;
  }

  .calendar-header-right h1 {
    font-size: 1.5rem;
  }

  .calendar-controls {
    gap: 15px;
  }

  .week-range {
    font-size: 1.2rem;
    min-width: auto;
  }

  .calendar-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .day-column {
    min-height: 300px;
  }

  .banner-image {
    max-height: none;
    min-height: 100px;
  }
}

@media (max-width: 480px) {
  .calendar-grid {
    grid-template-columns: 1fr;
  }

  .calendar-header h1 {
    font-size: 1.5rem;
  }

  /* Change header to static positioning on mobile to prevent overlap */
  .calendar-header-right {
    position: static;
    text-align: center;
    margin: 15px 0;
  }

  .calendar-header-right h1 {
    font-size: 1.3rem;
  }

  .calendar-controls {
    flex-direction: column;
    gap: 10px;
  }

  .nav-btn {
    padding: 8px 15px;
    font-size: 0.9rem;
  }

  .week-range {
    font-size: 1rem;
  }

  .banner-image {
    max-height: none;
    min-height: 150px;
  }
}
