:root {
    --nav-gradient: linear-gradient(135deg, #3a7bd5, #1e5799);
    --nav-bg: rgba(255, 255, 255, 0.95);
    --nav-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    --nav-border: 1px solid rgba(58, 123, 213, 0.2);
    --nav-hover-bg: rgba(58, 123, 213, 0.1);
    --nav-active-color: #3a7bd5;
}

.main-nav {
    background: var(--nav-bg);
    box-shadow: var(--nav-shadow);
    backdrop-filter: blur(10px);
    border-bottom: var(--nav-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.8rem 2rem;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    transition: transform 0.3s ease;
}

.nav-logo:hover {
    transform: translateY(-2px);
}

.nav-logo i {
    background: var(--nav-gradient);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    position: relative;
    padding: 0.8rem 1.2rem;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 3px;
    height: 100%;
    background: var(--nav-gradient);
    transform: translateX(3px);
    opacity: 0;
    transition: all 0.3s ease;
}

.nav-link i {
    font-size: 1.2rem;
    opacity: 0.8;
    transition: transform 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    right: 50%;
    transform: translateX(50%);
    width: 0;
    height: 3px;
    background: var(--nav-gradient);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-link:hover::after {
    width: 30px;
}

.nav-link:hover {
    color: var(--nav-active-color);
    background: var(--nav-hover-bg);
    transform: translateY(-2px);
}

.nav-link:hover::before {
    transform: translateX(0);
    opacity: 1;
}

.nav-link:hover i {
    transform: translateY(-2px);
}

.nav-link.active {
    color: var(--nav-active-color);
    background: var(--nav-hover-bg);
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(58, 123, 213, 0.15);
}

.nav-link.active::before {
    transform: translateX(0);
    opacity: 1;
}

.nav-link.active::after {
    width: 30px;
}

.nav-voice-indicator {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
    position: relative;
    overflow: hidden;
    margin-left: 10px;
    border: 3px solid rgba(255, 255, 255, 0.8);
    animation: gentle-pulse 2s infinite alternate;
    z-index: 1001;
}

.nav-voice-indicator::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1), rgba(255,255,255,0.4), rgba(255,255,255,0.1));
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    border-radius: 50%;
}

.nav-voice-indicator:hover::after {
    transform: translateX(100%);
}

.nav-voice-indicator:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 25px rgba(231, 76, 60, 0.6);
}

.nav-voice-indicator.listening {
    animation: pulseGlow 1.5s infinite;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.nav-voice-indicator i {
    font-size: 24px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

@keyframes gentle-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
    }
    100% {
        transform: scale(1.05);
        box-shadow: 0 8px 20px rgba(231, 76, 60, 0.6);
    }
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7); }
    70% { box-shadow: 0 0 0 20px rgba(46, 204, 113, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: #2c3e50;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    color: var(--nav-active-color);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 280px;
        height: calc(100vh - 80px);
        background: var(--nav-bg);
        flex-direction: column;
        padding: 2rem;
        transition: 0.3s ease;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
        border-left: var(--nav-border);
        backdrop-filter: blur(10px);
        z-index: 999;
    }

    .nav-links.active {
        right: 0;
    }
    
    .nav-link {
        padding: 1rem 1.5rem;
        margin-bottom: 0.5rem;
        border-radius: 8px;
    }
    
    .nav-container {
        padding: 0.5rem;
    }
}
