/* Footer attached directly to terminal container */
.terminal-footer {
    position: relative;
    background: linear-gradient(90deg, rgba(0,0,0,0.8) 0%, rgba(30,30,30,0.9) 100%);
    padding: 9px 20px;
    border-top: 1px solid rgba(116, 185, 255, 0.2);
    border-radius: 0 0 12px 12px;
    animation: none; /* Removed animation to keep visible */
    transform-origin: bottom center;
    opacity: 1; /* Always visible */
    transform: scaleY(1); /* No transform to ensure visibility */
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
    margin: 0;
    width: 100%;
}

/* Visual connection between terminal body and footer */
.terminal-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(116, 185, 255, 0.3) 20%, 
        rgba(116, 185, 255, 0.5) 50%,
        rgba(116, 185, 255, 0.3) 80%,
        transparent 100%
    );
    animation: gradientFlow 3s linear infinite;
    background-size: 200% 100%;
}

@keyframes gradientFlow {
    0% {
        background-position: 100% 0;
    }
    100% {
        background-position: -100% 0;
    }
}

/* Special pulse highlight effect */
.terminal-footer.pulse-highlight {
    animation: pulseHighlight 1s ease-out;
}

@keyframes pulseHighlight {
    0% {
        border-top-color: rgba(116, 185, 255, 0.2);
        box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
    }
    50% {
        border-top-color: rgba(116, 185, 255, 0.8);
        box-shadow: inset 0 2px 15px rgba(116, 185, 255, 0.4);
    }
    100% {
        border-top-color: rgba(116, 185, 255, 0.2);
        box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
    }
}

/* Enhanced link hover glow effect */
.footer-link.email-link:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3), 0 0 10px rgba(253, 121, 168, 0.3);
}

.footer-link.github-link:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3), 0 0 10px rgba(108, 92, 231, 0.3);
}

.footer-link.linkedin-link:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3), 0 0 10px rgba(0, 119, 181, 0.3);
}

.footer-link.twitter-link:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3), 0 0 10px rgba(29, 161, 242, 0.3);
}

.footer-link.phone-link:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3), 0 0 10px rgba(0, 184, 148, 0.3);
}

/* Removed duplicate base footer link styles */

/* Media queries for responsive footer */
@media (max-width: 768px) {
    .terminal-footer {
        padding: 10px;
    }
    
    .footer-link {
        padding: 5px 10px;
        font-size: 0.9em;
    }
}

@media (max-width: 576px) {
    .terminal-footer {
        padding: 8px 5px;
    }
    
    .footer-contact-links {
        justify-content: space-around;
        gap: 5px;
    }
    
    /* Mobile-specific adjustments for footer links */
    .footer-link {
        padding: 6px !important;
        width: 36px !important;
        height: 36px !important;
    }
    
    .footer-link:hover {
        padding-right: 12px !important;
        width: max-content !important;
        max-width: max-content !important;
    }
    
    /* Keep icons more compact on mobile */
    .footer-icon {
        margin-right: 5px !important;
    }
}

/* Clean footer link design - icon only with expanding text */
.footer-link {
    display: flex !important;
    align-items: center !important;
    text-decoration: none !important;
    color: var(--cmd-normal) !important;
    padding: 6px !important;
    border-radius: 50% !important; 
    background: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(116, 185, 255, 0.1) !important;
    opacity: 1 !important;
    width: 36px !important;
    height: 36px !important;
    max-width: 36px !important; 
    position: relative !important;
    overflow: hidden !important;
    transition: all 0.3s ease-out !important;
    animation: none !important;
    justify-content: center !important; /* Center the icon when collapsed */
}

.footer-link:hover {
    max-width: max-content !important; /* Adjust to content width */
    width: max-content !important; /* Use content width */
    border-radius: 20px !important;
    padding-right: 16px !important;
    padding-left: 10px !important;
    justify-content: flex-start !important; /* Align left when expanded */
}

/* Ensure smooth transition with content-based width */
.footer-link {
    transition-property: width, max-width, border-radius, background-color, box-shadow, padding !important;
    transition-duration: 0.4s !important;
    transition-timing-function: ease-out !important;
}

/* Override footer icon styles to ensure visibility */
.footer-icon {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 24px !important; 
    height: 24px !important;
    opacity: 1 !important;
    visibility: visible !important;
    margin-right: 8px !important;
    z-index: 2 !important;
    font-size: 1.1em !important; /* Slightly larger icons */
    transition: transform 0.3s ease-out !important;
}

.footer-link:hover .footer-icon {
    transform: scale(1.1) !important; /* Subtle grow effect on hover */
}

/* Ensure text is visible on hover */
.footer-text {
    visibility: visible !important;
    white-space: nowrap !important;
    opacity: 0 !important;
    transition: opacity 0.4s ease-out !important;
    display: inline-block !important;
    position: static !important; /* Ensure text is positioned normally */
    padding-right: 4px !important; /* Add padding to avoid text being cut off */
    margin-left: 2px !important;
    font-size: 0.9em !important;
    letter-spacing: 0.02em !important;
    font-weight: 500 !important;
}

.footer-link:hover .footer-text {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Animation for attached footer - not used anymore but kept for reference */
@keyframes footerAppear {
    0% {
        opacity: 0;
        transform: scaleY(0.3);
    }
    100% {
        opacity: 1;
        transform: scaleY(1);
    }
}

/* Subtle pulse animation for footer instead of floating */
@keyframes footerPulse {
    0%, 100% {
        border-top-color: rgba(116, 185, 255, 0.2);
    }
    50% {
        border-top-color: rgba(116, 185, 255, 0.5);
        box-shadow: inset 0 2px 15px rgba(116, 185, 255, 0.2);
    }
}

.terminal-container {
    display: flex;
    flex-direction: column;
}

.terminal-body {
    flex: 1;
    min-height: 0; /* Ensures proper flexbox behavior */
}

.footer-contact-links {
    display: flex;
    justify-content: start;
    align-items: center;
    flex-wrap: wrap;
    opacity: 1 !important; /* Ensure links container stays visible */
}

/* Add command prompt-style decoration */
.footer-contact-links::before {
    content: '[contact] $';
    color: var(--terminal-prompt);
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    margin-right: 10px;
    opacity: 0.7;
    font-weight: 500;
}

/* Final overrides to ensure correct behavior */
.terminal-footer .footer-contact-links .footer-link {
    opacity: 1 !important;
    display: flex;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    overflow: hidden !important; /* Ensure hidden overflow so text doesn't leak */
    justify-content: flex-start !important; /* Align content to the left */
    width: 36px !important;
    max-width: 36px !important;
}

.terminal-footer .footer-contact-links .footer-link:hover {
    width: max-content !important;
    max-width: max-content !important; /* Automatically fit to content */
    padding-right: 16px !important;
}

.terminal-footer .footer-contact-links .footer-link .footer-icon {
    margin-right: 8px !important;
    padding: 0 2px !important; /* Add padding to the icon */
}

/* Ensure the terminal footer itself stays visible */
.terminal-footer {
    opacity: 1 !important;
    visibility: visible !important;
}
