html,
body {
  height: 100%;
}

body {
  font-family: sans-serif;
  margin: 0;
  background-color: #000;
  color: rgb(1, 113, 1);
  display: flex;
  flex-direction: column;
}

#fullscreen-matrix-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

header {
  position: relative;
  text-align: left;
  padding: 20px;
  background-color: transparent;
  border-bottom: none;
  color: white;
}

.logo {
  position: relative;
  font-family: "Orbitron", sans-serif;
  font-weight: 400;
  font-size: 8em;
  color: transparent;
  -webkit-text-stroke: 1px #eee;
  text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #00ffde, 0 0 20px #00ffde,
    0 0 25px #00ffde, 0 0 30px #00ffde, 0 0 35px #00ffde;
}

.logo span {
  display: inline-block;
  color: transparent;
  -webkit-text-stroke: 1px #0f0;
  transition: text-shadow 0.3s ease-in-out;
}

.logo .glow {
  text-shadow: 0 0 10px #0f0, 0 0 20px #0f0;
}

.sub-header {
  background: rgba(0, 255, 0, 0.1);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 2px solid rgba(5, 114, 5, 0.304);
  padding: 0px 0px 0px 32px;
  text-align: left;
  width: 100%;
  margin: 0 0 0;
  box-sizing: border-box;
  color: #0f0;
  font-style: italic;
  clip-path: polygon(2% 0, 98% 0, 100% 100%, 0 100%);
}

.container {
  display: flex;
  padding: 2rem;
  gap: 2rem;
  flex-grow: 1;
  /* overflow: hidden; */ /* prevent content from overflowing */
}

.left-panel {
  width: 200px;
  background: rgba(0, 255, 0, 0.1);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(5, 114, 5, 0.304);
  border-radius: 0px;
  padding: 0rem;
  text-align: left;
  flex-shrink: 0; /* prevent panel from shrinking */
}

.side-nav a {
  display: block;
  margin: 1rem 0;
  text-decoration: none;
  color: #0f0;
  font-family: "VT323", monospace;
  font-size: 1.5rem;
  padding: 0.5rem;
  border-radius: 5px;
  transition: background-color 0.3s, text-shadow 0.3s;
}

.side-nav a:hover {
  background-color: rgba(0, 255, 0, 0.2);
  text-shadow: 0 0 5px #0f0;
}

main {
  overflow-y: auto;
}

main a {
  color: #0f0;
  text-decoration: none;
  border-bottom: 1px dotted #0f0;
  transition: color 0.3s, text-shadow 0.3s;
}

main h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Orbitron", sans-serif;
  color: rgb(30, 139, 30);
  text-shadow: 0 0 10px rgb(45, 144, 45);
}
main p {
  font-family: "Orbitron", sans-serif;
  line-height: 1.2rem;
  font-size: 1.1rem;
}

main a:hover {
  color: #fff;
  text-shadow: 0 0 5px #0f0;
}

.hidden {
  display: none;
}

#live-coding-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  z-index: -1;
}

#live-coding-editor {
  position: relative;
  width: 100%;
  height: 400px;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: 1px solid black;
  padding: 4px;
  outline: none;
  box-sizing: border-box;
  font-family: "Courier New", monospace; /* Fixed-size font */
  font-size: 16px; /* Character size */
  line-height: 20px; /* Ensuring enough height per line */
  resize: none; /* Prevent resizing */
  white-space: pre; /* Preserve whitespace */
}

.live-coding-main {
  position: relative;
  height: 100%;
  flex-grow: 1;
}

#live-coding-controls {
  position: fixed;
  top: 16px;
  right: 16px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 10;
  font-family: "VT323", monospace;
}

#live-coding-controls .control-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

#run-button {
  padding: 8px 20px;
  font-size: 1.2em;
  background-color: rgba(0, 255, 0, 0.2);
  border: 1px solid rgba(0, 255, 0, 0.5);
  color: #0f0;
  font-family: "VT323", monospace;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s, text-shadow 0.3s;
  width: 100%;
}

#run-button:hover {
  background-color: rgba(0, 255, 0, 0.4);
  text-shadow: 0 0 5px #0f0;
}

