/* Variables de color */
:root {
    --background: hsl(0, 0%, 100%);
    --foreground: hsl(240, 10%, 3.9%);
    --card-background: hsl(0, 0%, 100%);
    --card-foreground: hsl(240, 10%, 3.9%);
    --input-border: hsl(240, 5.9%, 90%);
    --button-background: hsl(240, 5.9%, 10%);
    --button-foreground: hsl(0, 0%, 98%);
    --foreground-light: hsl(240, 10%, 20%); 
    --foreground-dark: hsl(0, 0%, 100%);    
    --background-light: hsl(0, 0%, 100%);
    --background-dark: hsl(240, 10%, 10%);
}

/* DarkMode */ 
body.dark-mode {        
    background-color: var(--background-dark);
    color: var(--foreground-dark);
    --background: hsl(240, 10%, 3.9%);
    --foreground: hsl(0, 0%, 98%);
    --card-background: hsl(240, 10%, 15%);
    --input-border: hsl(240, 5.9%, 50%);
    --button-background: hsl(240, 5.9%, 20%);
    --button-foreground: hsl(0, 0%, 98%);
}

body {
    background-color: var(--background-light);
    color: var(--foreground-light);
    font-family: 'Inter', sans-serif;
    display: flex;
    justify-content: center;
    align-items: flex-start; 
    min-height: 100vh; 
    margin: 0;
    zoom: 100%;
    min-width: 255px; 
}

body.dark-mode h1 {
    color: var(--button-foreground);
}

body.dark-mode .result-text, 
body.dark-mode .small-note {
    color: var(--foreground);
}

body.dark-mode .info-container img,
body.dark-mode .copy-button img {
    filter: invert(1) grayscale(100%);
}

body.dark-mode .info-text {
    background-color: var(--foreground);
    color: var(--background);
}

body.dark-mode .no-message {
    color: var(--foreground);
    background-color: transparent;
}

body.dark-mode .floating-button img {
    filter: invert(1) brightness(2);
}

body.dark-mode .footer {
    color: var(--foreground-dark);
}

body.dark-mode .footer-button {
    background-color: var(--button-background); 
    color: var(--button-foreground); 
}

#nombre {
    color: inherit; 
}

.footer {
    color: var(--foreground-light);
}

/* Estilos para el header */
header {
    position: fixed; 
    top: 0; 
    left: 50%; 
    transform: translateX(-50%); 
    width: 100%; 
    display: flex;
    justify-content: center;
    padding: 10px; 
    z-index: 1000; 
}

/* Estilos para el botón flotante */
.floating-button {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background-color: var(--button-background);
    color: var(--button-foreground);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.floating-button img {
    width: 24px;
    height: auto;
}

.floating-button:hover {
    background-color: hsl(240, 5.9%, 20%);
}

.small-note {
    font-size: 14px;
    color: hsl(240, 3.8%, 45%);
    margin-top: 5px;
}

.footer {
    text-align: center;
    padding: 10px; 
    position: fixed; 
    bottom: 0; 
    width: 100%;
    display: flex; 
    justify-content: center;
    align-items: center; 
    gap: 8px; 
    color: var(--foreground-light);
    z-index: 1000;
}

.footer-button img {
    width: 16px; 
    height: auto; 
    margin-left: 8px
}   

.footer-button {
    background-color: var(--background); 
    color: var(--foreground);
    border: none;
    font-size: 13px;
    cursor: pointer;
    text-align: center;
    font-family: Arial, sans-serif;
    transition: background-color 0.3s ease;
    padding: 10px;
    border-radius: 8px; 
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    background-color: var(--card-background);
    padding: 24px;
    border-radius: 12px;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin: 150px 16px; /*xtop x*/
    zoom: 120%;
    min-width: inherit;
}

.input-container {
    display: flex;
    border-radius: 8px;
    position: relative;
    min-height: 30px;
    flex-direction: column;
    justify-content: space-evenly;
}
.textarea {
    display: flex;
    padding: 8px;
    margin-bottom: 16px;
    border: 2px solid var(--input-border);
    border-radius: 8px;
    background-color: var(--background);
    color: var(--foreground);
    resize: vertical;
    min-height: 30px; 
    overflow-y: auto; 
}
h1 {
    margin-bottom: 16px;
    font-size: 26px;
    color: var(--button-background);
}

.no-message {
    margin-right: 7%;
    font-size: 16px;
    color: var(--card-foreground);
}

.button {
    width: 48%;
    padding: 10px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background-color: var(--button-background);
    color: var(--button-foreground);
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.button:hover {
    background-color: hsl(240, 5.9%, 20%);
}

.button-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}

.result-container {
    display: flex;
    padding: 8px;
    border: 2px solid var(--input-border);
    border-radius: 8px;
    background-color: var(--background);
    color: var(--foreground);
    position: relative;
    min-height: 30px;
    flex-direction: column;
    justify-content: space-evenly;
}

.result-text {
    color: hsl(240, 3.8%, 45%);
    word-wrap: break-word; 
    white-space: pre-wrap; 
    overflow-wrap: break-word; 
    max-width: 93%;
    text-align: left;
}

.copy-button {
    background-color: transparent;
    border: none;
    cursor: pointer;
    color: hsl(240, 3.8%, 45%);
    position: absolute;
    top: 8px;
    right: 2px; 
}

.copy-button:hover {
    color: var(--foreground);
}

.button {
    width: 48%;
    padding: 10px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background-color: var(--button-background);
    color: var(--button-foreground);
    font-weight: bold;
    transition: transform 0.3s ease, background-color 0.3s;
}

.button:hover {
    transform: scale(1.05); 
    background-color: hsl(240, 5.9%, 20%);
}

.copy-button img {
    margin-top: 2px;
    transition: transform 0.3s ease, fill 0.3s;
}

.copy-button:hover img {
    transform: scale(1.1); 
}

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

.info-container .info-text {
    display: none; 
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px;
    background-color: #333;
    color: #fff;
    border-radius: 8px;
    white-space: nowrap;
    font-size: 10px;
}
  
.info-container:hover .info-text {
    display: block;
}
  
.info-container img {
    width: 20px;
    vertical-align: middle;
}
