/* --- Keyframes for the horizontal "pop" animation --- */


@keyframes pop-right {
    0%,
    100% {
      transform: translateX(0);
    }
    50% {
      transform: translateX(4px); /* Moves right */
    }
  }
  
  @keyframes pop-left {
    0%,
    100% {
      transform: translateX(0);
    }
    50% {
      transform: translateX(-4px); /* Moves left */
    }
  }

@keyframes fill-progress {
  from {
    width: 0%;
  }
  to {
    width: 100%;
  }
}

@keyframes glow {
  from {
    box-shadow: 0 0 2px #f75049, 0 0 5px #f75049, 0 0 7px #f75049;
  }
  to {
    box-shadow: 0 0 5px #f75049, 0 0 10px #f75049, 0 0 15px #f75049;
  }
}
  
  :root {
    font-size: 12.8px;
    --primary-color: #f75049;
    --text-color: #ffffff;
    --background-color: #222325;
    --primary-color-translucent: #f750497f;
  }
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    background-color: var(--background-color);
    font-family: "Rajdhani", sans-serif;
    color: var(--text-color);
    min-height: 100vh;
    background-image: url("/assets/images/background.png");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    cursor: url('/cursors/arrow.cur'), auto;
  }

  /* List styling */
  ul, ol {
    list-style-position: inside;
  }

/* Pointer (links, buttons, etc.) */
a, button, [role="button"], .cyber-switch, .logo-container, .logo-icon, .switch-label,
.custom-dropdown, .dropdown-selected, .dropdown-option,
.cyber-radio, .cyber-checkbox, .tab-header, .cyber-slider, input[type="range"],
.custom-datepicker, .datepicker-calendar, .calendar-nav, .calendar-days, .calendar-days > *,
.cyber-file-uploader,
/* Hamburger menu */
.hamburger-menu, .close-navbar-btn,
/* Modal classes */
.modal-overlay, .modal-content, .modal-header, .close-btn, .modal-body, .modal-footer {
  cursor: url('/cursors/link.cur'), pointer !important;
}

/* Text selection */
input[type="text"], textarea, [contenteditable="true"], .description,
p, h1, h2, h3, h4, h5, h6, span, label, li, td, th, 
.main-title, .subtitle, .interface-text, .interface-title,
.small-text, .page-text, .bottom-left-text, .bottom-center-text, .footer-bottom-text,
.top-right-text, .vertical-line-text, .copyright-section, .copyright-text,
figcaption, caption,
.cyber-textarea, .cyber-input, .cyber-label,
.component-title, .section-title, .section-subtitle, .card-title, .card-status, .card-affiliation,
.feature-title, .modal-title, .title-section,
.cyber-description, .feature-description, .description-section {
  cursor: url('/cursors/beam.cur'), text !important;
}

/* Move (draggable, etc.) */
[draggable="true"], .move-cursor {
  cursor: url('/cursors/move.cur'), move;
}

/* Help (help icon, etc.) */
.help-cursor, [aria-label*="help"] {
  cursor: url('/cursors/help.cur'), help;
}

/* Not allowed (disabled, etc.) */
[disabled], .not-allowed-cursor {
  cursor: url('/cursors/no.cur'), not-allowed;
}

