@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono&display=swap');

body {
  font-family: 'JetBrains Mono', monospace;
  margin: 0;
  padding: 0;
  background-color: #f9fafc;
}

#theme-toggle {
  max-width: 32px;
  max-height: 32px;
  width: 32px;
  height: 32px;
  object-fit: contain;
  vertical-align: middle;
  /* Optional: add margin if needed */
  margin-left: 8px;
}


/* CURSOR */

#tooltip {
  position: fixed;
  color: black;
  font-family: monospace;
  font-size: 16px;
  pointer-events: none;
  white-space: nowrap;
  z-index: 1000;
  display: none;
  background: none;
}

.tooltip-cursor {
  display: inline-block;
  color: #B33791;
  animation: blink 0.8s step-start infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* NAV */

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

    padding: 20px 10%;
}

nav a {
    color: #000;
    text-decoration: none;
    padding: 10px;
}

nav a, nav button.logout-link {
    color: #000;                  /* Text color */
    text-decoration: none;        /* Remove default underline */
    padding: 10px;                /* Space around text */
    background: none;             /* No background for button */
    border: none;                 /* No border for button */
    font: inherit;                /* Inherit font from parent */
    cursor: pointer;              /* Pointer cursor on hover */
    position: relative;           /* Needed for ::after positioning */
    transition: color 0.2s;       /* Smooth color transition on hover */
    outline: none;                /* Remove focus outline */
}

nav a::after, nav button.logout-link::after {
    content: '';                  /* Empty content for pseudo-element */
    position: absolute;           /* Absolute positioning relative to parent */
    left: 0;                      /* Start at the left edge */
    bottom: 2px;                  /* 2px above the bottom of the parent */
    width: 100%;                     /* Start with no width (hidden) */
    height: 2px;                  /* Thickness of the underline */
    background: #B33791;             /* Underline color */
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s;       /* Animate width changes over 0.3s */
}

nav a:hover::after, nav button.logout-link:hover::after {
    transform: scaleX(1);                /* On hover, expand underline to full width */
}

.active {
    background-color: #B33791;
    color: white;
    border-radius: 5px;
    padding: 5px 10px;
}

nav a.signup::after {
    /* No underline for signup link */
    display: none !important;
}

.home {
    font-size: 20px;
    font-weight: bold;
}

@media screen and (max-width: 900px) {
  .a-phone {
    display: none;
  }
  nav {
    padding: 15px 5%;
  }
}

/* LOGO */

.logo-dark {
  display: inline;
}
.logo-light {
  display: none;
}

.theme-dark .logo-dark {
  display: none;
}
.theme-dark .logo-light {
  display: inline;
}

/* HEADER */

.header-container {
    overflow: hidden;

    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1072px;
}

@media screen and (max-width: 900px) {
  .header {
    /* max-width: 350px; */
    padding: 0 5%;
  }
}

.support_header {
    display: flex;
    flex-direction: column;
    align-items: left;
    padding: 0 10%;
    min-height: calc(100vh - 350px);
}

.support_header p {
    margin: 10px 0;
}

.text-container  {
    width: 100%;
    margin-top: 50px;

    padding: 50px 0;
    gap: 36px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%; /* Fill the full height of .header */
}

