@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

body {
  font-family: 'Roboto', 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%;
}

/* Basic nav links */
nav a {
    color: #000;
    text-decoration: none;
    padding: 10px;
    transition: color 0.2s;
}

nav a:hover {
    color: #B33791;
}

/* Logout button styling */
nav button.logout-link {
    color: #000;
    text-decoration: none;
    padding: 10px;
    background: none;
    border: none;
    font: inherit;
    cursor: pointer;
    transition: color 0.2s;
    outline: none;
}

nav button.logout-link:hover {
    color: #B33791;
}

/* Active link/button styling */
.active {
    color: #B33791;
    border-radius: 5px;
    padding: 5px 10px;
}


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

.user-menu-container {
    position: relative;
    display: inline-block;
}

.user-menu-toggle {
    background-color: #b3379223;
    border: solid 1px #B33791;
    color: #B33791;
    cursor: pointer;
    font-size: 16px;
    padding: 5px 10px;
    border-radius: 9999px;
}

.user-menu-dropdown {
    display: none;
    padding: 5px;
    position: absolute;
    margin-top: 7px;
    right: 0;
    background-color: white;
    min-width: 250px;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
    border-radius: 5px;
    overflow: hidden;
    border: solid 1px #E4E6E7;
    z-index: 100;
    
    animation: fallIn 0.1s ease-out;
}

@keyframes fallIn {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0);
  }
}

.dropdown-item {
  all: unset;
  display: flex;
  align-items: center;
  border-radius: 3px;
  height: 32px;
  gap: 8px;
  cursor: pointer;
  

  padding: 4px 10px;
}

.dropdown-item p {
  color: #434343;
  font-size: 14px;
}

.dropdown-item img {
  padding: 2px;
  border-radius: 5px;
}

.dropdown-item:hover {
  background-color: #f2f3f4;
}

hr {
  width: 90%;
  border: none;
  border-top: solid 1px lightgray;
}

/* THEME SWITCH */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
  margin-left: auto;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 20px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #B33791;
}

input:checked + .slider:before {
  transform: translateX(20px);
}

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

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

/* 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;
}

.eyebrow {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #b3379221;
  border: solid 1px #B33791;
  border-radius: 9999px;
  padding: 6px 13px;
}

.eyebrow p {
  color: #B33791;
}

.header-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.discord {
  color: #B33791;
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  padding: 8px 10px;
  border-radius: 5px;
  margin-top: 15px;
  border: solid 1px #B33791;
}

.getting-started {
  color: white;
  background-color: black;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 5px;
  margin-top: 15px;
  font-size: 18px;
}

@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: 70px;
    margin-bottom: 30px;

    padding: 50px 0;
    /* gap: 20px; */

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

.text-container h1 {
    font-size: 60px;
    font-weight: 400;
    line-height: 1.2;
    margin: 10px 0;
    /* font-family: 'JetBrains Mono', monospace; */
    text-align: center;
}

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

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

#changing-word {
  display: inline-block;
  line-height: 1em; /* valeur stable */
  font-family: monospace;
  white-space: pre;
  transition: opacity 180ms ease-in-out;
  opacity: 1;
}


/* petite pulsation au changement complet */
#changing-word.fading {
  opacity: 0.15;
}



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

  .text-container .header-buttons {
    display: none;
  }
}

@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: 70%;
  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: #b3379223; */
  color: #B33791;
  border: none;
  padding: 3px 10px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  /* border: solid 1px #B33791; */
  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;
  border-radius: 12px;
  font-family: 'JetBrains Mono', monospace;
}

@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: 12px;
  border-bottom-right-radius: 12px;
  padding: 20px;
  width: 100%;
  border-top: none;
}

.bar-index {
  display: flex; justify-content: space-between;
  padding: 12px 20px;
  padding-bottom: 8px;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  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: 12px;
  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: 10px;
  opacity: 1;
  pointer-events: auto;
}

.pop-up.success {
  background-color: #e8f3eb;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.pop-up.wrong {
  background-color: #f7f1f2;
  color: #721c24;
  border: 1px solid #ecd6da;
}


/* 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;
}

.register-info {
  display: flex;
  align-items: start;
  gap: 8px;

  border: 1px solid #f5a623; /* softer orange */
  border-radius: 5px;
  padding: 5px 10px;

  background: #fffbe6; /* light warning background */
  color: #5c4400;      /* readable dark text */
  font-family: system-ui, sans-serif;
}

.register-info::before {
  content: "⚠️";
  font-size: 18px;
}

.register-info p {
  font-size: 15px;
  margin: 0;
  line-height: 1.5;
}

.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;
  /* font-family: 'JetBrains Mono', monospace; */
  font-weight: 400;
}

.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: 350px;
  background-size: cover;
  padding: 10px;
  width: 100%;
  margin-top: 20px;
  /* border: solid 1px #B33791; */
  border-radius: 12px;
  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; }
