@charset "UTF-8";

/* ============================ */
/* CONFIGURAÇÕES GLOBAIS     */
/* ============================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    color: #333;
    font-size: 16px;
    line-height: 1.6;
    background: linear-gradient(to bottom right, #C5D0D9, #4F6273); /* Fundo degradê */
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ============================ */
/* ANIMAÇÕES / LOADER      */
/* ============================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 2s linear infinite;
    margin: 20px auto;
    display: none;
}

/* NAVEGAÇÃO*/
.navbar {
    width: 100%; 
    background-color: #0D0D0D;
    color: white;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1000;
    animation: fadeIn 0.5s ease-in-out;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3em;
    font-weight: bold;
    color: #f1f1f1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
}

.nav-links li a {
    text-decoration: none;
    color: #f1f1f1;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 1.1em;
    padding: 10px 15px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.nav-links li a:hover {
    color: #ffffff;
    background-color: #00aaff;
    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
    transform: translateY(-2px);
}

/* ============================ */
/* LAYOUT PRINCIPAL        */
/* ============================ */
.container {
    max-width: 800px;
    padding: 40px;
    background: linear-gradient(to right, #3868A6, #4F6273);
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2), inset 0 0 5px rgba(255,255,255,0.05);
    animation: fadeIn 0.5s ease-in-out;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    align-items: center;
    color: #FFFFFF;
    margin: auto;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    padding: 20px;
}

.left, .right {
    flex: 1;
    min-width: 300px;
    padding: 20px;
    background-color: #4F6273;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    animation: fadeIn 0.5s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.right:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

h1 {
    font-size: 2.5em;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-style: italic;
    font-weight: bold;
    margin: 0 0 20px;
    padding: 10px;
    width: 100%;
    background: linear-gradient(to right, #3868A6, #4F6273);
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    color: #FFFFFF;
}

/* ============================ */
/* ELEMENTOS           */
/* ============================ */
input[type="file"] {
    display: none;
}

#fileName {
    margin-top: 10px;
    font-size: 1em;
    font-weight: bold;
    font-style: italic;
    color: #FFFFFF;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1.2em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #FFFFFF;
    background-color: #4F6273;
    border: 2px solid #0D0D0D;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
    text-decoration: none;
    font-family: 'Poppins', Arial, sans-serif;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.btn:hover {
    background-color: #0088cc;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn:active {
    background-color: #4F6273;
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1.2em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #FFFFFF;
    background-color: #4F6273;
    border: 2px solid #0D0D0D;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
    text-decoration: none;
    font-family: 'Poppins', Arial, sans-serif;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: #0088cc;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn-secondary:active {
    background-color: #4F6273;
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.custom-file-upload:hover {
    background-color: #596773;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}

#downloadBtn {
    background-color: #00aaff;
    color: white;
    margin-top: 15px;
}

#downloadBtn:hover {
    background-color: #0088cc;
}

/* ============================ */
/* RESULTADO          */
/* ============================ */
.result {
    display: none;
    margin-top: 40px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    text-align: center;
    animation: fadeUp 0.6s ease-in-out;
    backdrop-filter: blur(8px);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.result h2 {
    font-size: 1.8em;
    color: #ffffff;
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
}

.result p {
    color: #ddd;
    font-size: 1em;
    margin-top: 20px;
    margin-bottom: 10px;
}

.output-wrapper {
    display: inline-block;
    border-radius: 10px;
    overflow: hidden;
    border: 3px solid #0D0D0D;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
    animation: fadeUp 0.7s ease-in-out;
}

#outputImage {
    max-width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

#outputImage:hover {
    transform: scale(1.03);
}

.download-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 24px;
    background-color: #00aaff;
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.download-btn:hover {
    background-color: #0088cc;
    transform: translateY(-2px);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================ */
/* RODAPÉ            */
/* ============================ */
footer {
    width: 100%;
    text-align: center;
    padding: 20px;
    background-color: #0D0D0D;
    color: #fff;
    font-size: 0.9em;
    margin-top: 40px;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.2);
    position: relative;
    z-index: 1000;
    animation: fadeIn 0.5s ease-in-out;
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px 10px 0 0;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.footer a {
    color: #9f7aea;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
    font-size: 1.1em;
    padding: 10px 15px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    display: inline-block;
    margin: 0 10px;
    padding: 10px 15px;
}

.footer a:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
    transform: translateY(-2px);
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    text-decoration: none;
    cursor: pointer;
    outline: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.footer p {
    margin: 0;
    font-size: 0.9em;
    color: #ccc;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;  
    display: inline-block;
    margin: 10px 0;
    padding: 10px 15px;
}

.footer p a {
    color: #9f7aea;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
    font-size: 1.1em;
    padding: 10px 15px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.footer p a:hover {
    color: #ffffff;
    text-decoration: underline;
    transition: color 0.3s ease;
    cursor: pointer;
    outline: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    font-size: 1.1em;
    padding: 10px 15px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    display: inline-block;
}



/* ============================ */
/* RESPONSIVIDADE       */
/* ============================ */
@media (max-width: 600px) {
    .container {
        padding: 20px;
        flex-direction: column;
        gap: 20px;
    }

    h1 {
        font-size: 1.5em;
    }

    .btn, #downloadBtn {
        width: 100%;
    }

    #fileName {
        display: block;
        margin-top: 10px;
    }

    @media (max-width: 600px) {
  .navbar {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    padding: 15px 10px;
  }

  .logo {
    flex-direction: column;
    gap: 5px;
    font-size: 1.1em;
  }

  .nav-links {
    gap: 10px;
  }

  .nav-links li a {
    font-size: 0.95em;
    padding: 8px 12px;
  }

  .nav-links li {
  margin-bottom: 10px;
}

.nav-links {
  align-items: center;
}

}

}

.drop-zone {
    margin-top: 20px;
    padding: 30px;
    border: 2px dashed #4F6273;
    border-radius: 10px;
    text-align: center;
    font-weight: bold;
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.drop-zone.dragover {
    background-color: rgba(0, 136, 204, 0.2);
    transform: scale(1.05);
    border-color: #00aaff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 10;
}

.drop-zone p {
    margin: 0;
    font-size: 1.2em;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.upload-message {
    display: none;
    margin-top: 15px;
    padding: 12px 20px;
    background-color: rgba(0, 200, 100, 0.8);
    color: white;
    font-weight: bold;
    border-radius: 8px;
    animation: fadeIn 0.5s ease-in-out;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    text-align: center;
    transition: opacity 0.3s ease;
}

.upload-message.fadeOut {
    opacity: 0;
    transition: opacity 0.8s ease;
}

/* TOAST FIXO NO CANTO INFERIOR DIREITO */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #00aa55;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-weight: bold;
    z-index: 9999;
    opacity: 0;
    transform: translateY(100px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

    
/* QUANDO APARECE */
.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* QUANDO DESAPARECE */
.toast.hide {
    opacity: 0;
    transform: translateY(100px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none; 
    visibility: hidden;
    transition-delay: 0.5s; 
}
