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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #0a0e1a;
  color: #ffffff;
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Circuit Board Background Animation */
.circuit-board-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.1;
  pointer-events: none;
}

.circuit-svg {
  width: 100%;
  height: 100%;
}

.circuit-path {
  fill: none;
  stroke: #3b82f6;
  stroke-width: 2;
  stroke-dasharray: 10, 5;
  animation: circuit-flow 3s linear infinite;
}

.circuit-node {
  fill: #8b5cf6;
  animation: node-pulse 2s ease-in-out infinite;
}

.data-pulse {
  fill: #06b6d4;
  filter: drop-shadow(0 0 5px #06b6d4);
}

@keyframes circuit-flow {
  0% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: 15;
  }
}

@keyframes node-pulse {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.5);
  }
}

/* Floating Robotic Components */
.floating-components {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.component {
  position: absolute;
  font-size: 2rem;
  color: rgba(59, 130, 246, 0.3);
  animation-duration: 20s;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}

.gear-1 {
  top: 20%;
  left: 10%;
  animation: float-rotate 15s infinite linear;
}
.gear-2 {
  top: 60%;
  right: 15%;
  animation: float-rotate-reverse 18s infinite linear;
}
.chip-1 {
  top: 40%;
  left: 80%;
  animation: float-pulse 12s infinite ease-in-out;
}
.robot-1 {
  top: 70%;
  left: 20%;
  animation: float-bounce 10s infinite ease-in-out;
}
.cpu-1 {
  top: 30%;
  right: 30%;
  animation: float-glow 8s infinite ease-in-out;
}
.satellite-1 {
  top: 80%;
  right: 60%;
  animation: float-orbit 25s infinite linear;
}

@keyframes float-rotate {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-30px) rotate(180deg);
  }
  100% {
    transform: translateY(0px) rotate(360deg);
  }
}

@keyframes float-rotate-reverse {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(-180deg);
  }
  100% {
    transform: translateY(0px) rotate(-360deg);
  }
}

@keyframes float-pulse {
  0%,
  100% {
    transform: scale(1) translateY(0px);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.2) translateY(-15px);
    opacity: 0.7;
  }
}

@keyframes float-bounce {
  0%,
  100% {
    transform: translateY(0px);
  }
  25% {
    transform: translateY(-20px);
  }
  50% {
    transform: translateY(-10px);
  }
  75% {
    transform: translateY(-30px);
  }
}

@keyframes float-glow {
  0%,
  100% {
    filter: drop-shadow(0 0 5px rgba(59, 130, 246, 0.3));
    transform: translateY(0px);
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.8));
    transform: translateY(-25px);
  }
}

@keyframes float-orbit {
  0% {
    transform: rotate(0deg) translateX(50px) rotate(0deg);
  }
  100% {
    transform: rotate(360deg) translateX(50px) rotate(-360deg);
  }
}

/* Matrix Code Rain Effect */
.matrix-rain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.1;
}

#matrixCanvas {
  width: 100%;
  height: 100%;
}

/* Scanning Laser Effect */
.laser-scanner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.3;
}

.laser-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #00ff00, transparent);
  animation: laser-scan 4s ease-in-out infinite;
  box-shadow: 0 0 10px #00ff00;
}

.scan-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.grid-line {
  position: absolute;
  background: rgba(0, 255, 0, 0.1);
  animation: grid-pulse 3s ease-in-out infinite;
}

.grid-line.horizontal {
  width: 100%;
  height: 1px;
}
.grid-line.vertical {
  width: 1px;
  height: 100%;
}
.grid-line:nth-child(1) {
  top: 20%;
}
.grid-line:nth-child(2) {
  top: 50%;
}
.grid-line:nth-child(3) {
  top: 80%;
}
.grid-line:nth-child(4) {
  left: 25%;
}
.grid-line:nth-child(5) {
  left: 50%;
}
.grid-line:nth-child(6) {
  left: 75%;
}

@keyframes laser-scan {
  0% {
    top: 0;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    top: 100%;
    opacity: 0;
  }
}

