/* Efeitos Visuais e Animações Interativas */

/* Particles background effect */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--main-color);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
    }
}

/* Typing animation enhancement */
.typing-text {
    position: relative;
    display: inline-block;
}

.typing-text::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--main-color);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Stats counter section */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
    padding: 2rem;
    background: rgba(240, 0, 0, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(240, 0, 0, 0.2);
}

.stat-item {
    text-align: center;
    padding: 1rem;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.counter {
    font-size: 3rem;
    font-weight: bold;
    color: var(--main-color);
    display: block;
    margin-bottom: 0.5rem;
}

.stat-item span {
    font-size: 1.2rem;
    color: var(--text-color);
    opacity: 0.8;
}

/* Enhanced hover effects for profile image */
.home-profile-img {
    position: relative;
    overflow: visible;
}

.home-profile-img::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, var(--main-color), transparent, var(--main-color));
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.05); }
}

/* Interactive skill bars */
.skill-item {
    position: relative;
    margin: 1.5rem 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.skill-item:hover {
    transform: translateX(10px);
}

.skill-item h3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    color: var(--text-color);
}

.skill-item span {
    color: var(--main-color);
    font-weight: bold;
}

.skill-progress {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.skill-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--main-color), #ff6b6b);
    border-radius: 10px;
    width: 0%;
    transition: width 2s ease-in-out;
    position: relative;
    box-shadow: 0 2px 4px rgba(240, 0, 0, 0.3);
}

.skill-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shine 2s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Enhanced project cards hover effects */
.project-box {
    position: relative;
    overflow: hidden;
    transform: perspective(1000px) rotateX(0deg);
    transition: all 0.4s ease;
    cursor: pointer;
}

.project-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
    z-index: 1;
}

.project-box:hover::before {
    left: 100%;
}

.project-box:hover {
    transform: perspective(1000px) rotateX(5deg) translateY(-10px);
    box-shadow: 0 20px 40px rgba(240, 0, 0, 0.3);
}

/* Enhanced project tags */
.project-tags {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.project-tags span {
    background: linear-gradient(45deg, var(--main-color), #ff6b6b);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: transform 0.3s ease;
}

.project-tags span:hover {
    transform: scale(1.1);
}

/* Project Modal */
.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.project-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-color);
    border-radius: 15px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 80%;
    overflow-y: auto;
    transform: scale(0.7);
    transition: transform 0.3s ease;
    border: 2px solid var(--main-color);
}

.project-modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: rgba(240, 0, 0, 0.2);
}

/* Floating action button */
.floating-contact {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--main-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 5px 20px rgba(240, 0, 0, 0.4);
    transition: all 0.3s ease;
    animation: bounce 2s infinite;
}

.floating-contact:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(240, 0, 0, 0.6);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Interactive buttons with ripple effect */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

/* Parallax effect for sections */
.parallax-section {
    position: relative;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Loading animation */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(240, 0, 0, 0.3);
    border-top: 3px solid var(--main-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Smooth reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced text effects */
.gradient-text {
    background: linear-gradient(45deg, var(--main-color), #ff6b6b, #feca57);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 3s ease-in-out infinite;
}

@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Social media icons enhanced */
.home-sci a {
    position: relative;
}

.home-sci a::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--main-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    z-index: -1;
}

.home-sci a:hover::after {
    width: 100%;
    height: 100%;
}

/* Cursor trail effect */
.cursor-trail {
    position: fixed;
    width: 20px;
    height: 20px;
    background: var(--main-color);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.6;
    z-index: 9999;
    transition: all 0.3s ease;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .particles-container {
        display: none;
    }
    
    .floating-contact {
        width: 50px;
        height: 50px;
        font-size: 20px;
        bottom: 20px;
        right: 20px;
    }
    
    .cursor-trail {
        display: none;
    }
}
