@import "./globals.css";

.header {
    background-color: transparent;
}

/* Container principal */
.page-container {
    max-width: 1280px;
    width: 100%;
    min-height: 100vh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Background Elements */
.bg-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 1;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(115, 155, 97, 0.1) 0%, rgba(102, 126, 234, 0.1) 100%);
    border: 1px solid rgba(115, 155, 97, 0.2);
    animation: float 8s ease-in-out infinite;
}

.shape-1 {
    width: 200px;
    height: 200px;
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    bottom: -75px;
    left: -75px;
    animation-delay: 2s;
}

.shape-3 {
    width: 100px;
    height: 100px;
    top: 30%;
    left: 10%;
    animation-delay: 4s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg) scale(1);
        opacity: 0.7;
    }

    50% {
        transform: translateY(-20px) rotate(180deg) scale(1.1);
        opacity: 1;
    }
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(115, 155, 97, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(102, 126, 234, 0.05) 0%, transparent 50%);
    z-index: 2;
}

/* Header */
.header {
    width: 100%;
    padding: 2rem 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 10;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo {
    max-width: 200px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(115, 155, 97, 0.2));
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 12px rgba(115, 155, 97, 0.3));
}

/* Main Content */
.main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    position: relative;
    z-index: 10;
}

.recovery-card {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.card-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.card-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-title);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.card-header p {
    color: var(--color-text);
    font-size: 1rem;
    font-weight: 500;
}

/* Formulário */
.recovery-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-fields {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.field-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-title);
    letter-spacing: 0.02em;
}

.field-group label i {
    color: var(--color-primary);
    font-size: 0.8rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: var(--color-surface);
    color: var(--color-text);
    transition: var(--transition);
    box-sizing: border-box;
    font-family: var(--font-base);
}

.input-wrapper input::placeholder {
    color: var(--color-placeholder);
    font-size: 0.95rem;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: var(--color-surface);
    box-shadow: 0 0 0 4px rgba(115, 155, 97, 0.1);
}

/* Info Card */
.info-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(115, 155, 97, 0.05) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: var(--transition);
}

.info-card:hover {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: var(--shadow-sm);
}

.info-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--color-info) 0%, var(--color-primary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.info-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-title);
    margin-bottom: 0.5rem;
}

.info-content p {
    font-size: 0.9rem;
    color: var(--color-text);
    line-height: 1.5;
    margin: 0;
}

/* Botões */
.form-buttons {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-base);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.form-btn.primary-btn {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.form-btn.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.form-btn.primary-btn:active {
    transform: translateY(0);
}

.form-btn.secondary-btn {
    background: var(--color-surface);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.form-btn.secondary-btn:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.form-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loader {
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Divisor */
.divider {
    text-align: center;
    position: relative;
    margin: 1rem 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--color-border);
}

.divider span {
    background: var(--color-surface);
    padding: 0 1rem;
    color: var(--color-placeholder);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Footer */
.footer {
    padding: 1.5rem;
    text-align: center;
    position: relative;
    z-index: 10;
}

.footer p {
    color: var(--color-text);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Success Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
}

.success-modal .modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-success) 0%, var(--color-primary) 100%);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
    position: relative;
}

.success-icon {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--color-success) 0%, var(--color-primary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    box-shadow: var(--shadow-lg);
}

.modal-header h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-title);
    text-align: center;
    width: 100%;
    margin-top: 1rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-placeholder);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-default);
    transition: var(--transition);
    position: absolute;
    top: 0;
    right: 0;
}

.close-btn:hover {
    background: rgba(115, 155, 97, 0.1);
    color: var(--color-primary);
}

.modal-body {
    text-align: center;
}

.modal-body p {
    color: var(--color-text);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.modal-body p:last-of-type {
    margin-bottom: 2rem;
}

.modal-body strong {
    color: var(--color-primary);
    font-weight: 600;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.action-buttons .form-btn {
    margin: 0;
}

/* Responsividade */
@media (max-width: 768px) {
    .header {
        padding: 1.5rem 1rem;
    }

    .logo {
        max-width: 160px;
    }

    .main {
        padding: 1.5rem 1rem;
    }

    .recovery-card {
        padding: 2rem 1.5rem;
        border-radius: var(--radius-lg);
    }

    .card-header h2 {
        font-size: 1.75rem;
    }

    .info-card {
        padding: 1.25rem;
        flex-direction: column;
        text-align: center;
    }

    .info-icon {
        align-self: center;
    }

    .modal-content {
        padding: 2rem 1.5rem;
        margin: 1rem;
        max-height: 85vh;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 1rem 0.75rem;
    }

    .logo {
        max-width: 140px;
    }

    .main {
        padding: 1rem 0.75rem;
    }

    .recovery-card {
        padding: 1.5rem 1rem;
        border-radius: var(--radius-md);
    }

    .card-header h2 {
        font-size: 1.5rem;
    }

    .card-header p {
        font-size: 0.9rem;
    }

    .input-wrapper input {
        padding: 0.875rem;
        font-size: 0.95rem;
    }

    .form-btn {
        padding: 0.875rem;
        font-size: 0.95rem;
    }

    .info-card {
        padding: 1rem;
    }

    .info-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .modal-content {
        padding: 1.5rem 1rem;
        margin: 0.5rem;
        border-radius: var(--radius-lg);
    }

    .modal-header h3 {
        font-size: 1.5rem;
    }

    .success-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}

@media (max-width: 360px) {
    .header {
        padding: 0.75rem 0.5rem;
    }

    .logo {
        max-width: 120px;
    }

    .main {
        padding: 0.75rem 0.5rem;
    }

    .recovery-card {
        padding: 1.25rem 0.75rem;
        border-radius: var(--radius-md);
    }

    .card-header h2 {
        font-size: 1.25rem;
    }

    .card-header p {
        font-size: 0.85rem;
    }

    .modal-content {
        padding: 1.25rem 0.75rem;
        margin: 0.25rem;
    }
}

/* Animações de entrada */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.recovery-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Estados de hover e focus aprimorados */
.form-btn:hover {
    transform: translateY(-2px);
}

.form-btn:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(115, 155, 97, 0.2);
}

/* Melhorias de acessibilidade */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Modo escuro (opcional) */
@media (prefers-color-scheme: dark) {
    :root {
        --color-bg: #1a1a1a;
        --color-surface: #2d2d2d;
        --color-text: #e0e0e0;
        --color-title: #ffffff;
        --color-border: #404040;
        --color-placeholder: #808080;
    }

    .page-container {
        background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    }
}