/* ============================================
   R.I.S.A EDUCATOR - LOGIN STYLES
   Versão 1.21 - 2026
   ============================================ */

/* RESET */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

/* VARIÁVEIS DE COR */
:root {
    /* Paleta de cores da logo */
    --risa-navy: #1e3a5f;
    --risa-navy-dark: #152b47;
    --risa-orange: #f47920;
    --risa-orange-hover: #d66615;
    --risa-blue-light: #e8f1f8;
    --risa-blue-medium: #3b5998;
    --risa-circuit: #ff8c42;
    
    /* Gradientes */
    --gradient-bg: linear-gradient(135deg, #e8f1f8 0%, #f0f7fc 50%, #ffffff 100%);
    --gradient-card: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.95) 100%);
    --gradient-button: linear-gradient(135deg, var(--risa-orange) 0%, #d66615 100%);
    
    /* Sombras */
    --shadow-card: 0 20px 60px rgba(30, 58, 95, 0.12), 0 8px 24px rgba(30, 58, 95, 0.08);
    --shadow-button: 0 8px 20px rgba(244, 121, 32, 0.35);
    --shadow-button-hover: 0 12px 28px rgba(244, 121, 32, 0.45);
}

/* BODY E LAYOUT PRINCIPAL */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--gradient-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Efeitos de circuitos animados no fundo */
body::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(244, 121, 32, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 8s ease-in-out infinite;
}

body::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(59, 89, 152, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 10s ease-in-out infinite reverse;
}

@keyframes pulse {
    0%, 100% { transform: scale(1) translateY(0); opacity: 0.3; }
    50% { transform: scale(1.1) translateY(-20px); opacity: 0.5; }
}

/* ============================================
   ELEMENTOS VISUAIS DE FUNDO (SVG Ilustrações)
   ============================================ */

.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

/* Estilos base para SVGs */
.bg-svg {
    position: absolute;
    filter: drop-shadow(0 4px 12px rgba(30, 58, 95, 0.15));
    animation: float-svg 20s ease-in-out infinite;
}

/* Animação de flutuação suave */
@keyframes float-svg {
    0%, 100% { 
        transform: translateY(0) rotate(0deg) scale(1); 
        opacity: 0.8;
    }
    25% { 
        transform: translateY(-15px) rotate(2deg) scale(1.05); 
        opacity: 1;
    }
    50% { 
        transform: translateY(-8px) rotate(-2deg) scale(1.02); 
        opacity: 0.9;
    }
    75% { 
        transform: translateY(-20px) rotate(3deg) scale(1.07); 
        opacity: 0.95;
    }
}

/* Posicionamento individual de cada SVG */
.svg-shield {
    width: 120px;
    height: 140px;
    top: 10%;
    left: 8%;
    animation-delay: 0s;
}

.svg-book {
    width: 140px;
    height: 120px;
    top: 20%;
    right: 6%;
    animation-delay: 3s;
}

.svg-brain {
    width: 130px;
    height: 130px;
    bottom: 18%;
    left: 10%;
    animation-delay: 6s;
}

.svg-eye {
    width: 150px;
    height: 100px;
    top: 55%;
    right: 12%;
    animation-delay: 9s;
}

.svg-gear {
    width: 110px;
    height: 110px;
    bottom: 28%;
    right: 8%;
    animation-delay: 12s;
    animation-name: rotate-gear;
}

/* Animação específica para engrenagem (rotação) */
@keyframes rotate-gear {
    0%, 100% { 
        transform: rotate(0deg) scale(1); 
        opacity: 0.8;
    }
    50% { 
        transform: rotate(180deg) scale(1.1); 
        opacity: 1;
    }
}

.svg-certificate {
    width: 140px;
    height: 120px;
    top: 38%;
    left: 6%;
    animation-delay: 15s;
}

.svg-network {
    width: 130px;
    height: 130px;
    top: 68%;
    right: 25%;
    animation-delay: 18s;
}

.svg-search {
    width: 100px;
    height: 100px;
    bottom: 45%;
    left: 28%;
    animation-delay: 21s;
}

/* Efeito hover sutil (apenas visual, não clicável) */
.bg-svg:hover {
    filter: drop-shadow(0 6px 18px rgba(244, 121, 32, 0.25));
    animation-play-state: paused;
}

/* Responsividade - oculta alguns SVGs em mobile */
@media (max-width: 768px) {
    .svg-brain,
    .svg-certificate,
    .svg-network,
    .svg-search {
        display: none;
    }
    
    .bg-svg {
        width: 90px !important;
        height: 90px !important;
    }
}

@media (max-width: 480px) {
    .svg-book,
    .svg-gear {
        display: none;
    }
    
    .svg-shield,
    .svg-eye {
        width: 70px !important;
        height: 70px !important;
    }
}


/* ============================================
   CONTAINER DE LOGIN
   ============================================ */

