/**
 * Magic UI Integration - Estilos para integração com o design existente
 * Sobrescreve e complementa os estilos existentes com componentes Magic UI
 */

/* Integração com tela de login */
.magic-login-screen {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.magic-login-screen .login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 400px;
    margin: 0 auto;
    padding: 2rem;
}

.magic-login-screen .login-logo {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.magic-login-screen .login-subtitle {
    text-align: center;
    margin-bottom: 2rem;
    color: #666;
    font-size: 1.1rem;
}

/* Integração com header */
.magic-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 100;
}

.magic-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.magic-header .logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.magic-header .logo-mascot {
    width: 50px;
    height: 50px;
}

.magic-header .header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.magic-header .user-info {
    background: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 1rem;
    border-radius: 12px;
    margin-right: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.magic-header .user-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.magic-header .user-email {
    font-size: 0.9rem;
    color: #333;
    font-weight: 500;
}

.magic-header .plan-badge {
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
}

.magic-header .plan-badge.gratuito {
    background: #e3f2fd;
    color: #1976d2;
}

.magic-header .plan-badge.premium {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #b8860b;
}

.magic-header .user-stats {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.magic-header .stat {
    font-size: 0.8rem;
    color: #666;
}

/* Integração com seção hero */
.magic-hero {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    margin: 2rem;
}

.magic-hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.magic-hero-title span {
    display: inline-block;
    margin: 0 0.2rem;
}

.magic-hero-subtitle {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Integração com formulário */
.magic-form-container {
    margin: 2rem;
}

.magic-form-container .form-card {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.95);
}

.magic-form-container .form-group {
    margin-bottom: 1.5rem;
}

.magic-form-container label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.magic-form-container input,
.magic-form-container select,
.magic-form-container textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.magic-form-container input:focus,
.magic-form-container select:focus,
.magic-form-container textarea:focus {
    outline: none;
    border-color: var(--magic-primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
    transform: translateY(-2px);
}

.magic-form-container .form-hint {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
    font-style: italic;
}

.magic-form-container .sugestoes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.magic-form-container .sugestao {
    background: linear-gradient(135deg, var(--magic-secondary), var(--magic-accent));
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.magic-form-container .sugestao:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Integração com resultados */
.magic-result {
    margin: 2rem;
}

.magic-result .historia-card {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.95);
}

.magic-result .magic-content {
    margin-bottom: 2rem;
    line-height: 1.8;
    font-size: 1.1rem;
    color: #333;
}

.magic-result .magic-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Integração com modais */
.magic-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.magic-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.magic-modal .modal-content {
    position: relative;
    z-index: 1001;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
}

.magic-modal .close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    transition: all 0.3s ease;
    z-index: 1002;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
}

.magic-modal .close:hover {
    color: #333;
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

/* Estilos específicos para botões premium */
.premium-button {
    background: linear-gradient(135deg, #ffd700, #ffed4e) !important;
    color: #b8860b !important;
    border: 2px solid #ffd700 !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

.premium-button:hover {
    background: linear-gradient(135deg, #ffed4e, #fff59d) !important;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4) !important;
}

/* Estilos para botão de logout */
.logout-btn {
    background: linear-gradient(135deg, #ff6b6b, #ff8a80) !important;
    color: white !important;
}

.logout-btn:hover {
    background: linear-gradient(135deg, #ff8a80, #ffab91) !important;
}

/* Animações adicionais */
@keyframes meteorFall {
    0% {
        transform: translateX(-100px) translateY(-100px);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateX(calc(100vw + 100px)) translateY(calc(100vh + 100px));
        opacity: 0;
    }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Responsividade */
@media (max-width: 768px) {
    .magic-header .container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .magic-header .header-actions {
        justify-content: center;
        width: 100%;
    }
    
    .magic-header .user-info {
        margin-right: 0;
        margin-bottom: 1rem;
        text-align: center;
    }
    
    .magic-hero {
        padding: 2rem 1rem;
        margin: 1rem;
        border-radius: 15px;
    }
    
    .magic-hero-title {
        font-size: 1.8rem;
    }
    
    .magic-form-container,
    .magic-result {
        margin: 1rem;
    }
    
    .magic-result .magic-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .magic-modal {
        padding: 1rem;
    }
}
