@import url("https://fonts.googleapis.com/css2?family=Kode+Mono:wght@400..700&display=swap");

:root {
  --color-primary: #0a3871;
  --color-secondary: #0f2d52;
  --color-white: #ffffff;
  --color-light-white: rgba(255, 255, 255, 0.085);
  --color-dark-white: rgba(255, 255, 255);
  --color-dark-blue: #07226b;
  --color-light-blue: rgba(43, 128, 197, 0.1);
  --color-blue-border: rgb(17, 126, 177);
  --color-grey: #ccc;
  --color-light-grey: rgb(173, 173, 173);
  --color-dark-grey: rgba(0, 0, 0, 0.1);
  --color-transparent-black: rgba(0, 0, 0, 0.85);
  --color-alert: #0f65ce;
  --color-copy: #0a3871;
  --color-modal-text: #f0eded;
}

* {
  font-family: "Kode Mono", monospace;
}

body {
  margin: 0;
  font-size: 10px;
  background-image: url(../img/ZAPMxXZ.jpg);
  background-size: cover;
  background-attachment: fixed;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Modal */
.modal {
  z-index: 1;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  background-color: var(--color-transparent-black);
  backdrop-filter: blur(5px);
}

.modal-percent {
  font-size: 7rem;
  font-weight: bold;
  color: var(--color-white);
  text-align: center;
}

.modal-text {
  margin-top: 15px;
  font-size: 3rem;
  font-weight: bold;
  color: var(--color-white);
  text-align: center;
}

#modal-btn {
  position: relative;
  margin: 10px 0;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--color-white);
  text-align: center;
  background-color: var(--color-light-blue);
  border: 2px solid var(--color-blue-border);
  border-radius: 1rem;
  padding: 13px 25px;
  cursor: pointer;
  transition: all 600ms ease;
}

/* Header */
.header-layout {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  background-color: var(--color-dark-white);
  backdrop-filter: blur(5px);
}

#title {
  font-size: 1.5rem;
  color: var(--color-dark-blue);
  text-transform: uppercase;
  font-weight: 700;
}

.logo-github {
  width: 50px;
  height: 50px;
}

/* Main Layout */
.main-layout {
  display: flex;
  justify-content: center;
  gap: 25px;
}

.load-text {
  margin: 10px 0;
  display: none;
  font-size: 3rem;
  font-weight: 600;
  color: var(--color-white);
}

/* Layout Left */
.layout-left {
  width: 40%;
  height: 38rem;
  padding: 0.5rem;
  box-shadow: 0 0 5px var(--color-light-grey);
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--color-light-white);
  backdrop-filter: blur(10px);
  border-radius: 1.5rem;
}

.text-input {
  width: 90%;
  height: 80%;
  border-radius: 24px;
  background-color: var(--color-secondary);
  opacity: 0.8;
  font-size: 32px;
  color: var(--color-white);
}

.text-input::placeholder {
  font-size: 32px;
  color: var(--color-grey);
}

.nota {
  color: var(--color-white);
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.btns {
  display: flex;
  justify-content: space-around;
  gap: 20px;
}

.btn {
  border: none;
  padding: 0.5rem 2rem;
  border-radius: 1rem;
  font-size: 1.2rem;
  width: 13rem;
  cursor: pointer;
}

.btn-encrypt {
  background-color: var(--color-primary);
  color: var(--color-white);
  transition: all 300ms ease-in-out;
  font-weight: 600;
}

.btn-decrypt {
  border: 1px solid var(--color-primary);
  background-color: var(--color-white);
  color: var(--color-primary);
  font-weight: 600;
}

.btn:hover,
.btn:focus {
  animation: btn-hover 1s;
  box-shadow: 0 0 0 1.5em transparent;
}

@keyframes btn-hover {
  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 0 var(--color-grey);
  }
}

/* Layout View */
.layout-view {
  width: 30%;
  height: 39rem;
  border-radius: 1.5rem;
  box-shadow: 0 0 5px var(--color-light-grey);
  background-color: rgba(255, 255, 255, 0);
  backdrop-filter: blur(15px);
}

.content-view {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  color: var(--color-white);
  text-align: center;
}

.view-paragraph-1 {
  font-size: 30px;
  font-weight: 600;
}

.view-paragraph-2 {
  padding: 1rem;
  font-size: 25px;
  font-weight: 500;
  color: var(--color-modal-text);
}

.box-logo {
  height: 90%;
}

.copy {
  color: var(--color-copy);
  font-weight: 600;
}

.view-result {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
}

.textResult {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-white);
  text-align: center;
}

/* Footer */
.footer {
  background-color: var(--color-dark-grey);
  padding: 0.5rem;
  text-align: center;
  font-size: 1rem;
}

.footer-text {
  color: var(--color-white);
}

.footer-description {
  color: var(--color-alert);
}

.icon-alert {
  width: 30px;
  height: 30px;
}

.imagen-urban {
  height: 334px;
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
  body {
    height: 100vh;
    display: flex;
    flex-direction: column;
  }

  main {
    padding: 2% 5%;
  }

  .main-layout {
    height: 80vh;
    width: auto;
    flex-direction: column;
    justify-content: space-between;
  }

  .layout-left {
    width: auto;
  }

  .layout-view {
    width: auto;
    height: 25rem;
  }

  .imagen-urban {
    display: none;
  }
}

@media screen and (max-width: 767px) {
  .btns {
    width: auto;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
}

/* Specific Element */
#detective {
  min-width: 200px;
  min-height: 200px;
  max-width: 800px;
  max-height: 800px;
  border-radius: 1rem 1rem 5rem 5rem;
}

.popup{
  visibility: hidden;
  min-width: 250px;
  background-color: var(--color-white);
  color: var(--color-primary);
  text-align: center;
  border-radius: 3rem;
  padding: 16px;
  position: fixed;
  z-index: 1;
  top: 150px;
  left: 50%;
  transform: translateX(-60%);
  font-size: 18px;
  font-weight: 800;
}

.popup.show{
  visibility: visible;
  -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
  animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@-webkit-keyframes fadein{
  from {top:0; opacity:0;}
  to {top: 150px; opacity: 1;}
}

@keyframes fadein{
  from {top:0; opacity:0;}
  to {top: 150px; opacity: 1;}
}
@-webkit-keyframes fadeout{
  from {top:150px; opacity:1;}
  to {top: 0; opacity: 0;}
}

@keyframes fadeout{
  from {top:150px; opacity:1;}
  to {top: 0; opacity: 0;}
}
