/* ===== RESET / BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, system-ui, sans-serif;
}

body {
    background: linear-gradient(145deg, #0f172a 0%, #1e293b 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.tool-container {
    max-width: 800px;
    width: 100%;
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 40px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.8);
    color: #f1f5f9;
}

/* ===== CABEÇALHO ===== */
.tool-header {
    margin-bottom: 2rem;
    text-align: center;
}

.tool-header .back-link {
    display: inline-block;
    color: #94a3b8;
    text-decoration: none;
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: color 0.2s;
}

.tool-header .back-link:hover {
    color: #60a5fa;
}

.tool-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #25d366, #128C7E);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tool-header h1 i {
    margin-right: 0.5rem;
    background: none;
    -webkit-text-fill-color: #25d366;
}

.tool-header p {
    color: #cbd5e1;
    font-size: 1.1rem;
}

/* ===== FORMULÁRIO ===== */
.tool-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-weight: 600;
    color: #e2e8f0;
    font-size: 1rem;
}

.phone-input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.phone-input-wrapper:focus-within {
    border-color: #60a5fa;
}

.country-code {
    background: rgba(255,255,255,0.05);
    padding: 0 1rem;
    font-size: 1.2rem;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    border-right: 1px solid rgba(255,255,255,0.1);
    height: 50px;
}

.phone-input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0 1rem;
    height: 50px;
    color: white;
    font-size: 1rem;
    outline: none;
}

.phone-input-wrapper input::placeholder {
    color: #475569;
}

textarea {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 1rem;
    color: white;
    font-size: 1rem;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
}

textarea:focus {
    border-color: #60a5fa;
}

.input-group small {
    color: #94a3b8;
    font-size: 0.85rem;
}

kbd {
    background: #1e293b;
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
    border: 1px solid #475569;
}

/* ===== OPÇÕES ===== */
.options {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 0.5rem 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #cbd5e1;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #25d366;
    cursor: pointer;
}

/* ===== BOTÃO GERAR ===== */
.btn-generate {
    background: linear-gradient(135deg, #25d366, #128C7E);
    border: none;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    padding: 1rem;
    border-radius: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 10px 20px -8px rgba(0,0,0,0.5);
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -8px #25d36655;
}

.btn-generate i {
    font-size: 1.3rem;
}

/* ===== ÁREA DE RESULTADO ===== */
.result-area {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(0,0,0,0.2);
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.05);
    animation: fadeIn 0.3s ease;
}

.result-area label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.link-box {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.link-box input {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    color: #60a5fa;
    font-size: 0.9rem;
    outline: none;
}

.btn-copy {
    background: #334155;
    border: none;
    color: white;
    padding: 0 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-copy:hover {
    background: #475569;
}

/* ===== BOTÃO QR CODE ===== */
.btn-qr {
    background: #334155;
    border: none;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    margin: 1rem 0 0.5rem;
    transition: background 0.2s;
}

.btn-qr:hover {
    background: #475569;
}

#qrContainer {
    margin: 1.5rem 0;
    background: white;
    padding: 1rem;
    border-radius: 20px;
    display: inline-block;
    width: auto;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.5);
}

#qrCanvas {
    display: block;
    margin: 0 auto;
    border-radius: 12px;
}

/* ===== PREVIEW E TESTE ===== */
.preview {
    background: rgba(255,255,255,0.02);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.2rem;
}

.preview p {
    color: #cbd5e1;
    word-break: break-word;
    margin-top: 0.4rem;
}

.btn-test {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid #60a5fa;
    color: #60a5fa;
    text-decoration: none;
    padding: 0.7rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-test:hover {
    background: #60a5fa20;
    border-color: #93c5fd;
}

/* ===== CAIXA DE INFORMAÇÃO ===== */
.info-box {
    margin-top: 2.5rem;
    padding: 1.5rem;
    background: rgba(255,255,255,0.02);
    border-radius: 24px;
    border-left: 4px solid #25d366;
}

.info-box h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #e2e8f0;
    margin-bottom: 1rem;
}

.info-box ol {
    padding-left: 1.5rem;
    color: #cbd5e1;
    line-height: 1.8;
}

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

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 600px) {
    .tool-container {
        padding: 1.5rem;
    }
    .tool-header h1 {
        font-size: 1.8rem;
    }
    .link-box {
        flex-direction: column;
    }
    .btn-copy {
        padding: 0.8rem;
        justify-content: center;
    }
}
/* Ações do QR Code (botões lado a lado) */
.qr-actions {
    display: flex;
    gap: 1rem;
    margin: 1rem 0 0.5rem;
    flex-wrap: wrap;
}

.btn-qr, .btn-pdf {
    background: #334155;
    border: none;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    transition: background 0.2s;
    flex: 1 1 auto;
}

.btn-qr:hover, .btn-pdf:hover {
    background: #475569;
}

.btn-pdf {
    background: #2563eb;
}

.btn-pdf:hover {
    background: #3b82f6;
}

#qrContainer {
    margin: 1.5rem 0;
    background: white;
    padding: 1rem;
    border-radius: 20px;
    display: inline-block;
    width: auto;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.5);
}

#qrCanvas {
    display: block;
    margin: 0 auto;
    border-radius: 12px;
}