.btn {
  padding: 8px 20px;
  font-size: 1.2em;
  background-color: rgba(0, 255, 0, 0.2);
  border: 1px solid rgba(0, 255, 0, 0.5);
  color: #0f0;
  font-family: "VT323", monospace;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s, text-shadow 0.3s;
}

.btn:hover {
  background-color: rgba(0, 255, 0, 0.4);
  text-shadow: 0 0 5px #0f0;
}

select {
  padding: 8px 10px;
  font-size: 1.2em;
  background-color: rgba(0, 255, 0, 0.2);
  border: 1px solid rgba(0, 255, 0, 0.5);
  color: #0f0;
  font-family: "VT323", monospace;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s, text-shadow 0.3s;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2300FF00%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 10px top 50%;
  background-size: 0.65em auto;
  padding-right: 30px; /* Make space for the arrow */
}

select:hover {
  background-color: rgba(0, 255, 0, 0.4);
}

.editor-transparent {
  background-color: transparent !important;
}

/* Modal styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: #111;
  border: 1px solid #0f0;
  border-radius: 10px;
  padding: 20px;
  width: 80%;
  max-width: 700px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
  font-family: "VT323", monospace;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal-overlay.visible .modal-content {
  transform: scale(1);
}

.close-button {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  color: #0f0;
  font-size: 2.5rem;
  cursor: pointer;
  text-shadow: 0 0 5px #0f0;
  transition: color 0.3s, text-shadow 0.3s;
}

.close-button:hover {
  color: #fff;
  text-shadow: 0 0 10px #fff;
}

.modal-content h2 {
  font-family: "Orbitron", sans-serif;
  text-align: center;
  color: #0f0;
  text-shadow: 0 0 10px #0f0;
  margin-top: 0;
}

.modal-content h3 {
  font-family: "Orbitron", sans-serif;
  color: #0f0;
  border-bottom: 1px solid rgba(0, 255, 0, 0.5);
  padding-bottom: 5px;
  margin-top: 20px;
}

.modal-content ul {
  list-style-type: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-content li {
  background-color: rgba(0, 255, 0, 0.1);
  padding: 5px 10px;
  border-radius: 5px;
  border: 1px solid rgba(0, 255, 0, 0.2);
  font-size: 1.1rem;
}

.modal-content code {
  color: #fff;
  text-shadow: 0 0 3px #0f0;
}

.modal-content p {
  font-size: 1.2rem;
  line-height: 1.6;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.project-gallery img {
  width: 100%;
  height: auto;
  border: 1px solid #0f0;
  border-radius: 5px;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #0f0;
  margin: 5px 0;
  transition: all 0.3s ease-in-out;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.page-hidden {
  display: none;
}

#slider-popup {
  display: none;
  position: absolute;
  background: rgba(20, 20, 20, 0.8);
  border: 1px solid #0f0;
  padding: 15px;
  z-index: 100;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0, 255, 0, 0.6);
  color: #0f0;
  font-family: "VT323", monospace;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  font-size: 1.2rem;
}

#slider-popup label {
  margin-right: 10px;
  vertical-align: middle;
}

#slider-popup input[type="range"] {
  vertical-align: middle;
  /* Custom styling for the range input to match the theme can be added here */
}

#slider-popup #slider-value {
  margin-left: 10px;
  font-weight: bold;
  display: inline-block;
  min-width: 40px; /* Ensure space for the value */
  text-align: right;
}

/* Responsive Design */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .logo {
    font-size: 4em;
    text-align: center;
  }

  .container {
    flex-direction: column;
    padding: 1rem;
    margin-top: 70px; /* Adjust for fixed header */
  }

  .left-panel {
    display: none; /* Hide by default on mobile */
    width: 100%;
    position: absolute;
    top: 70px;
    left: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    padding: 1rem;
    box-sizing: border-box;
  }

  .left-panel.active {
    display: block;
  }

  .side-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  .side-nav a {
    font-size: 1.2rem;
    margin: 0.5rem;
  }

  #live-coding-controls {
    position: static;
    width: 100%;
    margin-top: 1rem;
    box-sizing: border-box;
  }

  .modal-content {
    width: 90%;
  }

  #slider-popup {
    display: none;
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    padding: 10px;
    z-index: 100;
  }
}
