* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "articulat-cf", sans-serif;
    letter-spacing: 0.7px;
}

body {
    background-image: url(assets/backgroudnd.webp);
    color: #fff;
    background-size: cover;
    min-height: 100vh;
    overflow: hidden;
    overflow-y: scroll;
}

/* =========================
   LOADING SCREEN
========================= */

.loading-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: linear-gradient(135deg, #041e2c 0%, #0a344a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transform: scale(1);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.loading-screen.fade-out {
    opacity: 0;
    transform: scale(1.1);
    visibility: hidden;
}

.loading-content {
    text-align: center;
    color: #fff;
    animation: fadeInUp 1s ease-out;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #ffa500;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-content h2 {
    font-size: 24px;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #ffa500, #ff7b00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loading-content p {
    font-size: 16px;
    opacity: 0.8;
    animation: pulse 2s ease-in-out infinite;
}

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

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* =========================
   ANIMATIONS UTILITY
========================= */

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.fade-out {
    animation: fadeOut 0.3s ease-in forwards;
}

.slide-up {
    animation: slideUp 0.6s ease-out forwards;
}

.scale-in {
    animation: scaleIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes fadeOut {
    0% { opacity: 1; }
    100% { opacity: 0; visibility: hidden; }
}

@keyframes slideUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Aplicar animações nos cards */
.card {
    animation: slideUp 0.8s ease-out;
}

canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 40px;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.card {
    width: 100%;
    padding: 32px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    box-shadow: 0 20px 40px rgb(5 32 46 / 33%), 0 0 0 1px rgba(255, 255, 255, 0.05);
    max-width: 540px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #08233380;
    border: 1px solid #c4cdcc;
    max-height: fit-content;
    margin-top: 40px;
}

.card h2 {
    margin-bottom: 20px;
    font-size: 39px;
    font-weight: 800;
}

.card h2 span {
    background: -webkit-linear-gradient(298deg,
            rgb(254 162 2) 0%,
            rgb(255 125 0) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card input {
    width: 100%;
    padding: 14px;
    margin-bottom: 14px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transition: all 0.3s ease;
}

.card input:focus {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 2px rgba(255, 162, 0, 0.3);
    transform: translateY(-1px);
}

.card input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.3s ease;
}

.card input:focus::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.card .btn-primary {
    width: 100%;
    font-size: 16px;
    padding: 14px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    color: #000;
    background: -webkit-linear-gradient(298deg, rgb(255 162 0) 0%, rgb(255 125 0) 100%);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        filter 0.25s ease;
    margin-top: 16px;
    letter-spacing: 0;
}

.card .btn-primary:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow:
        0 12px 30px rgba (255, 125, 0, 0.35),
        0 4px 10px rgba(0, 0, 0, 0.15);
    filter: brightness(1.05);
}

.card .btn-primary:active {
    transform: translateY(0) scale(0.98);
    box-shadow:
        0 6px 15px rgba(255, 125, 0, 0.25);
}


.popup {
    margin-top: 16px;
    font-size: 14px;
    color: #7cffc2;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
}

.popup.show {
    opacity: 1;
    transform: translateY(0);
}

#qrcode {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.iti {
    width: 100%;
    margin-bottom: 14px;
}

.qr-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 28px;
}

.qr-actions>button {
    flex: 1 1 40%;
    font-size: 14px;
}