/* Crosshair (for selection, etc.) */
.crosshair-cursor {
  cursor: url('/cursors/cross.cur'), crosshair;
}
  
  svg,
  img {
    max-width: 100%;
    height: auto;
    display: block;
  }
  
  .main-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
    padding: clamp(0.8rem, 1.6vw, 1.6rem);
    position: relative;
  }
  
  .left-border,
  .right-border {
    flex-shrink: 0;
    width: 20px; /* Widened to allow space for the Matrix effect */
    height: 100%;
    position: fixed;
    top: 0;
    z-index: -1;
  }
  
  .left-border {
    left: 0;
  }
  
  .right-border {
    right: 0;
  }
  
  .left-border .glitch-border-svg,
  .right-border .glitch-border-svg {
    height: 100%;
    overflow: visible;
  }
  
  .matrix-canvas {
    display: none;
    width: 100%;
    height: 100%;
  }
  
  .content-wrapper {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 0 clamp(0.8rem, 1.6vw, 1.6rem);
  }
  
  .header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: clamp(0.8rem, 3.2vw, 1.6rem);
    width: 100%;
  }
  .header-left,
  .header-right {
    display: flex;
    flex-direction: column;
  }
  .header-left {
    flex-basis: 50%;
    align-items: flex-start;
  }
  .header-right {
    flex-basis: 40%;
    align-items: flex-end;
  }
  .logo-section {
    display: flex;
    gap: clamp(0.4rem, 1.2vw, 0.8rem);
    align-items: center;
  }
  .logo-container {
    position: relative;
    width: clamp(24px, 3.2vw, 31px);
    height: clamp(24px, 3.2vw, 31px);
  }
  .logo-icon {
    position: absolute;
    width: 30%;
    height: 30%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
  .interface-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  .interface-title {
    font-size: clamp(0.64rem, 1.2vw, 0.8rem);
    color: var(--primary-color);
    font-weight: 500;
  }
  .red-line,
  .fade-line {
    height: 1.6px;
    background-color: var(--primary-color);
  }
  .red-line {
    width: 40%;
  }
  .fade-line {
    width: 100%;
    opacity: 0.5;
    margin-top: 3.2px;
  }
  .controls-section {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-top: 2rem; /* Added to move buttons down */
  }
  .page-info {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    color: var(--primary-color);
  }
  .page-number {
    font-size: clamp(1rem, 2.4vw, 1.4rem);
    font-weight: 500;
  }
  .page-text {
    font-size: clamp(0.72rem, 1.2vw, 0.88rem);
    font-weight: 500;
  }
  .switch-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .switch-label {
    font-size: clamp(0.72rem, 1.2vw, 0.88rem);
    font-weight: 500;
    color: var(--primary-color);
    text-transform: uppercase;
  }
  .cyber-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
    background-color: transparent;
    border: 1px solid var(--primary-color-translucent);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .cyber-switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }
  .switch-handle {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background-color: var(--primary-color-translucent);
    transition: 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .handle-bar {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60%;
    height: 2px;
    background-color: var(--background-color);
    transform: translate(-50%, -50%);
  }
  .cyber-switch input:checked + .switch-handle {
    transform: translateX(22px);
    background-color: var(--primary-color);
  }
  .page-progress-bar {
    width: 100%;
    max-width: 250px;
    height: 8px;
    border: 1px solid var(--primary-color);
    margin-top: clamp(0.4rem, 0.8vw, 0.8rem);
    position: relative;
    background-color: transparent;
    padding: 1.5px;
  }
  .progress-inside {
    width: 0%; /* Start at 0% and animate to 100% */
    height: 100%;
    background-color: var(--primary-color);
    animation: fill-progress 2s ease-in-out forwards, glow 1.5s infinite alternate;
  }
  .header-line-wrapper {
    width: 100%;
    margin-top: clamp(0.8rem, 1.6vw, 1.6rem);
  }
  .header-line path {
    stroke-width: 1.6;
  }
  .small-text,
  .copyright-text,
  .bottom-left-text,
  .bottom-center-text {
    font-size: clamp(0.48rem, 0.8vw, 0.6rem);
    line-height: 1.5;
    text-transform: uppercase;
    color: var(--primary-color-translucent);
    font-weight: 600;
  }
  .main-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    margin-top: clamp(1.6rem, 4.8vw, 3.2rem);
  }
  .title-section {
    display: flex;
    align-items: baseline;
    gap: 1.2rem;
    flex-wrap: wrap;
  }
  .main-title {
    font-size: clamp(1.6rem, 4vw, 2.8rem);
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.1;
  }
  .subtitle {
    font-size: clamp(1.2rem, 3.2vw, 2rem);
    font-weight: 500;
    color: var(--primary-color-translucent);
    line-height: 1.1;
  }
  .description {
    font-size: clamp(0.8rem, 1.6vw, 1rem);
    line-height: 1.6;
    color: var(--primary-color);
    width: clamp(70%, 56vw, 640px);
    margin-top: clamp(0.8rem, 1.6vw, 1.2rem);
  }
  .middle-border-wrapper {
    width: 100%;
    margin: clamp(1.6rem, 4vw, 3.2rem) 0;
  }
  .vertical-line-text {
    display: none;
  }
  .footer-section {
    width: 100%;
    margin-top: auto;
    padding-top: clamp(1.6rem, 4vw, 3.2rem);
  }
  .copyright-section {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
  }
  .copyright-icon {
    width: clamp(12px, 1.6vw, 16px);
    height: clamp(6.4px, 1.2vw, 8px);
  }
  .footer-line {
    width: 100%;
    margin: 0.8rem 0;
  }
  .bottom-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 0.8rem;
    flex-wrap: wrap;
  }
  .bottom-left-text {
    flex-basis: 20%;
  }
  .bottom-center-text {
    flex-basis: 75%;
    text-align: right;
  }
  .footer-bottom-text {
    font-size: clamp(0.57rem, 1.14vw, 0.76rem);
    line-height: 1.4;
    color: var(--primary-color);
    text-align: center;
    margin-top: clamp(-2.0rem, -2.4vw, -2.2rem);
    margin-left: clamp(1.2rem, 2.4vw, 1.8rem);
    opacity: 0.8;
  }
  .top-right-text {
    font-size: clamp(0.3rem, 0.6vw, 0.4rem);
    margin-top: clamp(-0.8rem, -1.2vw, -1rem);
    margin-right: clamp(0rem, 0vw, 0rem);
    opacity: 0.7;
    align-self: flex-end;
    text-align: left;
    max-width: 300px;
  }
  @media (max-width: 614px) {
    .main-container {
      flex-direction: column;
    }
    .header {
      flex-direction: column;
      align-items: flex-start;
      gap: 1.2rem;
    }
    .header-left,
    .header-right {
      flex-basis: auto;
      width: 100%;
      align-items: flex-start;
    }
    .header-right {
      align-items: flex-start;
    }
    .controls-section {
      width: 100%;
      justify-content: space-between;
    }
    .page-progress-bar {
      max-width: none;
    }
    .description {
      width: 100%;
    }
    .left-border,
    .right-border {
      display: none;
    }
    .bottom-info {
      flex-direction: column;
      align-items: flex-start;
    }
    .bottom-center-text {
      text-align: left;
    }
  }