/* Palavra-passe */

/* Banner */
.password-banner {
    position: relative;
    width: 100%;
    height: 340px;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
                url('Imagens/2.png') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 80px;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.banner-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 800px;
    padding: 0 20px;
}

.banner-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.banner-content p {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

/* Palavra-passe */
.password-recovery {
    padding: 80px 0;
    background-color: var(--dark-color);
}

.recovery-container {
    max-width: 500px;
    margin: 0 auto;
    background: var(--medium-dark-color);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--box-shadow-heavy);
}

.recovery-mensagem {
    display: none;
    padding: 14px 18px;
    margin-bottom: 24px;
    border-radius: 10px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    animation: fadeIn 0.3s ease;
}

.recovery-mensagem.success {
    display: block;
    background: rgba(40, 167, 69, 0.15);
    border: 1px solid #28a745;
    color: #28a745;
}

.recovery-mensagem.error {
    display: block;
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid #dc3545;
    color: #ff6b6b;
}

.recovery-mensagem i {
    margin-right: 8px;
}

.recovery-step {
    display: none;
}

.recovery-step.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 15px;
    font-size: 1.2rem;
}

.step-header h2 {
    font-size: 1.8rem;
    color: var(--light-color);
}

.recovery-step p {
    color: var(--grey-color);
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Formulário */
.recovery-form {
    margin-bottom: 30px;
}

.form-group {
    position: relative;
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--light-color);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    background: var(--dark-color);
    border: 2px solid var(--grey-color);
    border-radius: 8px;
    color: var(--light-color);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 54px;
    transform: translateY(-50%);
    color: var(--grey-color);
    font-size: 1.2rem;
    pointer-events: none;
}

.form-group input:focus + .input-icon {
    color: var(--primary-color);
}

.error-message {
    display: block;
    min-height: 20px;
    margin-top: 6px;
    color: #ff4d4d;
    font-size: 0.8rem;
}

.code-error {
    text-align: center;
    margin-top: -8px;
    margin-bottom: 18px;
}

.btn-full {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
}

.btn-full:disabled {
    cursor: not-allowed;
    opacity: 0.75;
}

/* Palavra-passe */
.code-inputs {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 10px;
}

.code-input {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--dark-color);
    border: 2px solid var(--grey-color);
    border-radius: 8px;
    color: var(--light-color);
    transition: border-color 0.3s ease;
}

.code-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.code-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.btn-link:hover {
    color: var(--light-color);
}

.btn-link:disabled {
    color: var(--grey-color);
    cursor: not-allowed;
}

#countdown {
    color: var(--grey-color);
    font-size: 0.9rem;
}

.password-strength {
    margin-top: 10px;
}

.strength-bar {
    height: 5px;
    background: var(--grey-color);
    border-radius: 5px;
    margin-bottom: 5px;
    overflow: hidden;
}

.strength-bar::before {
    content: '';
    display: block;
    height: 100%;
    width: var(--strength-width, 0%);
    background: #ff2800;
    border-radius: 5px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-bar.medium::before {
    background: #ffa500;
}

.strength-bar.strong::before {
    background: #4CAF50;
}

.strength-text {
    font-size: 0.8rem;
    color: var(--grey-color);
}

.password-match {
    display: flex;
    align-items: center;
    margin-top: 10px;
    color: var(--grey-color);
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.password-match.active {
    opacity: 1;
    color: #4CAF50;
}

.password-match i {
    margin-right: 5px;
}

.password-requirements {
    background: var(--dark-color);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.password-requirements h4 {
    color: var(--light-color);
    margin-bottom: 15px;
    font-size: 1rem;
}

.password-requirements ul {
    list-style: none;
}

.password-requirements li {
    color: var(--grey-color);
    margin-bottom: 8px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}

.password-requirements li::before {
    content: '✗';
    margin-right: 10px;
    color: #ff2800;
}

.password-requirements li.valid {
    color: #4CAF50;
}

.password-requirements li.valid::before {
    content: '✓';
    color: #4CAF50;
}

.step-confirmation {
    text-align: center;
    padding: 20px 0;
}

.confirmation-icon {
    font-size: 4rem;
    color: #4CAF50;
    margin-bottom: 20px;
}

.confirmation-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.recovery-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.recovery-links a {
    color: var(--grey-color);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.recovery-links a:hover {
    color: var(--primary-color);
}

.recovery-links a span {
    color: var(--primary-color);
    font-weight: 600;
}

/* Dicas */
.security-tips {
    margin-top: 60px;
    text-align: center;
}

.security-tips h3 {
    font-size: 1.8rem;
    margin-bottom: 40px;
    color: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.security-tips h3 i {
    color: var(--primary-color);
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.tip-card {
    background: var(--medium-dark-color);
    padding: 30px 20px;
    border-radius: var(--border-radius);
    transition: transform 0.3s ease;
}

.tip-card:hover {
    transform: translateY(-5px);
}

.tip-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.tip-card h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--light-color);
}

.tip-card p {
    color: var(--grey-color);
    font-size: 0.9rem;
    line-height: 1.5;
}

input.valid {
    border-color: #4CAF50 !important;
}

input.invalid {
    border-color: #ff2800 !important;
}

/* Popup */
.recovery-site-popup {
    position: fixed;
    right: 26px;
    bottom: 26px;
    z-index: 10000;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    width: min(420px, calc(100vw - 32px));
    padding: 16px;
    background-color: #181818;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 4px solid var(--primary-color);
    border-radius: 12px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.recovery-site-popup.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.recovery-site-popup.success {
    border-left-color: #28a745;
}

.recovery-site-popup.error {
    border-left-color: #ff4d4d;
}

.recovery-popup-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 40, 0, 0.12);
    color: var(--primary-color);
    border-radius: 50%;
    font-size: 1.2rem;
}

.recovery-site-popup.success .recovery-popup-icon {
    background-color: rgba(40, 167, 69, 0.14);
    color: #28a745;
}

.recovery-site-popup.error .recovery-popup-icon {
    background-color: rgba(255, 77, 77, 0.14);
    color: #ff4d4d;
}

.recovery-popup-text {
    min-width: 0;
}

.recovery-popup-text strong,
.recovery-popup-text span {
    display: block;
}

.recovery-popup-text strong {
    color: var(--light-color);
    margin-bottom: 3px;
}

.recovery-popup-text span {
    color: var(--grey-color);
    line-height: 1.4;
}

.recovery-popup-close {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    color: var(--grey-color);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.recovery-popup-close:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--light-color);
}

/* Efeitos */
@media (max-width: 768px) {
    .password-banner {
        height: 280px;
    }
    
    .banner-content h1 {
        font-size: 2.2rem;
    }
    
    .banner-content p {
        font-size: 1.1rem;
    }
    
    .recovery-container {
        padding: 30px 20px;
        margin: 0 20px;
    }
    
    .step-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .step-number {
        margin-right: 0;
    }
    
    .code-inputs {
        gap: 5px;
    }
    
    .code-input {
        width: 45px;
        height: 55px;
        font-size: 1.3rem;
    }
    
    .recovery-links {
        flex-direction: column;
        text-align: center;
    }
    
    .confirmation-actions {
        flex-direction: column;
    }

    .recovery-site-popup {
        right: 16px;
        bottom: 16px;
    }
}

@media (max-width: 480px) {
    .password-banner {
        height: 240px;
    }
    
    .banner-content h1 {
        font-size: 1.8rem;
    }
    
    .password-recovery {
        padding: 50px 0;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
}