.qr-actions .dark-btn {
    background: #041b29;
    color: #fff;
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.qr-actions .light-btn {
    background: #fff;
    color: #041b29;
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.logo-make {
    max-width: 140px;
    position: absolute;
    top: 12px;
    left: 29px;
}

.qr-bg-option {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    gap: 20px;
}

#qrWhiteBg {
    width: 30px;
    height: 30px;
    margin-bottom: 0;

}

@media (max-width: 768px) {

    body {
        overflow-y: auto;
        background-position: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .container {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
        height: auto;
        min-height: unset;
        justify-content: flex-start;
    }

    .card {
        max-width: 100%;
        width: 100%;
        height: auto;
        padding: 20px 18px;
        justify-content: flex-start;
    }

    .card h2 {
        font-size: 22px;
        text-align: center;
        margin-bottom: 24px;
    }

    .card input {
        font-size: 15px;
        padding: 12px;
    }

    .card .btn-primary {
        padding: 14px;
        font-size: 15px;
    }

    .qr-actions {
        gap: 12px;
        width: 100%;
    }

    .qr-actions > button {
        flex: 1 1 100%;
        font-size: 14px;
        padding: 12px;
    }

    .qr-bg-option {
        gap: 12px;
        font-size: 13px;
    }

    #qrWhiteBg {
        width: 20px;
        height: 20px;
    }

    .popup {
        text-align: center;
        font-size: 13px;
    }

    .logo-make {
        margin: 20px auto 10px;
        max-width: 100px;
        top: 32px;
        position: relative;
        left: unset;
        transform: unset;
        margin-bottom: 40px;
    }
}
/* ===============================
   INPUT COM ÍCONE DE COLAR
=============================== */

.input-wrapper {
    position: relative;
    width: 100%;
}

/* garante espaço para o ícone */
.input-wrapper input {
    width: 100%;
    padding-right: 52px;
}

/* botão do ícone */
.paste-btn {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    opacity: 0.7;
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
    top: 8px;
}

/* SVG dentro do botão */
.paste-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    color: #ffffff;
}

/* hover desktop */
.paste-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* feedback ao clicar */
.paste-btn:active {
    transform: scale(0.95);
}

/* melhora área de toque no mobile */
@media (max-width: 768px) {
    .paste-btn {
        width: 36px;
        height: 36px;
        right: 10px;
    }

    .paste-btn svg {
        width: 20px;
        height: 20px;
    }

    .input-wrapper input {
        padding-right: 56px;
    }
}
/* =========================
   TEMPLATE DE MENSAGEM
========================= */

.message-template-row {
    width: 100%;
    margin-bottom: 10px;
}
.message-template-row option{
    background: #041b29;
    color: #ffffff;
}
.message-template-select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 14px;
    outline: none;
    appearance: none;
}

.message-template-select:focus {
    border-color: rgba(255, 162, 0, 0.8);
}


/* =========================
   AÇÕES DO WHATSAPP
========================= */

.wpp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    margin-top: 14px;
}

.wpp-actions .btn-secondary {
    flex: 1 1 48%;
    padding: 12px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    background: #041b29;
    color: #ffffff;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        filter 0.25s ease;
}

.wpp-actions .btn-secondary:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
    filter: brightness(1.05);
}

.wpp-actions .btn-secondary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.35);
}


/* =========================
   AJUDA E VALIDAÇÃO DO TELEFONE
========================= */

.phone-help {
    width: 100%;
    font-size: 12px;
    color: #ff9a9a;
    margin-top: 4px;
    margin-bottom: 8px;
    text-align: left;
    min-height: 16px;
}

.card input.is-valid {
    box-shadow: 0 0 0 1px rgba(124, 255, 194, 0.8);
}

.card input.is-invalid {
    box-shadow: 0 0 0 1px rgba(255, 120, 120, 0.9);
}


/* =========================
   HISTÓRICO DE LINKS WPP
========================= */

.wpp-history {
    width: 100%;
    margin-top: 20px;
}

.history-title {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.85;
    margin-bottom: 8px;
    text-align: left;
}

.history-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 140px;
    overflow-y: auto;
    padding-right: 2px;
}

