:root {
    --gold: #B8860B;
    --white: #ffffff;
    --light-gold: rgba(184, 134, 11, 0.1);
    --duration: 2s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

body {
    background: #0a0f1c;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.cosmic-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle var(--duration) infinite;
}

.nebula {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.2;
    animation: float 20s infinite ease-in-out;
}

.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.form-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    position: relative;
}

.form-box::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 10%;
    width: 80%;
    height: 16px;
    background: var(--gold);
    border-radius: 8px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    width: 60px;
    height: 60px;
    margin-bottom: 30px;
    animation: pulse 2s infinite;
}

h1 {
    color: var(--gold);
    font-size: 24px;
    font-weight: 600;
}

.input-group {
    position: relative;
    margin-bottom: 30px;
}

input {
    width: 100%;
    padding: 10px 0;
    border: none;
    border-bottom: 2px solid #ddd;
    outline: none;
    font-size: 16px;
    background: transparent;
    transition: 0.3s;
}

label {
    position: absolute;
    top: 10px;
    left: 0;
    font-size: 16px;
    color: #999;
    pointer-events: none;
    transition: 0.3s;
}

.highlight {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: var(--gold);
    transition: 0.3s;
}

input:focus ~ label,
input:valid ~ label {
    top: -20px;
    font-size: 12px;
    color: var(--gold);
}

input:focus ~ .highlight,
input:valid ~ .highlight {
    width: 100%;
}

button {
    width: 100%;
    padding: 15px;
    background: var(--gold);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(184, 134, 11, 0.3);
}

button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

button:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

.terms-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.terms-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.terms-group label {
    position: static;
    color: #666;
    font-size: 14px;
    cursor: pointer;
}

.terms-link {
    color: var(--gold);
    text-decoration: underline;
    cursor: pointer;
}

.shortcuts {
    margin-top: 20px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.shortcuts a {
    color: var(--gold);
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
}

.shortcuts a:hover {
    text-decoration: underline;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: var(--gold);
}

/* Customização do intl-tel-input */
.iti {
    width: 100%;
}

.iti__flag {
    background-image: url("https://cdn.jsdelivr.net/npm/intl-tel-input@18.2.1/build/img/flags.png");
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .iti__flag {
        background-image: url("https://cdn.jsdelivr.net/npm/intl-tel-input@18.2.1/build/img/flags@2x.png");
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(50px, 50px); }
    50% { transform: translate(0, 100px); }
    75% { transform: translate(-50px, 50px); }
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(100, 100);
        opacity: 0;
    }
}