.text-container h1 {
    font-size: 50px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

.text-container p {
    font-size: 20px;
    color: #666;
    max-width: 97%;
    margin: 0;
    text-align: center;
}

.blinking-cursor::after {
    content: '|';
    animation: blink 1s step-start infinite;
    color: #B33791;
}


@media screen and (max-width: 900px) {
  .text-container {
    margin: 0;
    padding: 10px 0;
    gap: 5px;
  }
  .text-container h1 {
    width: 100%;
    /* height: 144px; */
    font-size: 40px;
  }
  .text-container p {
    text-align: left;
    font-size: 16px;
  }
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.start{
    color: white;
    background-color: black;
    text-decoration: none;
    font-size: 20px;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 4px;
    width: fit-content;
    display: flex;
    align-items: center;
    gap :5px;
}


.start a {
    color: white;
    text-decoration: none;
}

.text-container .cta-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.text-container .cta-container .p {
    background-color: #98e2a4;
    border-radius: 4px;
    border: solid 1px #39c851;
    padding: 10px 15px;
}

.text-container .cta-container p {
    color: #21aa38;
    max-width: 100%;
}

.security-warning {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ff5f56;
    color: white;
    font-weight: 600;
    font-size: 16px;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    white-space: nowrap;
    transition: width 0.4s ease, border-radius 0.4s ease, padding 0.4s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.security-warning.expanded {
    width: 280px;
    border-radius: 8px;
    padding: 0 12px;
    justify-content: flex-start;
}

.security-warning.expanded::before {
    content: "⚠️ This code is not secure";
    margin-left: 8px;
}


/* BAND */

.band-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;

  /* Create fade edges (left/right) */
  mask-image: linear-gradient(
    to right,
    rgba(0, 0, 0, 0) 0%,     /* Fully transparent at far left */
    rgba(0, 0, 0, 1) 20%,    /* Fully visible from 20% */
    rgba(0, 0, 0, 1) 80%,    /* Stay visible until 80% */
    rgba(0, 0, 0, 0) 100%    /* Fully transparent at far right */
  );
  -webkit-mask-image: linear-gradient(
    to right,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 1) 20%,
    rgba(0, 0, 0, 1) 80%,
    rgba(0, 0, 0, 0) 100%
  );
}


.band-container {
  display: flex;
  flex-direction: row;
  background-color: none;
  height: fit-content;
}

.band-track {
  display: flex;
  animation: scrollBand 30s linear infinite;
  gap: 10px;
  background-color: none;
}

.band-track a {
  flex-shrink: 0;
  background-color: #B33791;
  color: white;
  border: none;
  padding: 7px 15px;
  border-radius: 1000px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border: solid 1px transparent;
  transition: background-color 0.2s ease;
  white-space: nowrap;
  transition: opacity 0.2s linear;
}

@keyframes scrollBand {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* .band-wrapper:hover .band-track {
  animation-play-state: paused;
} */

@media screen and (max-width: 900px) {
  .band-wrapper {
    display: none;
  }
}

/* CODE */

.code-container-index {
  background-color: white; 
  width: 100%;
  position: relative;
  box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
  border-radius: 8px;
}

@media screen and (max-width: 900px) {
  .code-container-index {
    display: none;
  }
}

.code-editor-index {
  background-color: white; 
  border: solid 1px #E4E6E7;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  padding: 20px;
  width: 100%;
  border-top: none;
}

.bar-index {
  display: flex; justify-content: space-between;
  background-color: #f0f0f0;
  padding: 8px 15px;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  border: solid 1px #E4E6E7;
  border-bottom: none;
}

.chall-submit {
  color: white;
  background-color: green;
  border: none;
  padding: 0 10px;
  height: fit-content;
  border-radius: 4px;
  cursor: pointer;

  display: flex;
  align-items: center;
}

.control-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.control-dot.red {
  background: #FF5F56;
}

.control-dot.yellow {
  background: #FFBD2E;
}

.control-dot.green {
  background: #27C93F;
}

.code-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  cursor: pointer;
  border-radius: 4px;
}

.code-line p {
  margin: 0;
  padding: 0;
  font-size: 19px;
}

.code-line:hover {
  background-color: #f0f0f0;
}

.code-checkbox {
  appearance: none;
  width: 16px;
  height: 16px;
  margin-left: 10px;
  cursor: pointer;

  /* hidden by default */
  opacity: 0;
  visibility: hidden;
  position: relative;
}

.code-checkbox:checked {
  opacity: 1;
  visibility: visible;
}

/* Optional: custom check style */
.code-checkbox:checked::before {
  content: '•';
  position: absolute;
  left: 0;
  top: 0;
  font-size: 14px;
  color: #00771a;
}

/* Mini chall menu */

.code-container-hover-index {
  position: absolute;
  height: 100%;
  width: 100%;
  top: 0px;
  left: 0px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border: solid 1px #B33791;
  border-radius: 8px;
  z-index: 1;

  display: flex; /* always flex, hidden with opacity instead */
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 15px;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.code-container-hover-index.visible {
  opacity: 1;
  pointer-events: auto;
}


.code-container-hover-index h2 {
  margin: 0;
}

.code-container-hover-index p {
  max-width: 50%;
  text-align: center;
}

.code-container-hover-index button {
  padding: 5px 10px;
  border: 1px solid #B33791;
  border-radius: 4px;
  background-color: transparent;
  font-size: 16px;
  cursor: pointer;
}

/* Pop up success chall / error */

.pop-up {
  position: absolute; /* change to fixed if needed across scrolls */
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  padding: 15px 20px;
  border-radius: 4px;
  font-family: sans-serif;
  font-size: 1rem;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s ease-in-out;
}

.pop-up.show {
  top: 40px;
  opacity: 1;
  pointer-events: auto;
}

.pop-up.success {
  background-color: #d4edda;
  color: #155724;
}

.pop-up.wrong {
  background-color: #f8d7da;
  color: #721c24;
}


/* login and register forms */
.login-container, .register-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    margin: 50px 0;
}

.login-form, .register-form {
    background: #fff;
    border: 1.5px solid #e0e0e0;
    border-radius: 5px;
    padding: 32px 28px 24px 28px;
    /* box-shadow: 0 4px 24px rgba(0,0,0,0.07); */
    width: 500px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.login-form button[type="submit"], .register-form button[type="submit"] {
    background: #000;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 0;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.login-form button[type="submit"]:hover, .register-form button[type="submit"]:hover {
    background: #222;
}

.login-form input, .login-form select, .register-form input, .register-form select {
    width: 100%;
    padding: 8px 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 15px;
    margin-top: 4px;
}

.login-form input:focus, .register-form input:focus {
  outline: none;
}

.login-form h2, .register-form h2 {
  margin: 0;
}

.login-form a, .register-form a {
  text-decoration: none;
}

/* HOW IT WORKS */

.how {
  max-width: 1072px;
  width: 100%;
  margin-top: 50px;
}

.how-txt h2, p {
  margin: 0;
}

.how-txt h2 {
  font-weight: bolder;
  font-size: 35px;
}

.how-txt p {
  font-size: 17px;
  color: #666;
}

.how-cards-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}


.how-card {
  background-color: white;
  border: solid 1px #E4E6E7;
  border-radius: 4px;
  min-height: 170px;
  padding: 15px;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border 0.3s ease;
}

.how-card:hover {
  border: solid 1px #B33791;
}

.how-icon {
    background-color:#B33791;
    border-radius: 4px;
    padding: 7px;
    width: fit-content;
    display: flex;
    justify-content: center;
    align-items: center;
}

.how-card h3,
.how-card p {
    margin: 0;
}


.how-card h3 {
    font-size: 20px;
    font-weight: bolder;
}

.no-phone {
  display: none;
}

.no-phone p {
  color: #666;
}

.no-phone a {
  border: solid 1px #B33791;
  background-color: #B33791;
  border-radius: 4px;
  padding: 5px 8px;
  margin-top: 15px;

  color: white;
  text-decoration: none;
  width: fit-content;
}

@media screen and (max-width: 900px) {
  .how-cards-container {
    display: none;
  }
  .how-txt p {
    display: none;
  }
  .how {
    margin-top: 10px;
  }
  .how h2 {
    font-size: 30px;
  }
  .no-phone {
    display:  flex;
    flex-direction: column;
  }
}

/* SUPPORT US */

.support-container {
  background-image: url("/static/images/community.png");
  background-color: #fafafa;
  height: 400px;
  background-size: cover;
  padding: 10px;
  width: 100%;
  margin-top: 20px;
  /* border: solid 1px #B33791; */
  border-radius: 5px;
  border: solid 1px #E4E6E7;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: border 0.3s ease;
}

.support-container:hover {
  border: solid 1px #B33791;
}

.support-container h3 {
  color: rgb(61, 61, 61);
  font-size: 55px;
  margin: 10px 0;
  text-shadow: 0 0 2px #B33791;
}

.support-container .discord {
  border: solid 1px #B33791;
  background-color: #B33791;
  border-radius: 4px;
  padding: 5px 8px;
  margin-top: 15px;
  
  display: flex;
  align-items: center;
  gap: 5px;
}

.support-container .discord a {
    text-decoration: none;
    color: white;
}

.purple {
  color: #9b307d;
}

@media screen and (max-width: 900px) {
  .support-container {
    border: solid 1px #B33791;
  }
  .support-container h3 {
    font-size: 40px;
    text-align: center;
  }
  .support-container p {
    text-align: center;
  }
  .purple {
    color: black;
    text-shadow: 0 0 4px #B33791;
  }
}

/* FOOTER */

.site-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 40px 10%;
    margin-top: 60px;
    background-color: #f1f1f1;
    color: #666;
    font-family: 'JetBrains Mono', monospace;
    gap: 40px; /* spacing between columns */
    flex-wrap: wrap;
    box-sizing: border-box;
    width: 100%;
}

