:root {
  --color-page: #080a0d;
  --color-surface: #11151b;
  --color-surface-soft: #171d25;

  --color-text: #f5f7fa;
  --color-muted: #a7b0bd;
  --color-muted-1: #cbd5e1;

  --color-red: #ee343a;
  --color-red-shadow: #972e31;

  --color-border: rgba(255, 255, 255, 0.1);

  --font-main: Arial, Helvetica, sans-serif;

  --max-width: 1120px;
  --radius: 18px;
}

/* Reset e base della pagina tools */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  color: var(--color-text);
  font-family: var(--font-main);
  background: var(--color-page);
}

main {
  display: flex;
  flex-direction: row;
  flex: 1;
  justify-content: center;
  align-items: center;
  gap: 1vw;
}

#tool-input {
  width: 100%;
  max-width: 360px;
  background: #0b1118;
  color: #ffffff;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 9px 12px;
  outline: none;
  font-size: 15px;
  appearance: none;
  -webkit-appearance: none;
}

#tool-input::placeholder {
  color: #7c8797;
}

#tool-input:focus {
  border-color: black;
  box-shadow: 0 0 8px rgba(84, 152, 255, 0.3);
}
/* */
#tool-input:-webkit-autofill,
#tool-input:-webkit-autofill:hover,
#tool-input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #0b1118 inset !important;
  box-shadow: 0 0 0 1000px #0b1118 inset !important;

  -webkit-text-fill-color: #ffffff !important;
  caret-color: #ffffff;

  border: 1px solid #334155;
  border-radius: 6px;

  transition: background-color 9999s ease-in-out 0s;
}

#tool-input:-webkit-autofill:focus {
  -webkit-box-shadow:
    0 0 0 1000px #0b1118 inset,
    0 0 8px rgba(84, 152, 255, 0.3) !important;

  box-shadow:
    0 0 0 1000px #0b1118 inset,
    0 0 8px rgba(84, 152, 255, 0.3) !important;

  -webkit-text-fill-color: #ffffff !important;
  caret-color: #ffffff;

  border-color: black;
}
/*--------------------*/

.card {
  width: 30vw;
  height: auto;
  background-color: #111820;
  border: 2px solid #080b1f;
  border-radius: 10px;
  box-shadow: 0 0 10px 0.5px var(--color-red-shadow);
  padding: 15px;
  gap: 5px;
}

.card h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(1.2rem, 6.5vw, 3rem);
  line-height: 0.95;
}

.card h2 {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--color-muted-1);
  font-size: 1.1rem;
  line-height: 1.7;
}

#tool-output{
  display: flex;
}

#tool-output.is-loading {
  flex-direction: column;
  align-items: center;
  padding-bottom: 50px;
}

#tool-output.is-result {
  align-items: flex-start;
  justify-content: flex-start;
}

#tool-output img{
  width: 6vw;
  height: auto;
}

#tool-loading-icon{
  margin-top: 38px;
}

#tool-form{
  display: flex;
  flex-direction: column;
}

#tool-form button {
  display: block;
  margin: 20px auto 0;

  background: #2474cf;
  color: #06100a;

  border: 2px solid rgb(41, 93, 206);
  border-radius: 8px;

  padding: 8px 34px;

  font-size: clamp(24px, 3vw, 38px);
  font-weight: 900;
  letter-spacing: 0.04em;

  cursor: pointer;

  transition: 0.15s ease;
}

#tool-form button:hover {
  background: #2289ff;
  transform: translateY(-1px);
}

#tool-form button:active {
  transform: translateY(1px);
}



#tool-copy-button {
  display: block;
  margin: 16px auto 0;
  padding: 0;
  background: transparent;
  border: 0;
  line-height: 0;
  cursor: pointer;
  transition: 0.15s ease;
}

#tool-copy-button:hover {
  transform: translateY(-1px);
}

#tool-copy-button:active {
  transform: translateY(1px);
}

#tool-copy-button #tool-copy-icon {
  display: block;
  width: 1.4vw;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

#tool-copy-message {
  margin: 16px auto 0;
  color: #ffffff;
  font-size: clamp(1rem, 2vw, 1.4rem);
  font-weight: 900;
  line-height: 1.3;
  text-align: center;
  word-break: break-word;
}

/* ROTATIONN */
.is-spinning {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
/*-------*/

.tool-result-text{
  color: #ffffff;
  font-size: 1.4vw;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  text-align: center;
}
.tool-result {
  width: 100%;
  color: #ffffff;
  font-size: 0.95rem;
  line-height: 1.6;
  text-align: left;
}

.tool-result-row {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 12px;
  margin: 4px 0;
}

.tool-result-row strong {
  color: #ffffff;
  font-weight: 900;
  white-space: nowrap;
}

.tool-result-row span {
  color: #cbd5e1;
  word-break: break-word;
}

.tool-result > strong {
  font-size: 2vw;
}

@media (max-width: 1368px){
  #tool-form div{
    display: flex;
    flex-direction: column;
    gap:10px;
  }

}

@media (max-width: 720px) {
  main{
    margin-top: 30px;
    flex-direction: column;
    gap: 3vw;
  }
  .card {
    width: 90vw;
    height: auto;
    background-color: #111820;
    border: 2px solid #080b1f;
    border-radius: 10px;
    box-shadow: 0 0 10px 0.5px var(--color-red-shadow);
    padding: 7px;
    gap: 15px;
  }

  .card h1 {
    max-width: 780px;
    margin: 4px;
    font-size: clamp(3rem, 6.5vw, 4rem);
    line-height: 0.95;
  }

  #tool-form div{
    display: flex;
    flex-direction: column;
    gap:10px;
  }

.tool-result-text{
  color: #ffffff;
  font-size: 6vw;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  text-align: center;
}

.tool-result > strong {
  font-size: 7vw;
}

  #tool-copy-button #tool-copy-icon {
    width: clamp(34px, 12vw, 56px);
  }
  #tool-output img{
    width: 25vw;
    height: auto;
  }

  #tool-loading-icon{
    margin-top: 38px;
  }
}