@keyframes grid-pulse {
  0%,
  100% {
    opacity: 0.1;
  }
  50% {
    opacity: 0.3;
  }
}

/* Holographic UI Elements */
.holographic-ui {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.2;
}

.holo-circle {
  position: absolute;
  border: 2px solid #00ffff;
  border-radius: 50%;
  animation: holo-rotate 10s linear infinite;
}

.holo-1 {
  top: 20%;
  right: 20%;
  width: 100px;
  height: 100px;
  border-style: dashed;
}

.holo-2 {
  bottom: 30%;
  left: 15%;
  width: 150px;
  height: 150px;
  border-style: dotted;
  animation-direction: reverse;
}

.holo-hexagon {
  position: absolute;
  top: 50%;
  right: 10%;
  width: 80px;
  height: 80px;
  border: 2px solid #ff00ff;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  animation: holo-pulse 3s ease-in-out infinite;
}

.holo-data-stream {
  position: absolute;
  top: 40%;
  left: 5%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.data-bit {
  color: #00ff00;
  font-family: "Courier New", monospace;
  font-size: 1.2rem;
  animation: data-flow 2s ease-in-out infinite;
}

.data-bit:nth-child(2) {
  animation-delay: 0.5s;
}
.data-bit:nth-child(3) {
  animation-delay: 1s;
}
.data-bit:nth-child(4) {
  animation-delay: 1.5s;
}

@keyframes data-flow {
  0%,
  100% {
    opacity: 0.3;
    transform: translateY(0px);
  }
  50% {
    opacity: 1;
    transform: translateY(-10px);
  }
}

@keyframes holo-rotate {
  0% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(1.1);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}

@keyframes holo-pulse {
  0%,
  100% {
    opacity: 0.2;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.2);
  }
}

/* Robotic Eye Scanner */
.robotic-eye {
  position: fixed;
  top: 10%;
  right: 5%;
  width: 120px;
  height: 120px;
  z-index: -1;
  pointer-events: none;
  opacity: 0.4;
}

.eye-outer {
  width: 100%;
  height: 100%;
  border: 3px solid #ff6b35;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: eye-blink 5s ease-in-out infinite;
}

.eye-inner {
  width: 70%;
  height: 70%;
  border: 2px solid #ff6b35;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.1), transparent);
}

.eye-pupil {
  width: 40%;
  height: 40%;
  background: #ff6b35;
  border-radius: 50%;
  position: relative;
  animation: pupil-track 8s ease-in-out infinite;
}

.scan-beam {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200px;
  height: 2px;
  background: linear-gradient(90deg, #ff6b35, transparent);
  transform-origin: left center;
  animation: beam-scan 3s linear infinite;
}

@keyframes eye-blink {
  0%,
  90%,
  100% {
    transform: scaleY(1);
  }
  95% {
    transform: scaleY(0.1);
  }
}

@keyframes pupil-track {
  0%,
  100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(10px, -10px);
  }
  50% {
    transform: translate(-10px, 0);
  }
  75% {
    transform: translate(5px, 10px);
  }
}