.history-item {
    width: 100%;
    border-radius: 10px;
    padding: 9px 12px;
    border: none;
    background: rgba(4, 27, 41, 0.9);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 13px;
    color: #ffffff;
    text-align: left;
    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.history-item:hover {
    background: rgba(4, 27, 41, 1);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.history-phone {
    font-weight: 600;
    letter-spacing: 1px;
}

.history-msg {
    font-size: 12px;
    opacity: 0.8;
    margin-left: 8px;
    letter-spacing: 0.4px;
}

.history-empty {
    font-size: 13px;
    opacity: 0.7;
    text-align: left;
}


/* =========================
   AJUSTES MOBILE PARA ESSAS ÁREAS
========================= */

@media (max-width: 768px) {
    .wpp-actions {
        flex-direction: column;
        gap: 8px;
    }

    .wpp-actions .btn-secondary {
        flex: 1 1 100%;
        font-size: 14px;
        padding: 12px;
    }

    .wpp-history {
        margin-top: 16px;
    }

    .history-list {
        max-height: 120px;
    }
}

/* =========================
   BOTÃO "PERSONALIZAR QR"
========================= */

.qr-customize-toggle {
    width: 100%;
    margin-top: 10px;
    margin-bottom: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(4, 27, 41, 0.85);
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.qr-customize-toggle:hover {
    background: rgba(4, 27, 41, 1);
    border-color: rgba(255, 255, 255, 0.28);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
    transform: translateY(-1px);
}

.qr-customize-toggle:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.35);
}

.qr-toggle-icon {
    font-weight: 700;
    font-size: 16px;
    opacity: 0.9;
}


/* =========================
   PAINEL DE PERSONALIZAÇÃO
========================= */

.qr-options {
    width: 100%;
    margin-bottom: 10px;
    padding: 20px;
    border-radius: 14px;
    background: rgba(4, 27, 41, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 28px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s ease;
}

/* painel aberto */
.qr-options.open {
    max-height: 1000px; /* valor alto suficiente */
    opacity: 1;
}
.qr-option-row {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}


/* =========================
   COR DO QR
========================= */

.qr-color-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    font-size: 13px;
    opacity: 0.9;
}

.qr-color-option input[type="color"] {
    width: 42px;
    height: 28px;
    border-radius: 8px;
    border: none;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

/* =========================
   COR DO FUNDO DO QR
========================= */

.qr-bg-color-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    font-size: 13px;
    opacity: 0.9;
}

.qr-bg-color-option input[type="color"] {
    width: 42px;
    height: 28px;
    border-radius: 8px;
    border: none;
    padding: 0;
    background: transparent;
    cursor: pointer;
}


/* =========================
   TAMANHO DO PNG
========================= */

.qr-size-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 130px;
    font-size: 13px;
    opacity: 0.9;
    flex-direction: row;
}

.qr-size-option select {
    flex: 0 0 auto;
    min-width: 140px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    font-size: 13px;
    outline: none;
    appearance: none;
}


/* =========================
   LOGO NO CENTRO DO QR
========================= */

.qr-logo-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
}

.qr-logo-input-label,
.qr-logo-scale-label {
    display: flex;
    flex-direction: column;
    gap: 14px;
    font-size: 13px;
    opacity: 0.9;
    width: 100%;
}
.qr-file-upload{
    padding: 14px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}
.qr-logo-input-label input[type="file"] {
    font-size: 12px;
    border-radius: 8px;
    padding: 6px 0;
    cursor: pointer;
}
.qr-file-btn {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 11px;
    cursor: pointer;
}
.qr-file-name{
    color: #ffffffaf;
    font-size: 9px;
}
.qr-logo-scale-label input[type="number"] {
    width: 100%;
    max-width: 120px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    font-size: 13px;
    outline: none;
    margin-bottom: 0;
}
.qr-logo-scale-label{
    flex-direction: row;
    align-items: center;
}

/* botão de limpar logo */
.qr-logo-clear-btn {
    align-self: flex-start;
    margin-top: 2px;
    padding: 6px 10px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.qr-logo-clear-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
    transform: translateY(-1px);
}

.qr-logo-clear-btn:active {
    transform: translateY(0) scale(0.97);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
}


/* =========================
   AJUSTE DO "FUNDO BRANCO"
========================= */

.qr-bg-option {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    opacity: 0.9;
    margin-top: 4px;
}

.qr-bg-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-bottom: 0;
}
  

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {
    .qr-customize-toggle {
        font-size: 13px;
        padding: 9px 12px;
        margin-top: 12px;
    }

    .qr-options {
        padding: 10px 10px 8px;
        gap: 19px;
    }

    .qr-option-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .qr-size-option select {
        width: -webkit-fill-available;
        max-width: 100%;
    }

    .qr-logo-scale-label input[type="number"] {
        max-width: 130px;
    }

    .qr-bg-option {
        font-size: 12px;
    }
}
    .qr-bg-color-option input:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
