/* Project font: Designer */
@font-face {
    font-family: 'Designer';
    src: url('../../fonts/Designer.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
:root { --font-primary: 'Designer', serif; }

/* Garantir fonte em todos os elementos de texto */
body, button, input, select, textarea { font-family: var(--font-primary); }

/* Estilos para páginas de autenticação (login e cadastro) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background: url('../../assets/imagens/Geral/loginback.png') center center / cover no-repeat fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #f4e4bc;
    position: relative;
}

/* Overlay escuro para melhorar legibilidade */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

.auth-container {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.auth-box {
    background: rgba(20, 15, 10, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(218, 165, 32, 0.6);
    border-radius: 12px;
    padding: 28px 25px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

/* Efeito de brilho sutil */
.auth-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(218, 165, 32, 0.1), transparent);
    transition: left 0.5s;
}

.auth-box:hover::before {
    left: 100%;
}

/* Seletor de Idiomas - Estilo Dropdown Moderno */
.language-selector {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(218, 165, 32, 0.3);
}

.language-dropdown {
    position: relative;
    display: inline-block;
}

.language-current {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(218, 165, 32, 0.15);
    border: 2px solid rgba(218, 165, 32, 0.5);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 120px;
    justify-content: space-between;
    backdrop-filter: blur(5px);
}

.language-current:hover {
    border-color: #daa520;
    background: rgba(218, 165, 32, 0.25);
    box-shadow: 0 4px 15px rgba(218, 165, 32, 0.3);
    transform: translateY(-2px);
}

.flag-img {
    width: 18px;
    height: 14px;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.dropdown-arrow {
    font-size: 12px;
    color: #daa520;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: bold;
}

.language-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.language-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(20, 15, 10, 0.98);
    backdrop-filter: blur(15px);
    border: 2px solid rgba(218, 165, 32, 0.5);
    border-top: none;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.language-dropdown.open .language-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid rgba(139, 69, 19, 0.25);
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background: rgba(218, 165, 32, 0.2);
}

.language-option:hover .lang-name {
    color: #ffffff;
}

.language-option.active {
    background: rgba(218, 165, 32, 0.25);
    font-weight: 600;
    color: #ffffff;
}

.language-option.active .lang-name {
    color: #ffffff;
    font-weight: 600;
}

.language-option .flag {
    font-size: 18px;
}

.language-option .lang-name {
    font-size: 14px;
    color: #f4e4bc;
    font-weight: 500;
}

/* Título Principal */
.auth-box h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #daa520;
    font-size: 22px;
    font-weight: 700;
    font-family: var(--font-primary);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    letter-spacing: 0.5px;
}

/* Grupos de Formulário */
.form-group {
    margin-bottom: 18px;
    position: relative;
}

/* Layout em linha para campos relacionados */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 18px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #f4e4bc;
    font-weight: 600;
    font-size: 13px;
    font-family: var(--font-primary);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Campos de Entrada Modernos */
.form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid rgba(218, 165, 32, 0.4);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.95);
    color: #2f1b14;
    backdrop-filter: blur(5px);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-group input::placeholder {
    color: rgba(47, 27, 20, 0.6);
    font-style: italic;
    font-size: 13px;
    font-family: var(--font-primary);
}

.form-group input:focus {
    outline: none;
    border-color: #daa520;
    box-shadow: 
        0 0 0 2px rgba(218, 165, 32, 0.2),
        inset 0 2px 4px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

.form-group input:hover {
    border-color: rgba(218, 165, 32, 0.6);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Botão de Autenticação Moderno */
.auth-button {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #daa520 0%, #b8860b 100%);
    color: #2f1b14;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 
        0 4px 15px rgba(218, 165, 32, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.auth-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.auth-button:hover {
    background: linear-gradient(135deg, #f4d03f 0%, #daa520 100%);
    box-shadow: 
        0 6px 20px rgba(218, 165, 32, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.auth-button:hover::before {
    left: 100%;
}

.auth-button:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 10px rgba(218, 165, 32, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Links de Navegação Modernos */
.auth-links {
    text-align: center;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid rgba(218, 165, 32, 0.3);
}

.auth-links p {
    margin-bottom: 12px;
    color: #f4e4bc;
    font-size: 15px;
    font-family: var(--font-primary);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.auth-links a {
    color: #f4e4bc;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    margin: 0 4px;
    background: rgba(218, 165, 32, 0.1);
    border: 1px solid rgba(218, 165, 32, 0.3);
}

.auth-links a:hover {
    color: #daa520;
    background: rgba(218, 165, 32, 0.2);
    border-color: rgba(218, 165, 32, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(218, 165, 32, 0.2);
}

/* Mensagens de Erro Modernas */
.error-message {
    background: rgba(220, 53, 69, 0.9);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid rgba(220, 53, 69, 0.5);
    box-shadow: 
        0 4px 15px rgba(220, 53, 69, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Responsividade */
@media (max-width: 768px) {
    .auth-container {
        max-width: 320px;
        margin: 15px auto;
    }
    
    .auth-box {
        padding: 20px 18px;
        border-radius: 10px;
    }
    
    .auth-box h2 {
        font-size: 20px;
        margin-bottom: 18px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-row .form-group {
        margin-bottom: 15px;
    }
    
    .form-group input {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .auth-button {
        padding: 12px 18px;
        font-size: 14px;
    }
    
    .language-current {
        min-width: 100px;
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    .auth-container {
        max-width: 280px;
        margin: 10px auto;
    }
    
    .auth-box {
        padding: 18px 15px;
    }
    
    .auth-box h2 {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-row .form-group {
        margin-bottom: 12px;
    }
    
    .form-group input {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .auth-button {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .language-current {
        min-width: 90px;
        padding: 5px 8px;
    }
    
    .auth-links a {
        font-size: 12px;
        padding: 5px 8px;
    }
}

.success-message {
    background: rgba(34,139,34,0.15);
    color: #c9f7c9;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 16px;
    border: 1px solid rgba(34,139,34,0.4);
    font-size: 14px;
}

/* Responsividade */
@media (max-width: 480px) {
    .auth-box {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .auth-box h2 {
        font-size: 24px;
    }
    
    .form-group input {
        font-size: 16px; /* Evita zoom no iOS */
    }
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-box {
    animation: fadeIn 0.6s ease-out;
}