@keyframes beam-scan {
  0% {
    transform: rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: rotate(360deg);
    opacity: 0;
  }
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(10, 14, 26, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
  z-index: 1000;
  padding: 1rem 0;
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  flex-direction: column;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: bold;
  background: linear-gradient(45deg, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-subtitle {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: -0.25rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: #3b82f6;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(45deg, #3b82f6, #8b5cf6);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  background: rgba(10, 14, 26, 0.98);
  backdrop-filter: blur(10px);
  padding: 1rem;
  z-index: 999;
  flex-direction: column;
  gap: 1rem;
}

.mobile-nav-link {
  color: #e2e8f0;
  text-decoration: none;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

/* Calendar Section */
.calendar-section {
  padding: 8rem 0 6rem; /* Adjusted padding for fixed navbar */
  background: #0a0e1a;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.calendar-section h2 {
  text-align: center;
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 3rem;
  color: #f1f5f9;
}

.calendar-container {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 1rem;
  padding: 2rem;
  width: 100%;
  max-width: 900px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.calendar-header button {
  background: none;
  border: none;
  color: #3b82f6;
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.calendar-header button:hover {
  color: #8b5cf6;
}

.calendar-header h3 {
  font-size: 1.8rem;
  color: #f1f5f9;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-weight: bold;
  color: #94a3b8;
  margin-bottom: 1rem;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
  min-height: 520px; /* Ensures enough space for 6 rows of days */
}

.calendar-day {
  background: rgba(59, 130, 246, 0.1);
  border-radius: 0.5rem;
  padding: 0.75rem 0.5rem;
  text-align: center;
  min-height: 80px; /* Each day cell maintains its height */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  font-size: 1.1rem;
  color: white;
  /* Removed font-size and color as day numbers are no longer displayed */
  position: relative;
  overflow: hidden;
}

.calendar-day.current-month {
  background: rgba(59, 130, 246, 0.2);
}

.calendar-day.today {
  border: 2px solid #8b5cf6;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

.calendar-day.has-event {
  cursor: pointer;
  background: rgba(139, 92, 246, 0.3);
  transition: background 0.3s ease;
}

.calendar-day.has-event:hover {
  background: rgba(139, 92, 246, 0.5);
}

.event-dot {
  width: 8px;
  height: 8px;
  background-color: #00ff00; /* Green dot for events */
  border-radius: 50%;
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
}

.event-list {
  margin-top: 2rem;
  width: 100%;
  max-width: 900px;
  min-height: 200px; /* Ensures this container maintains height */
  display: flex; /* Use flexbox to manage children */
  flex-direction: column;
}

.event-list h3 {
  font-size: 1.5rem;
  color: #f1f5f9;
  margin-bottom: 1rem;
}

.event-item {
  background: rgba(30, 41, 59, 0.3);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 0.75rem;
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0; /* Prevent individual items from shrinking */
}

.event-item h4 {
  font-size: 1.2rem;
  color: #3b82f6;
}

.event-item p {
  color: #cbd5e1;
  font-size: 0.95rem;
}

.event-item-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: #94a3b8;
}

.no-events-message {
  text-align: center;
  padding: 1rem;
  color: #94a3b8;
  font-style: italic;
  transition: opacity 0.3s ease-in-out, max-height 0.3s ease-in-out, padding 0.3s ease-in-out;
  opacity: 1;
  max-height: 100px; /* Max height when visible */
  overflow: hidden;
  flex-shrink: 0;
  flex-grow: 0;
}

.no-events-message.hidden {
  opacity: 0;
  max-height: 0;
  padding: 0;
  pointer-events: none; /* Disable interaction when hidden */
}

/* Footer */
.footer {
  background: #0f172a;
  border-top: 1px solid rgba(59, 130, 246, 0.2);
  padding: 3rem 0 1rem;
  width: 100%;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
  color: #f1f5f9;
  margin-bottom: 1rem;
}

.footer-section p {
  color: #94a3b8;
  margin-bottom: 1rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  background: rgba(59, 130, 246, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3b82f6;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: #3b82f6;
  color: white;
  transform: translateY(-3px);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section ul li a:hover {
  color: #3b82f6;
}

.footer-section ul li i {
  margin-right: 0.5rem;
  color: #3b82f6;
}

.footer-bottom {
  border-top: 1px solid rgba(59, 130, 246, 0.2);
  padding-top: 2rem;
  text-align: center;
  color: #64748b;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
  }
  .calendar-header h3 {
    font-size: 1.5rem;
  }
  .calendar-day {
    min-height: 60px; /* Adjusted for smaller screens */
  }
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.5rem;
  }
  .calendar-day {
    min-height: 50px; /* Further adjustment for very small screens */
  }
  .calendar-header button {
    font-size: 1.2rem;
  }
}

html {
  scroll-behavior: smooth;
}

/* Reduced animations for low-performance devices */
.reduced-animations * {
  animation-duration: 0.1s !important;
  transition-duration: 0.1s !important;
}

.reduced-animations .matrix-rain,
.reduced-animations .floating-components,
.reduced-animations .laser-scanner {
  display: none !important;
}
