/*GLOBAL VARIABLES*/
:root{
    --accent-color: #e74c3c;
    --background-color: #121D2B;
    --text-color: #FFF4EB;
}

/* LOADING SCREEN */
#loading-screen {
    position: fixed;
    z-index: 9999;
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: monospace, sans-serif !important;
    top: 0; left: 0;
    width: 100vw;
    height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2em;
    transition: opacity 0.5s ease;
}

#loading-text-container {
    position: fixed;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    z-index: 9999;
}
#loading-dots {
    position: absolute;
    text-align: start;
    /*make them go a bit to the top*/
    top: -7px;
}
#loading-dots-spacer {
   color: transparent;
}

    

body {
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    font-family: "Major Mono Display", monospace;
    font-weight: 400;
    font-style: normal;
    height: 100dvh;
    width: 100vw;
    
}

h1 {
    font-size: 2.5em;
    margin: 0;
    color: var(--accent-color);
}


li a {
    color: var(--text-color);
    text-decoration: none;
    position: relative;
}

li a::after {
    content: '';
    position: absolute;
    width: 4px; /* Small dot by default */
    height: 4px;
    background-color: var(--text-color);
    left: 50%;
    bottom: -6px;
    transform: translateX(-50%);
    transition: width 0.3s ease, transform 0.3s ease, height 0.3s ease, bottom 0.3s ease;
}

li a:hover::after {
    width: 100%; /* Expand to full width */
    height: 2px; /* Change to a line */
    border-radius: 0; /* Remove rounded corners */
    transform: translateX(-50%); /* Align to the left */
    bottom: -4px; /* Adjust position */
}


/* LIGHT BACKGROUND ONLY ON DESKTOP */
@media screen and (min-width: 768px) {
  #light-background {
    position: fixed;
    width: 100%;
    height: 100%;
    background: radial-gradient(
      circle at var(--light-bg-x, 50%) var(--light-bg-y, 50%),
      #1E3048, transparent 200px
    );
    transition: background-position 0.05s ease;
    z-index: -100;
    pointer-events: none;
    opacity: 0; /* Initially hidden */
    transition: opacity 0.5s ease, background-position 0.05s ease;
  }
}



/* Overlay backdrop */
.json-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(8px);
    background-color: rgba(0, 0, 0, 0.5);
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 9999;
  }
  
  /* Modal card */
  .json-modal {
    background: rgba(30, 30, 30, 0.75);
    backdrop-filter: blur(12px);
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    color: #d4d4d4;
    font-family: 'Courier New', Courier, monospace;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
    animation: fadeInModal 0.4s ease;
  }
  
  /* Modal title bar */
  .json-modal-header {
    background-color: rgba(50, 50, 50, 0.6);
    border-bottom: 1px solid #444;
    padding: 0.6rem 1rem;
    font-weight: bold;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 10px 10px 0 0;
  }
  
  .modal-close {
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s ease;
  }
  
  .modal-close:hover {
    color: #fff;
  }
  
  /* Body (same as JSON form) */
  .json-modal-body {
    padding: 1rem;
  }
  
  .json-bracket {
    font-size: 1.2rem;
    margin-left: 0.5rem;
  }
  
  .json-indent {
    display: inline-block;
    width: 1.5rem;
  }
  
  .json-line {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    font-size: 1rem;
  }
  
  .json-key {
    color: #9cdcfe;
    flex-shrink: 0;
    width: 100px;
    text-align: right;
    margin-right: 0.5rem;
  }

  .json-list {
    color: #c678dd;
  }
  .json-text {
    color: #ce9178;
    text-decoration: none;
  }

  input[type="text"],
  input[type="email"],
  textarea {
    background-color: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 4px;
    color: #ce9178;
    font-family: inherit;
    font-size: 1rem;
    padding: 0.25rem 0.5rem;
    flex: 1;
    outline: none;
  }

input:-webkit-autofill,
textarea:-webkit-autofill {
    box-shadow: 0 0 0px 1000px #2b2b2b inset !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
    -webkit-text-fill-color: #ce9178 !important;
    font-family: inherit !important;
}

  
  input:focus,
  textarea:focus {
    background-color: rgba(255, 255, 255, 0.08);
  }
  
  textarea {
    resize: vertical;
    height: 60px;
  }
  
  input::placeholder,
  textarea::placeholder {
    color: #666;
    font-style: italic;
  }
  
  button[type="submit"] {
    background-color: #0e639c;
    border: none;
    color: white;
    padding: 0.4rem 1rem;
    font-family: inherit;
    font-size: 0.9rem;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 100px;
  }
  
  button[type="submit"]:hover {
    background-color: #1177bb;
  }
  
  /* Animation */
  @keyframes fadeInModal {
    from {
      opacity: 0;
      transform: translateY(20px) scale(0.95);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
  
  @keyframes fadeOutModal {
    from {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
    to {
      opacity: 0;
      transform: translateY(20px) scale(0.95);
    }
  }
  
  .json-modal.closing {
    animation: fadeOutModal 0.3s forwards;
  }