/* Importação de fonte */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Fundo geral */
body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    background: linear-gradient(90deg, #6A11CB 0%, #9A4FB8 35%, #C7645C 70%, #F76B1C 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Header */
header {
    width: 100%;
    text-align: center;
    padding: 20px 0;
    color: white;
    font-size: 30px;
    letter-spacing: 2px;
    font-weight: 600;
}

/* Container */
.container {
    background: white;
    width: 90%;
    max-width: 420px;
    padding: 25px 30px;
    margin-top: 20px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    animation: fadeSlide .6s ease;
}

/* Título */
.container h2 {
    text-align: center;
    margin-bottom: 20px;
    font-weight: 600;
    color: #333;
}

/* Labels */
label {
    font-size: 14px;
    font-weight: 500;
    color: #444;
}

/* Inputs */
input, select {
    width: 100%;
    padding: 12px 14px;
    margin: 6px 0 15px 0;
    border-radius: 8px;
    border: 1px solid #bbb;
    font-size: 15px;
    transition: .2s;
}

input:focus,
select:focus {
    outline: none;
    border-color: #6A0DAD;
    box-shadow: 0 0 5px rgba(106, 13, 173, 0.4);
}

/* Grupo telefone */
.phone-group {
    display: flex;
    gap: 10px;
}

.phone-group select {
    width: 35%;
}

.phone-group input {
    width: 65%;
}

/* Botão */
button {
    width: 100%;
    padding: 12px 0;
    background: #6A0DAD;
    border: none;
    color: white;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: .3s;
}

button:hover {
    background: #5b0b99;
    transform: translateY(-1px);
}

/* Mensagens */
.error-message,
.success-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    animation: fadeSlide .4s ease;
}

.error-message {
    background: #ffdddd;
    border-left: 4px solid #d11a2a;
    color: #b3001f;
}

.success-message {
    background: #ddffdd;
    border-left: 4px solid #2d9d39;
    color: #197a25;
}

p {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
}

a {
    color: #6A0DAD;
    text-decoration: none;
    font-weight: 600;
}

a:hover {
    text-decoration: underline;
}

/* Animação */
@keyframes fadeSlide {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Estilos para o Modal */
.modal {
    display: none; /* Escondido por padrão */
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5); /* Overlay escuro */
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    animation: fadeSlide .4s ease;
}

.modal-content h3 {
    color: #2d9d39;
    margin-bottom: 10px;
}

.modal-content p {
    color: #333;
    margin-bottom: 20px;
}

.modal-content button {
    width: auto;
    padding: 10px 20px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}