.login-container {
    background: var(--gradient-card);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: var(--shadow-card);
    padding: 50px 45px;
    width: 100%;
    max-width: 440px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-top: 5px solid var(--risa-orange);
    position: relative;
    z-index: 10;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, transparent 50%, rgba(244, 121, 32, 0.05) 50%);
    border-top-right-radius: 24px;
}

/* ============================================
   LOGO E BRANDING
   ============================================ */

.logo {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.logo-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.logo-img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    background: linear-gradient(135deg, var(--risa-blue-light) 0%, rgba(59, 89, 152, 0.1) 100%);
    padding: 15px;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(30, 58, 95, 0.12);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeIn 0.8s ease-out;
}

.logo-img:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 32px rgba(244, 121, 32, 0.2);
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.logo-wrapper::after {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border: 2px solid transparent;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--risa-orange), var(--risa-blue-medium)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    opacity: 0.3;
    animation: rotate 8s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.logo h1 {
    color: var(--risa-navy);
    font-size: 32px;
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--risa-navy) 0%, var(--risa-blue-medium) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo p {
    color: #6c757d;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.logo .subtitle {
    display: inline-block;
    margin-top: 5px;
    padding: 4px 12px;
    background: linear-gradient(135deg, rgba(244, 121, 32, 0.1) 0%, rgba(59, 89, 152, 0.1) 100%);
    border-radius: 20px;
    font-size: 11px;
    color: var(--risa-orange);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================
   FORMULÁRIO
   ============================================ */

.form-group {
    margin-bottom: 24px;
    position: relative;
}

label {
    display: block;
    margin-bottom: 10px;
    color: var(--risa-navy);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.3px;
    transition: color 0.3s;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--risa-blue-medium);
    opacity: 0.5;
    transition: all 0.3s;
}

input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 2px solid var(--risa-blue-light);
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    background: rgba(255, 255, 255, 0.7);
}

input:focus {
    outline: none;
    border-color: var(--risa-orange);
    background: white;
    box-shadow: 0 0 0 4px rgba(244, 121, 32, 0.08);
    transform: translateY(-1px);
}

input:focus + .input-icon {
    color: var(--risa-orange);
    opacity: 1;
}

input::placeholder {
    color: #999;
    font-weight: 400;
}

/* ============================================
   BOTÃO DE LOGIN
   ============================================ */

.btn-login {
    width: 100%;
    padding: 16px;
    background: var(--gradient-button);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 10px;
    box-shadow: var(--shadow-button);
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: var(--shadow-button-hover);
}

.btn-login:active:not(:disabled) {
    transform: translateY(-1px);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================
   ALERTAS E LOADING
   ============================================ */

.alert {
    padding: 15px 18px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: none;
    font-size: 14px;
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-error {
    background: linear-gradient(135deg, #fee 0%, #fdd 100%);
    color: #c33;
    border-left-color: #c33;
}

.alert-info {
    background: linear-gradient(135deg, #e8f4fd 0%, #d1e7f5 100%);
    color: #0c5460;
    border-left-color: var(--risa-blue-medium);
}

.loading {
    display: none;
    text-align: center;
    margin-top: 16px;
    color: var(--risa-orange);
    font-size: 14px;
    font-weight: 600;
}

.loading::before {
    content: '⏳ ';
    animation: rotate 1.5s linear infinite;
    display: inline-block;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    text-align: center;
    margin-top: 35px;
    color: #999;
    font-size: 12px;
    padding-top: 25px;
    border-top: 1px solid rgba(30, 58, 95, 0.08);
}

.footer strong {
    color: var(--risa-navy);
    font-weight: 700;
}

.version-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    background: linear-gradient(135deg, var(--risa-orange), var(--risa-orange-hover));
    color: white;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.footer-link {
    display: inline-block;
    color: #999;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.footer-link:hover {
    color: var(--risa-orange);
    transform: translateY(-1px);
}

.footer-link strong {
    transition: color 0.3s;
}

.footer-link:hover strong {
    background: linear-gradient(135deg, var(--risa-orange) 0%, var(--risa-blue-medium) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--risa-orange), var(--risa-blue-medium));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.footer-link:hover::after {
    width: 100%;
}

.powered-by {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 3px;
}

.powered-by::before {
    content: '⚡';
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s;
}

.footer-link:hover .powered-by::before {
    opacity: 1;
    animation: sparkle 0.6s ease;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */

@media (max-width: 768px) {
    body::before,
    body::after {
        width: 400px;
        height: 400px;
    }
    
    .floating-icon,
    .circuit-line,
    .hexagon,
    .keyword-text {
        display: none;
    }
    
    .circuit-node {
        width: 6px;
        height: 6px;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 40px 30px;
        border-radius: 20px;
    }
    
    .logo h1 {
        font-size: 28px;
    }
    
    .logo-img {
        width: 85px;
        height: 85px;
    }
    
    input {
        padding: 14px 14px 14px 44px;
    }
    
    .btn-login {
        padding: 15px;
        font-size: 15px;
    }
    
    body::before,
    body::after {
        width: 300px;
        height: 300px;
    }
}
