/* Custom Styles for Sagar Labs */

/* Glow effect for buttons */
.glow-button {
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5), 0 0 25px rgba(0, 255, 255, 0.3);
    transition: box-shadow 0.3s ease-in-out;
}

.glow-button:hover {
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.8), 0 0 40px rgba(0, 255, 255, 0.5);
}

/* Navbar background on scroll */
.navbar-scrolled {
    background-color: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}

/* Research card hover effect */
.research-card {
    transition: all 0.3s ease-in-out;
}

.research-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: #00FFFF !important;
}

/* Typing effect for rotating text */
#rotating-text {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: .15em solid #00FFFF;
    animation: 
        typing 3.5s steps(40, end) infinite, 
        blink-caret .75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: #00FFFF }
}

/* Chatbot message styling */
.message-user {
    background: linear-gradient(135deg, #00FFFF, #39FF14);
    color: #0A0A0A;
    align-self: flex-end;
    border-radius: 20px 20px 5px 20px;
    padding: 12px 16px;
    margin: 8px 0;
    max-width: 80%;
    word-wrap: break-word;
    font-weight: 500;
}

.message-bot {
    background-color: #2A2A2A;
    color: #FFFFFF;
    align-self: flex-start;
    border-radius: 20px 20px 20px 5px;
    padding: 12px 16px;
    margin: 8px 0;
    max-width: 80%;
    word-wrap: break-word;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

/* Chatbot modal animations */
#chatbot-modal {
    animation: fadeIn 0.3s ease-out;
}

#chatbot-modal > div {
    animation: slideUp 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Floating chat button pulse */
#chat-toggle {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 255, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 255, 255, 0);
    }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1A1A1A;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #00FFFF, #39FF14);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #39FF14, #00FFFF);
}

/* Form styling improvements */
input:focus, textarea:focus, select:focus {
    box-shadow: 0 0 0 2px rgba(0, 255, 255, 0.3);
}

/* Success message animation */
#form-success {
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navigation link hover effects */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: linear-gradient(90deg, #00FFFF, #39FF14);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Timeline improvements */
.timeline-item {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.timeline-item.animate {
    opacity: 1;
    transform: translateX(0);
}

/* Counter animation improvements */
[data-counter] {
    font-variant-numeric: tabular-nums;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    #particles-js {
        display: none; /* Disable particles on mobile for better performance */
    }
    
    .research-card:hover {
        transform: none; /* Disable hover effects on mobile */
    }
    
    #rotating-text {
        font-size: 1rem;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #00FFFF;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Voice button active state */
.voice-active {
    background: linear-gradient(135deg, #00FFFF, #39FF14) !important;
    color: #0A0A0A !important;
    animation: pulse 1s infinite;
}

/* Chart container styling */
#exponential-chart {
    background: rgba(42, 42, 42, 0.5);
    border-radius: 12px;
}

/* Enhanced button hover effects */
button {
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

/* Improved gradient text */
.gradient-text {
    background: linear-gradient(135deg, #00FFFF, #39FF14, #00FFFF);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Section fade-in animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced card styling */
.enhanced-card {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.8), rgba(42, 42, 42, 0.8));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.enhanced-card:hover {
    border-color: rgba(0, 255, 255, 0.5);
    box-shadow: 0 8px 32px rgba(0, 255, 255, 0.1);
}

/* Improved mobile menu */
#mobile-menu {
    backdrop-filter: blur(20px);
}

/* Better focus states for accessibility */
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #00FFFF;
    outline-offset: 2px;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Enhanced typography */
h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.025em;
}

/* Improved spacing and rhythm */
.section-spacing {
    padding: 5rem 0;
}

@media (max-width: 768px) {
    .section-spacing {
        padding: 3rem 0;
    }
}

/* Performance optimizations */
* {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