.site-footer > div {
    flex: 0 0 auto; /* Prevent uneven stretching */
    width: 220px;    /* Set consistent width for all footer sections */
}

.site-footer h2 {
    font-size: 24px;
    color: #000;
    margin-bottom: 10px;
}

.site-footer h3 {
    font-size: 18px;
    color: #000;
    margin-bottom: 10px;
}

.site-footer p {
    font-size: 14px;
    line-height: 1.6;
    max-width: 100%;
    margin: 0;
}

.site-footer a {
    display: block;
    color: #666;
    font-size: 14px;
    text-decoration: none;
    margin-bottom: 6px;
    transition: color 0.3s ease;
}

.site-footer a:hover {
    color: #B33791;
}

@media screen and (max-width: 900px) {
  .footer-links {
    display: none;
  }
  .footer-social {
    display: none;
  }
  .site-footer {
    margin-top: 20px;
  }
}

/* Alert Messages */
.messages {
  max-width: 600px;
  margin: 20px auto;
  z-index: 1000;
}
.alert {
  padding: 12px 18px;
  border-radius: 6px;
  margin-bottom: 12px;
  font-weight: 500;
  font-size: 1em;
}
.alert-success { background: #e6ffe6; color: #207520; border: 1px solid #b2e2b2; }
.alert-error, .alert-danger { background: #ffeaea; color: #a94442; border: 1px solid #e2b2b2; }
.alert-info { background: #eaf6ff; color: #31708f; border: 1px solid #b2d7e2; }
.alert-warning { background: #fffbe6; color: #8a6d3b; border: 1px solid #e2d7b2; }

